| 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_SRC_JAVASCRIPT_JS_RUNTIME_H_ | 7 #ifndef FPDFSDK_SRC_JAVASCRIPT_JS_RUNTIME_H_ | 
| 8 #define FPDFSDK_SRC_JAVASCRIPT_JS_RUNTIME_H_ | 8 #define FPDFSDK_SRC_JAVASCRIPT_JS_RUNTIME_H_ | 
| 9 | 9 | 
| 10 #include <set> | 10 #include <set> | 
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 50   bool AddEventToSet(const FieldEvent& event); | 50   bool AddEventToSet(const FieldEvent& event); | 
| 51   void RemoveEventFromSet(const FieldEvent& event); | 51   void RemoveEventFromSet(const FieldEvent& event); | 
| 52 | 52 | 
| 53   void BeginBlock() { m_bBlocking = TRUE; } | 53   void BeginBlock() { m_bBlocking = TRUE; } | 
| 54   void EndBlock() { m_bBlocking = FALSE; } | 54   void EndBlock() { m_bBlocking = FALSE; } | 
| 55   FX_BOOL IsBlocking() const { return m_bBlocking; } | 55   FX_BOOL IsBlocking() const { return m_bBlocking; } | 
| 56 | 56 | 
| 57   v8::Isolate* GetIsolate() const { return m_isolate; } | 57   v8::Isolate* GetIsolate() const { return m_isolate; } | 
| 58   v8::Local<v8::Context> NewJSContext(); | 58   v8::Local<v8::Context> NewJSContext(); | 
| 59 | 59 | 
| 60   virtual FX_BOOL GetHValueByName(const CFX_ByteStringC& utf8Name, | 60   // IJS_Runtime: | 
| 61                                   FXJSE_HVALUE hValue); | 61   FX_BOOL GetHValueByName(const CFX_ByteStringC& utf8Name, | 
| 62   virtual FX_BOOL SetHValueByName(const CFX_ByteStringC& utf8Name, | 62                           FXJSE_HVALUE hValue) override; | 
| 63                                   FXJSE_HVALUE hValue); | 63   FX_BOOL SetHValueByName(const CFX_ByteStringC& utf8Name, | 
|  | 64                           FXJSE_HVALUE hValue) override; | 
| 64 | 65 | 
| 65   void AddObserver(Observer* observer); | 66   void AddObserver(Observer* observer); | 
| 66   void RemoveObserver(Observer* observer); | 67   void RemoveObserver(Observer* observer); | 
| 67 | 68 | 
| 68  private: | 69  private: | 
| 69   void DefineJSObjects(); | 70   void DefineJSObjects(); | 
| 70 | 71 | 
| 71   CFX_ArrayTemplate<CJS_Context*> m_ContextArray; | 72   CFX_ArrayTemplate<CJS_Context*> m_ContextArray; | 
| 72   CPDFDoc_Environment* m_pApp; | 73   CPDFDoc_Environment* m_pApp; | 
| 73   CPDFSDK_Document* m_pDocument; | 74   CPDFSDK_Document* m_pDocument; | 
| 74   FX_BOOL m_bBlocking; | 75   FX_BOOL m_bBlocking; | 
| 75   std::set<FieldEvent> m_FieldEventSet; | 76   std::set<FieldEvent> m_FieldEventSet; | 
| 76   v8::Isolate* m_isolate; | 77   v8::Isolate* m_isolate; | 
| 77   bool m_isolateManaged; | 78   bool m_isolateManaged; | 
| 78   v8::Global<v8::Context> m_context; | 79   v8::Global<v8::Context> m_context; | 
| 79   std::set<Observer*> m_observers; | 80   std::set<Observer*> m_observers; | 
| 80 }; | 81 }; | 
| 81 | 82 | 
| 82 #endif  // FPDFSDK_SRC_JAVASCRIPT_JS_RUNTIME_H_ | 83 #endif  // FPDFSDK_SRC_JAVASCRIPT_JS_RUNTIME_H_ | 
| OLD | NEW | 
|---|