summaryrefslogtreecommitdiff
path: root/fxjs/cjs_v8.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-02-08 21:44:59 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-02-08 21:44:59 +0000
commite0518bf0a0e703b1e010081079c988f011834cb6 (patch)
treebe2df97b073ae847792cdb551868ec101b96c8cd /fxjs/cjs_v8.h
parent3645652fb6cad1f94c9647f033a8e300bc37d521 (diff)
downloadpdfium-e0518bf0a0e703b1e010081079c988f011834cb6.tar.xz
Move cjs_v8.cpp to cfx_v8.cpp
The layering should be CJS => CFXJS => CFX_V8 with the CJS name being higher up. Change-Id: Ic130f248906e9c4df641dd508389b0555786b999 Reviewed-on: https://pdfium-review.googlesource.com/26051 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fxjs/cjs_v8.h')
-rw-r--r--fxjs/cjs_v8.h69
1 files changed, 0 insertions, 69 deletions
diff --git a/fxjs/cjs_v8.h b/fxjs/cjs_v8.h
deleted file mode 100644
index 4599da3e36..0000000000
--- a/fxjs/cjs_v8.h
+++ /dev/null
@@ -1,69 +0,0 @@
-// 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_V8_H_
-#define FXJS_CJS_V8_H_
-
-#include <map>
-#include <vector>
-
-#include "core/fxcrt/bytestring.h"
-#include "core/fxcrt/fx_string.h"
-#include "core/fxcrt/widestring.h"
-#include "v8/include/v8-util.h"
-#include "v8/include/v8.h"
-
-class CJS_V8 {
- public:
- explicit CJS_V8(v8::Isolate* pIsolate);
- virtual ~CJS_V8();
-
- v8::Isolate* GetIsolate() const { return m_isolate; }
-
- v8::Local<v8::Value> NewNull();
- v8::Local<v8::Value> NewUndefined();
- v8::Local<v8::Array> NewArray();
- v8::Local<v8::Object> NewObject();
- v8::Local<v8::Number> NewNumber(int number);
- v8::Local<v8::Number> NewNumber(double number);
- v8::Local<v8::Number> NewNumber(float number);
- v8::Local<v8::Boolean> NewBoolean(bool b);
- v8::Local<v8::String> NewString(const ByteStringView& str);
- v8::Local<v8::String> NewString(const WideStringView& str);
- v8::Local<v8::Date> NewDate(double d);
-
- int ToInt32(v8::Local<v8::Value> pValue);
- bool ToBoolean(v8::Local<v8::Value> pValue);
- double ToDouble(v8::Local<v8::Value> pValue);
- WideString ToWideString(v8::Local<v8::Value> pValue);
- ByteString ToByteString(v8::Local<v8::Value> pValue);
- v8::Local<v8::Object> ToObject(v8::Local<v8::Value> pValue);
- v8::Local<v8::Array> ToArray(v8::Local<v8::Value> pValue);
-
- // Arrays.
- unsigned GetArrayLength(v8::Local<v8::Array> pArray);
- v8::Local<v8::Value> GetArrayElement(v8::Local<v8::Array> pArray,
- unsigned index);
- unsigned PutArrayElement(v8::Local<v8::Array> pArray,
- unsigned index,
- v8::Local<v8::Value> pValue);
-
- // Objects.
- std::vector<WideString> GetObjectPropertyNames(v8::Local<v8::Object> pObj);
- v8::Local<v8::Value> GetObjectProperty(v8::Local<v8::Object> pObj,
- const WideString& PropertyName);
- void PutObjectProperty(v8::Local<v8::Object> pObj,
- const WideString& PropertyName,
- v8::Local<v8::Value> pValue);
-
- protected:
- void SetIsolate(v8::Isolate* pIsolate) { m_isolate = pIsolate; }
-
- private:
- v8::Isolate* m_isolate;
-};
-
-#endif // FXJS_CJS_V8_H_