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

Side by Side Diff: fpdfsdk/src/javascript/JS_Context.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/Field.cpp ('k') | fpdfsdk/src/javascript/JS_Context.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_CONTEXT_H_ 7 #ifndef FPDFSDK_SRC_JAVASCRIPT_JS_CONTEXT_H_
8 #define FPDFSDK_SRC_JAVASCRIPT_JS_CONTEXT_H_ 8 #define FPDFSDK_SRC_JAVASCRIPT_JS_CONTEXT_H_
9 9
10 #include "../../../core/include/fxcrt/fx_system.h" 10 #include "../../../core/include/fxcrt/fx_system.h"
11 #include "../../../core/include/fxcrt/fx_string.h" 11 #include "../../../core/include/fxcrt/fx_string.h"
12 #include "../../include/javascript/IJavaScript.h" 12 #include "../../include/javascript/IJavaScript.h"
13 13
14 class CJS_EventHandler; 14 class CJS_EventHandler;
15 class CJS_Runtime; 15 class CJS_Runtime;
16 16
17 class CJS_Context : public IJS_Context { 17 class CJS_Context : public IJS_Context {
18 public: 18 public:
19 explicit CJS_Context(CJS_Runtime* pRuntime); 19 explicit CJS_Context(CJS_Runtime* pRuntime);
20 ~CJS_Context() override; 20 ~CJS_Context() override;
21 21
22 // IJS_Context 22 // IJS_Context
23 FX_BOOL RunScript(const CFX_WideString& script, 23 FX_BOOL RunScript(const CFX_WideString& script,
24 CFX_WideString& info) override; 24 CFX_WideString* info) override;
25 void OnApp_Init() override; 25 void OnApp_Init() override;
26 void OnDoc_Open(CPDFSDK_Document* pDoc, 26 void OnDoc_Open(CPDFSDK_Document* pDoc,
27 const CFX_WideString& strTargetName) override; 27 const CFX_WideString& strTargetName) override;
28 void OnDoc_WillPrint(CPDFSDK_Document* pDoc) override; 28 void OnDoc_WillPrint(CPDFSDK_Document* pDoc) override;
29 void OnDoc_DidPrint(CPDFSDK_Document* pDoc) override; 29 void OnDoc_DidPrint(CPDFSDK_Document* pDoc) override;
30 void OnDoc_WillSave(CPDFSDK_Document* pDoc) override; 30 void OnDoc_WillSave(CPDFSDK_Document* pDoc) override;
31 void OnDoc_DidSave(CPDFSDK_Document* pDoc) override; 31 void OnDoc_DidSave(CPDFSDK_Document* pDoc) override;
32 void OnDoc_WillClose(CPDFSDK_Document* pDoc) override; 32 void OnDoc_WillClose(CPDFSDK_Document* pDoc) override;
33 void OnPage_Open(CPDFSDK_Document* pTarget) override; 33 void OnPage_Open(CPDFSDK_Document* pTarget) override;
34 void OnPage_Close(CPDFSDK_Document* pTarget) override; 34 void OnPage_Close(CPDFSDK_Document* pTarget) override;
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 CPDFSDK_Document* GetReaderDocument(); 128 CPDFSDK_Document* GetReaderDocument();
129 129
130 private: 130 private:
131 CJS_Runtime* m_pRuntime; 131 CJS_Runtime* m_pRuntime;
132 CJS_EventHandler* m_pEventHandler; 132 CJS_EventHandler* m_pEventHandler;
133 FX_BOOL m_bBusy; 133 FX_BOOL m_bBusy;
134 FX_BOOL m_bMsgBoxEnable; 134 FX_BOOL m_bMsgBoxEnable;
135 }; 135 };
136 136
137 #endif // FPDFSDK_SRC_JAVASCRIPT_JS_CONTEXT_H_ 137 #endif // FPDFSDK_SRC_JAVASCRIPT_JS_CONTEXT_H_
OLDNEW
« no previous file with comments | « fpdfsdk/src/javascript/Field.cpp ('k') | fpdfsdk/src/javascript/JS_Context.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698