Refactor fxjs_v8 and add embeddertests for it.
[pdfium.git] / fpdfsdk / src / javascript / report.cpp
index 5063c68..732ae6d 100644 (file)
@@ -1,50 +1,47 @@
-// Copyright 2014 PDFium Authors. All rights reserved.\r
-// Use of this source code is governed by a BSD-style license that can be\r
-// found in the LICENSE file.\r
\r
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com\r
-\r
-#include "../../include/javascript/JavaScript.h"\r
-#include "../../include/javascript/IJavaScript.h"\r
-#include "../../include/javascript/JS_Define.h"\r
-#include "../../include/javascript/JS_Object.h"\r
-#include "../../include/javascript/JS_Value.h"\r
-#include "../../include/javascript/report.h"\r
-\r
-/* ---------------------- report ---------------------- */\r
-\r
-BEGIN_JS_STATIC_CONST(CJS_Report)\r
-END_JS_STATIC_CONST()\r
-\r
-BEGIN_JS_STATIC_PROP(CJS_Report)\r
-END_JS_STATIC_PROP()\r
-\r
-BEGIN_JS_STATIC_METHOD(CJS_Report) \r
-       JS_STATIC_METHOD_ENTRY(save, 1)\r
-       JS_STATIC_METHOD_ENTRY(writeText,1)\r
-END_JS_STATIC_METHOD()\r
-\r
-IMPLEMENT_JS_CLASS(CJS_Report, Report)\r
-       \r
-Report::Report(CJS_Object* pJSObject) : CJS_EmbedObj(pJSObject)\r
-{\r
-\r
-}\r
-\r
-Report::~Report()\r
-{\r
-       \r
-}\r
-\r
-FX_BOOL Report::writeText(OBJ_METHOD_PARAMS)\r
-{\r
-       if (IsSafeMode(cc)) return TRUE;\r
-       return TRUE;\r
-}\r
-\r
-FX_BOOL Report::save(OBJ_METHOD_PARAMS)\r
-{\r
-       if (IsSafeMode(cc)) return TRUE;\r
-       return TRUE;    \r
-}\r
-\r
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#include "../../include/javascript/JavaScript.h"
+#include "../../include/javascript/IJavaScript.h"
+#include "../../include/javascript/JS_Define.h"
+#include "../../include/javascript/JS_Object.h"
+#include "../../include/javascript/JS_Value.h"
+#include "../../include/javascript/report.h"
+
+/* ---------------------- report ---------------------- */
+
+BEGIN_JS_STATIC_CONST(CJS_Report)
+END_JS_STATIC_CONST()
+
+BEGIN_JS_STATIC_PROP(CJS_Report)
+END_JS_STATIC_PROP()
+
+BEGIN_JS_STATIC_METHOD(CJS_Report)
+JS_STATIC_METHOD_ENTRY(save)
+JS_STATIC_METHOD_ENTRY(writeText)
+END_JS_STATIC_METHOD()
+
+IMPLEMENT_JS_CLASS(CJS_Report, Report)
+
+Report::Report(CJS_Object* pJSObject) : CJS_EmbedObj(pJSObject) {}
+
+Report::~Report() {}
+
+FX_BOOL Report::writeText(IFXJS_Context* cc,
+                          const CJS_Parameters& params,
+                          CJS_Value& vRet,
+                          CFX_WideString& sError) {
+  // Unsafe, not supported.
+  return TRUE;
+}
+
+FX_BOOL Report::save(IFXJS_Context* cc,
+                     const CJS_Parameters& params,
+                     CJS_Value& vRet,
+                     CFX_WideString& sError) {
+  // Unsafe, not supported.
+  return TRUE;
+}