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

Side by Side Diff: fpdfsdk/javascript/JS_Runtime_Stub.cpp

Issue 2399943002: Remove CPDFSDK_Document from IJS_Context (Closed)
Patch Set: Rebase to master Created 4 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/javascript/JS_EventHandler.cpp ('k') | fpdfsdk/javascript/PublicMethods.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 2015 PDFium Authors. All rights reserved. 1 // Copyright 2015 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 #include <memory> 7 #include <memory>
8 8
9 #include "fpdfsdk/javascript/ijs_context.h" 9 #include "fpdfsdk/javascript/ijs_context.h"
10 #include "fpdfsdk/javascript/ijs_runtime.h" 10 #include "fpdfsdk/javascript/ijs_runtime.h"
11 #include "third_party/base/ptr_util.h" 11 #include "third_party/base/ptr_util.h"
12 12
13 class CJS_ContextStub final : public IJS_Context { 13 class CJS_ContextStub final : public IJS_Context {
14 public: 14 public:
15 CJS_ContextStub() {} 15 CJS_ContextStub() {}
16 ~CJS_ContextStub() override {} 16 ~CJS_ContextStub() override {}
17 17
18 // IJS_Context: 18 // IJS_Context:
19 FX_BOOL RunScript(const CFX_WideString& script, 19 FX_BOOL RunScript(const CFX_WideString& script,
20 CFX_WideString* info) override { 20 CFX_WideString* info) override {
21 return FALSE; 21 return FALSE;
22 } 22 }
23 23
24 void OnApp_Init() override {} 24 void OnApp_Init() override {}
25 void OnDoc_Open(CPDFSDK_Document* pDoc, 25 void OnDoc_Open(CPDFSDK_FormFillEnvironment* pFormFillEnv,
26 const CFX_WideString& strTargetName) override {} 26 const CFX_WideString& strTargetName) override {}
27 void OnDoc_WillPrint(CPDFSDK_Document* pDoc) override {} 27 void OnDoc_WillPrint(CPDFSDK_FormFillEnvironment* pFormFillEnv) override {}
28 void OnDoc_DidPrint(CPDFSDK_Document* pDoc) override {} 28 void OnDoc_DidPrint(CPDFSDK_FormFillEnvironment* pFormFillEnv) override {}
29 void OnDoc_WillSave(CPDFSDK_Document* pDoc) override {} 29 void OnDoc_WillSave(CPDFSDK_FormFillEnvironment* pFormFillEnv) override {}
30 void OnDoc_DidSave(CPDFSDK_Document* pDoc) override {} 30 void OnDoc_DidSave(CPDFSDK_FormFillEnvironment* pFormFillEnv) override {}
31 void OnDoc_WillClose(CPDFSDK_Document* pDoc) override {} 31 void OnDoc_WillClose(CPDFSDK_FormFillEnvironment* pFormFillEnv) override {}
32 void OnPage_Open(CPDFSDK_Document* pTarget) override {} 32 void OnPage_Open(CPDFSDK_FormFillEnvironment* pFormFillEnv) override {}
33 void OnPage_Close(CPDFSDK_Document* pTarget) override {} 33 void OnPage_Close(CPDFSDK_FormFillEnvironment* pFormFillEnv) override {}
34 void OnPage_InView(CPDFSDK_Document* pTarget) override {} 34 void OnPage_InView(CPDFSDK_FormFillEnvironment* pFormFillEnv) override {}
35 void OnPage_OutView(CPDFSDK_Document* pTarget) override {} 35 void OnPage_OutView(CPDFSDK_FormFillEnvironment* pFormFillEnv) override {}
36 void OnField_MouseDown(FX_BOOL bModifier, 36 void OnField_MouseDown(FX_BOOL bModifier,
37 FX_BOOL bShift, 37 FX_BOOL bShift,
38 CPDF_FormField* pTarget) override {} 38 CPDF_FormField* pTarget) override {}
39 void OnField_MouseEnter(FX_BOOL bModifier, 39 void OnField_MouseEnter(FX_BOOL bModifier,
40 FX_BOOL bShift, 40 FX_BOOL bShift,
41 CPDF_FormField* pTarget) override {} 41 CPDF_FormField* pTarget) override {}
42 void OnField_MouseExit(FX_BOOL bModifier, 42 void OnField_MouseExit(FX_BOOL bModifier,
43 FX_BOOL bShift, 43 FX_BOOL bShift,
44 CPDF_FormField* pTarget) override {} 44 CPDF_FormField* pTarget) override {}
45 void OnField_MouseUp(FX_BOOL bModifier, 45 void OnField_MouseUp(FX_BOOL bModifier,
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 void OnScreen_MouseExit(FX_BOOL bModifier, 104 void OnScreen_MouseExit(FX_BOOL bModifier,
105 FX_BOOL bShift, 105 FX_BOOL bShift,
106 CPDFSDK_Annot* pScreen) override {} 106 CPDFSDK_Annot* pScreen) override {}
107 void OnScreen_InView(FX_BOOL bModifier, 107 void OnScreen_InView(FX_BOOL bModifier,
108 FX_BOOL bShift, 108 FX_BOOL bShift,
109 CPDFSDK_Annot* pScreen) override {} 109 CPDFSDK_Annot* pScreen) override {}
110 void OnScreen_OutView(FX_BOOL bModifier, 110 void OnScreen_OutView(FX_BOOL bModifier,
111 FX_BOOL bShift, 111 FX_BOOL bShift,
112 CPDFSDK_Annot* pScreen) override {} 112 CPDFSDK_Annot* pScreen) override {}
113 void OnBookmark_MouseUp(CPDF_Bookmark* pBookMark) override {} 113 void OnBookmark_MouseUp(CPDF_Bookmark* pBookMark) override {}
114 void OnLink_MouseUp(CPDFSDK_Document* pTarget) override {} 114 void OnLink_MouseUp(CPDFSDK_FormFillEnvironment* pFormFillEnv) override {}
115 void OnMenu_Exec(CPDFSDK_Document* pTarget, const CFX_WideString&) override {} 115 void OnMenu_Exec(CPDFSDK_FormFillEnvironment* pFormFillEnv,
116 void OnBatchExec(CPDFSDK_Document* pTarget) override {} 116 const CFX_WideString&) override {}
117 void OnBatchExec(CPDFSDK_FormFillEnvironment* pFormFillEnv) override {}
117 void OnConsole_Exec() override {} 118 void OnConsole_Exec() override {}
118 void OnExternal_Exec() override {} 119 void OnExternal_Exec() override {}
119 }; 120 };
120 121
121 class CJS_RuntimeStub final : public IJS_Runtime { 122 class CJS_RuntimeStub final : public IJS_Runtime {
122 public: 123 public:
123 CJS_RuntimeStub() : m_pDoc(nullptr) {} 124 CJS_RuntimeStub() : m_pDoc(nullptr) {}
124 ~CJS_RuntimeStub() override {} 125 ~CJS_RuntimeStub() override {}
125 126
126 IJS_Context* NewContext() override { 127 IJS_Context* NewContext() override {
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 // static 161 // static
161 void IJS_Runtime::Initialize(unsigned int slot, void* isolate) {} 162 void IJS_Runtime::Initialize(unsigned int slot, void* isolate) {}
162 163
163 // static 164 // static
164 void IJS_Runtime::Destroy() {} 165 void IJS_Runtime::Destroy() {}
165 166
166 // static 167 // static
167 IJS_Runtime* IJS_Runtime::Create(CPDFSDK_FormFillEnvironment* pEnv) { 168 IJS_Runtime* IJS_Runtime::Create(CPDFSDK_FormFillEnvironment* pEnv) {
168 return new CJS_RuntimeStub; 169 return new CJS_RuntimeStub;
169 } 170 }
OLDNEW
« no previous file with comments | « fpdfsdk/javascript/JS_EventHandler.cpp ('k') | fpdfsdk/javascript/PublicMethods.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698