OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 // FXJS_V8 is a layer that makes it easier to define native objects in V8, but | 7 // FXJS_V8 is a layer that makes it easier to define native objects in V8, but |
8 // has no knowledge of PDF-specific native objects. It could in theory be used | 8 // has no knowledge of PDF-specific native objects. It could in theory be used |
9 // to implement other sets of native objects. | 9 // to implement other sets of native objects. |
10 | 10 |
11 // PDFium code should include this file rather than including V8 headers | 11 // PDFium code should include this file rather than including V8 headers |
12 // directly. | 12 // directly. |
13 | 13 |
14 #ifndef FXJS_INCLUDE_FXJS_V8_H_ | 14 #ifndef FXJS_FXJS_V8_H_ |
15 #define FXJS_INCLUDE_FXJS_V8_H_ | 15 #define FXJS_FXJS_V8_H_ |
16 | 16 |
17 #include <v8-util.h> | 17 #include <v8-util.h> |
18 #include <v8.h> | 18 #include <v8.h> |
19 | 19 |
20 #include <map> | 20 #include <map> |
21 #include <memory> | 21 #include <memory> |
22 #include <vector> | 22 #include <vector> |
23 | 23 |
24 #include "core/fxcrt/fx_string.h" | 24 #include "core/fxcrt/fx_string.h" |
25 #ifdef PDF_ENABLE_XFA | 25 #ifdef PDF_ENABLE_XFA |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 | 252 |
253 void SetIsolate(v8::Isolate* pIsolate) { m_isolate = pIsolate; } | 253 void SetIsolate(v8::Isolate* pIsolate) { m_isolate = pIsolate; } |
254 | 254 |
255 private: | 255 private: |
256 v8::Isolate* m_isolate; | 256 v8::Isolate* m_isolate; |
257 v8::Global<v8::Context> m_V8PersistentContext; | 257 v8::Global<v8::Context> m_V8PersistentContext; |
258 std::vector<v8::Global<v8::Object>*> m_StaticObjects; | 258 std::vector<v8::Global<v8::Object>*> m_StaticObjects; |
259 std::map<CFX_WideString, v8::Global<v8::Array>> m_ConstArrays; | 259 std::map<CFX_WideString, v8::Global<v8::Array>> m_ConstArrays; |
260 }; | 260 }; |
261 | 261 |
262 #endif // FXJS_INCLUDE_FXJS_V8_H_ | 262 #endif // FXJS_FXJS_V8_H_ |
OLD | NEW |