summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--BUILD.gn10
-rw-r--r--fxjs/cjs_global.cpp4
-rw-r--r--fxjs/cjs_globaldata.cpp (renamed from fxjs/JS_GlobalData.cpp)2
-rw-r--r--fxjs/cjs_globaldata.h (renamed from fxjs/JS_GlobalData.h)8
-rw-r--r--fxjs/cjs_globalvariablearray.cpp (renamed from fxjs/JS_KeyValue.cpp)10
-rw-r--r--fxjs/cjs_globalvariablearray.h29
-rw-r--r--fxjs/cjs_keyvalue.cpp11
-rw-r--r--fxjs/cjs_keyvalue.h (renamed from fxjs/JS_KeyValue.h)26
-rw-r--r--fxjs/cjs_runtime.cpp2
9 files changed, 62 insertions, 40 deletions
diff --git a/BUILD.gn b/BUILD.gn
index e49b0d0156..20e0d88b07 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -1190,10 +1190,6 @@ static_library("fxjs") {
sources += [
"fxjs/JS_Define.cpp",
"fxjs/JS_Define.h",
- "fxjs/JS_GlobalData.cpp",
- "fxjs/JS_GlobalData.h",
- "fxjs/JS_KeyValue.cpp",
- "fxjs/JS_KeyValue.h",
"fxjs/cjs_annot.cpp",
"fxjs/cjs_annot.h",
"fxjs/cjs_app.cpp",
@@ -1228,10 +1224,16 @@ static_library("fxjs") {
"fxjs/cjs_globalarrays.h",
"fxjs/cjs_globalconsts.cpp",
"fxjs/cjs_globalconsts.h",
+ "fxjs/cjs_globaldata.cpp",
+ "fxjs/cjs_globaldata.h",
+ "fxjs/cjs_globalvariablearray.cpp",
+ "fxjs/cjs_globalvariablearray.h",
"fxjs/cjs_highlight.cpp",
"fxjs/cjs_highlight.h",
"fxjs/cjs_icon.cpp",
"fxjs/cjs_icon.h",
+ "fxjs/cjs_keyvalue.cpp",
+ "fxjs/cjs_keyvalue.h",
"fxjs/cjs_object.cpp",
"fxjs/cjs_object.h",
"fxjs/cjs_position.cpp",
diff --git a/fxjs/cjs_global.cpp b/fxjs/cjs_global.cpp
index c4a8edcf32..3c5c51b794 100644
--- a/fxjs/cjs_global.cpp
+++ b/fxjs/cjs_global.cpp
@@ -13,10 +13,10 @@
#include "core/fxcrt/fx_extension.h"
#include "fxjs/JS_Define.h"
-#include "fxjs/JS_GlobalData.h"
-#include "fxjs/JS_KeyValue.h"
#include "fxjs/cjs_event_context.h"
#include "fxjs/cjs_eventhandler.h"
+#include "fxjs/cjs_globaldata.h"
+#include "fxjs/cjs_keyvalue.h"
#include "fxjs/cjs_object.h"
#include "fxjs/js_resources.h"
diff --git a/fxjs/JS_GlobalData.cpp b/fxjs/cjs_globaldata.cpp
index 78e19c9482..fe7d94b9a4 100644
--- a/fxjs/JS_GlobalData.cpp
+++ b/fxjs/cjs_globaldata.cpp
@@ -4,7 +4,7 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "fxjs/JS_GlobalData.h"
+#include "fxjs/cjs_globaldata.h"
#include <utility>
diff --git a/fxjs/JS_GlobalData.h b/fxjs/cjs_globaldata.h
index c167d1e4e1..b9a4b2123e 100644
--- a/fxjs/JS_GlobalData.h
+++ b/fxjs/cjs_globaldata.h
@@ -4,14 +4,14 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#ifndef FXJS_JS_GLOBALDATA_H_
-#define FXJS_JS_GLOBALDATA_H_
+#ifndef FXJS_CJS_GLOBALDATA_H_
+#define FXJS_CJS_GLOBALDATA_H_
#include <memory>
#include <vector>
#include "core/fxcrt/cfx_binarybuf.h"
-#include "fxjs/JS_KeyValue.h"
+#include "fxjs/cjs_keyvalue.h"
class CPDFSDK_FormFillEnvironment;
@@ -74,4 +74,4 @@ class CJS_GlobalData {
WideString m_sFilePath;
};
-#endif // FXJS_JS_GLOBALDATA_H_
+#endif // FXJS_CJS_GLOBALDATA_H_
diff --git a/fxjs/JS_KeyValue.cpp b/fxjs/cjs_globalvariablearray.cpp
index aabfc38c76..8bf9f1b305 100644
--- a/fxjs/JS_KeyValue.cpp
+++ b/fxjs/cjs_globalvariablearray.cpp
@@ -1,10 +1,12 @@
-// Copyright 2016 PDFium Authors. All rights reserved.
+// Copyright 2017 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 "fxjs/JS_KeyValue.h"
+#include "fxjs/cjs_globalvariablearray.h"
+
+#include "fxjs/cjs_keyvalue.h"
CJS_GlobalVariableArray::CJS_GlobalVariableArray() {}
@@ -64,7 +66,3 @@ int CJS_GlobalVariableArray::Count() const {
CJS_KeyValue* CJS_GlobalVariableArray::GetAt(int index) const {
return m_Array.at(index).get();
}
-
-CJS_KeyValue::CJS_KeyValue() {}
-
-CJS_KeyValue::~CJS_KeyValue() {}
diff --git a/fxjs/cjs_globalvariablearray.h b/fxjs/cjs_globalvariablearray.h
new file mode 100644
index 0000000000..a249f60be9
--- /dev/null
+++ b/fxjs/cjs_globalvariablearray.h
@@ -0,0 +1,29 @@
+// Copyright 2017 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
+
+#ifndef FXJS_CJS_GLOBALVARIABLEARRAY_H_
+#define FXJS_CJS_GLOBALVARIABLEARRAY_H_
+
+#include <memory>
+#include <vector>
+
+class CJS_KeyValue;
+
+class CJS_GlobalVariableArray {
+ public:
+ CJS_GlobalVariableArray();
+ ~CJS_GlobalVariableArray();
+
+ void Add(CJS_KeyValue* p);
+ int Count() const;
+ CJS_KeyValue* GetAt(int index) const;
+ void Copy(const CJS_GlobalVariableArray& array);
+
+ private:
+ std::vector<std::unique_ptr<CJS_KeyValue>> m_Array;
+};
+
+#endif // FXJS_CJS_GLOBALVARIABLEARRAY_H_
diff --git a/fxjs/cjs_keyvalue.cpp b/fxjs/cjs_keyvalue.cpp
new file mode 100644
index 0000000000..4fda3d6fb2
--- /dev/null
+++ b/fxjs/cjs_keyvalue.cpp
@@ -0,0 +1,11 @@
+// Copyright 2016 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 "fxjs/cjs_keyvalue.h"
+
+CJS_KeyValue::CJS_KeyValue() {}
+
+CJS_KeyValue::~CJS_KeyValue() {}
diff --git a/fxjs/JS_KeyValue.h b/fxjs/cjs_keyvalue.h
index a81a6b432e..a1fd314de4 100644
--- a/fxjs/JS_KeyValue.h
+++ b/fxjs/cjs_keyvalue.h
@@ -4,32 +4,14 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#ifndef FXJS_JS_KEYVALUE_H_
-#define FXJS_JS_KEYVALUE_H_
-
-#include <memory>
-#include <vector>
+#ifndef FXJS_CJS_KEYVALUE_H_
+#define FXJS_CJS_KEYVALUE_H_
#include "core/fxcrt/fx_string.h"
+#include "fxjs/cjs_globalvariablearray.h"
enum class JS_GlobalDataType { NUMBER = 0, BOOLEAN, STRING, OBJECT, NULLOBJ };
-class CJS_KeyValue;
-
-class CJS_GlobalVariableArray {
- public:
- CJS_GlobalVariableArray();
- ~CJS_GlobalVariableArray();
-
- void Add(CJS_KeyValue* p);
- int Count() const;
- CJS_KeyValue* GetAt(int index) const;
- void Copy(const CJS_GlobalVariableArray& array);
-
- private:
- std::vector<std::unique_ptr<CJS_KeyValue>> m_Array;
-};
-
class CJS_KeyValue {
public:
CJS_KeyValue();
@@ -43,4 +25,4 @@ class CJS_KeyValue {
CJS_GlobalVariableArray objData;
};
-#endif // FXJS_JS_KEYVALUE_H_
+#endif // FXJS_CJS_KEYVALUE_H_
diff --git a/fxjs/cjs_runtime.cpp b/fxjs/cjs_runtime.cpp
index 6043debc44..8a3b166cbd 100644
--- a/fxjs/cjs_runtime.cpp
+++ b/fxjs/cjs_runtime.cpp
@@ -10,7 +10,6 @@
#include "fpdfsdk/cpdfsdk_formfillenvironment.h"
#include "fxjs/JS_Define.h"
-#include "fxjs/JS_GlobalData.h"
#include "fxjs/cjs_annot.h"
#include "fxjs/cjs_app.h"
#include "fxjs/cjs_border.h"
@@ -26,6 +25,7 @@
#include "fxjs/cjs_global.h"
#include "fxjs/cjs_globalarrays.h"
#include "fxjs/cjs_globalconsts.h"
+#include "fxjs/cjs_globaldata.h"
#include "fxjs/cjs_highlight.h"
#include "fxjs/cjs_icon.h"
#include "fxjs/cjs_object.h"