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 #ifndef FPDFSDK_JAVASCRIPT_CJS_RUNTIME_H_ | 7 #ifndef FPDFSDK_JAVASCRIPT_CJS_RUNTIME_H_ |
8 #define FPDFSDK_JAVASCRIPT_CJS_RUNTIME_H_ | 8 #define FPDFSDK_JAVASCRIPT_CJS_RUNTIME_H_ |
9 | 9 |
10 #include <map> | 10 #include <map> |
11 #include <memory> | 11 #include <memory> |
12 #include <set> | 12 #include <set> |
13 #include <utility> | 13 #include <utility> |
14 #include <vector> | 14 #include <vector> |
15 | 15 |
16 #include "core/fxcrt/cfx_observable.h" | 16 #include "core/fxcrt/cfx_observable.h" |
17 #include "core/fxcrt/fx_basic.h" | 17 #include "core/fxcrt/fx_basic.h" |
18 #include "fpdfsdk/javascript/JS_EventHandler.h" | 18 #include "fpdfsdk/javascript/JS_EventHandler.h" |
19 #include "fpdfsdk/javascript/ijs_runtime.h" | 19 #include "fpdfsdk/javascript/ijs_runtime.h" |
20 #include "fxjs/include/fxjs_v8.h" | 20 #include "fxjs/fxjs_v8.h" |
21 | 21 |
22 class CJS_Context; | 22 class CJS_Context; |
23 | 23 |
24 class CJS_Runtime : public IJS_Runtime, | 24 class CJS_Runtime : public IJS_Runtime, |
25 public CFXJS_Engine, | 25 public CFXJS_Engine, |
26 public CFX_Observable<CJS_Runtime> { | 26 public CFX_Observable<CJS_Runtime> { |
27 public: | 27 public: |
28 using FieldEvent = std::pair<CFX_WideString, JS_EVENT_T>; | 28 using FieldEvent = std::pair<CFX_WideString, JS_EVENT_T>; |
29 | 29 |
30 static CJS_Runtime* FromContext(const IJS_Context* cc); | 30 static CJS_Runtime* FromContext(const IJS_Context* cc); |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 | 64 |
65 std::vector<std::unique_ptr<CJS_Context>> m_ContextArray; | 65 std::vector<std::unique_ptr<CJS_Context>> m_ContextArray; |
66 CPDFSDK_Environment* const m_pEnv; | 66 CPDFSDK_Environment* const m_pEnv; |
67 CPDFSDK_Document* m_pDocument; | 67 CPDFSDK_Document* m_pDocument; |
68 bool m_bBlocking; | 68 bool m_bBlocking; |
69 bool m_isolateManaged; | 69 bool m_isolateManaged; |
70 std::set<FieldEvent> m_FieldEventSet; | 70 std::set<FieldEvent> m_FieldEventSet; |
71 }; | 71 }; |
72 | 72 |
73 #endif // FPDFSDK_JAVASCRIPT_CJS_RUNTIME_H_ | 73 #endif // FPDFSDK_JAVASCRIPT_CJS_RUNTIME_H_ |
OLD | NEW |