Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(404)

Side by Side Diff: fpdfsdk/src/javascript/JS_Runtime.h

Issue 1389163007: Pass IJS_Runtime, not IJS_Context, to native object constructors. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Merge changes into stub. Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « fpdfsdk/src/javascript/JS_Object.h ('k') | fpdfsdk/src/javascript/JS_Runtime.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 22 matching lines...) Expand all
33 33
34 explicit CJS_Runtime(CPDFDoc_Environment* pApp); 34 explicit CJS_Runtime(CPDFDoc_Environment* pApp);
35 ~CJS_Runtime() override; 35 ~CJS_Runtime() override;
36 36
37 // IJS_Runtime 37 // IJS_Runtime
38 IJS_Context* NewContext() override; 38 IJS_Context* NewContext() override;
39 void ReleaseContext(IJS_Context* pContext) override; 39 void ReleaseContext(IJS_Context* pContext) override;
40 IJS_Context* GetCurrentContext() override; 40 IJS_Context* GetCurrentContext() override;
41 void SetReaderDocument(CPDFSDK_Document* pReaderDoc) override; 41 void SetReaderDocument(CPDFSDK_Document* pReaderDoc) override;
42 CPDFSDK_Document* GetReaderDocument() override { return m_pDocument; } 42 CPDFSDK_Document* GetReaderDocument() override { return m_pDocument; }
43 int Execute(IJS_Context* cc,
44 const wchar_t* script,
45 CFX_WideString* info) override;
43 46
44 CPDFDoc_Environment* GetReaderApp() const { return m_pApp; } 47 CPDFDoc_Environment* GetReaderApp() const { return m_pApp; }
45 48
46 // Returns true if the event isn't already found in the set. 49 // Returns true if the event isn't already found in the set.
47 bool AddEventToSet(const FieldEvent& event); 50 bool AddEventToSet(const FieldEvent& event);
48 void RemoveEventFromSet(const FieldEvent& event); 51 void RemoveEventFromSet(const FieldEvent& event);
49 52
50 void BeginBlock() { m_bBlocking = TRUE; } 53 void BeginBlock() { m_bBlocking = TRUE; }
51 void EndBlock() { m_bBlocking = FALSE; } 54 void EndBlock() { m_bBlocking = FALSE; }
52 FX_BOOL IsBlocking() const { return m_bBlocking; } 55 FX_BOOL IsBlocking() const { return m_bBlocking; }
(...skipping 12 matching lines...) Expand all
65 CPDFSDK_Document* m_pDocument; 68 CPDFSDK_Document* m_pDocument;
66 FX_BOOL m_bBlocking; 69 FX_BOOL m_bBlocking;
67 std::set<FieldEvent> m_FieldEventSet; 70 std::set<FieldEvent> m_FieldEventSet;
68 v8::Isolate* m_isolate; 71 v8::Isolate* m_isolate;
69 bool m_isolateManaged; 72 bool m_isolateManaged;
70 v8::Global<v8::Context> m_context; 73 v8::Global<v8::Context> m_context;
71 std::set<Observer*> m_observers; 74 std::set<Observer*> m_observers;
72 }; 75 };
73 76
74 #endif // FPDFSDK_SRC_JAVASCRIPT_JS_RUNTIME_H_ 77 #endif // FPDFSDK_SRC_JAVASCRIPT_JS_RUNTIME_H_
OLDNEW
« no previous file with comments | « fpdfsdk/src/javascript/JS_Object.h ('k') | fpdfsdk/src/javascript/JS_Runtime.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698