diff options
author | dsinclair <dsinclair@chromium.org> | 2016-10-11 10:54:49 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-10-11 10:54:49 -0700 |
commit | 4526faf9d62b64729a232c20ada67690f590abd2 (patch) | |
tree | 76dfeaac09b49fcff44a57da0aa51ead16c515c2 /fpdfsdk/javascript/cjs_context.h | |
parent | 3a7741a2d9391fdbc54900695a980344dddf1692 (diff) | |
download | pdfium-4526faf9d62b64729a232c20ada67690f590abd2.tar.xz |
Remove CPDFSDK_Document from IJS_Context
This CL converts the IJS_Context and implementations over to use
CPDFSDK_FormFillEnvironment instead of CPDFSDK_Document.
Review-Url: https://codereview.chromium.org/2399943002
Diffstat (limited to 'fpdfsdk/javascript/cjs_context.h')
-rw-r--r-- | fpdfsdk/javascript/cjs_context.h | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/fpdfsdk/javascript/cjs_context.h b/fpdfsdk/javascript/cjs_context.h index 74d4e661c3..b845f8b3d3 100644 --- a/fpdfsdk/javascript/cjs_context.h +++ b/fpdfsdk/javascript/cjs_context.h @@ -26,17 +26,17 @@ class CJS_Context : public IJS_Context { FX_BOOL RunScript(const CFX_WideString& script, CFX_WideString* info) override; void OnApp_Init() override; - void OnDoc_Open(CPDFSDK_Document* pDoc, + void OnDoc_Open(CPDFSDK_FormFillEnvironment* pFormFillEnv, const CFX_WideString& strTargetName) override; - void OnDoc_WillPrint(CPDFSDK_Document* pDoc) override; - void OnDoc_DidPrint(CPDFSDK_Document* pDoc) override; - void OnDoc_WillSave(CPDFSDK_Document* pDoc) override; - void OnDoc_DidSave(CPDFSDK_Document* pDoc) override; - void OnDoc_WillClose(CPDFSDK_Document* pDoc) override; - void OnPage_Open(CPDFSDK_Document* pTarget) override; - void OnPage_Close(CPDFSDK_Document* pTarget) override; - void OnPage_InView(CPDFSDK_Document* pTarget) override; - void OnPage_OutView(CPDFSDK_Document* pTarget) override; + void OnDoc_WillPrint(CPDFSDK_FormFillEnvironment* pFormFillEnv) override; + void OnDoc_DidPrint(CPDFSDK_FormFillEnvironment* pFormFillEnv) override; + void OnDoc_WillSave(CPDFSDK_FormFillEnvironment* pFormFillEnv) override; + void OnDoc_DidSave(CPDFSDK_FormFillEnvironment* pFormFillEnv) override; + void OnDoc_WillClose(CPDFSDK_FormFillEnvironment* pFormFillEnv) override; + void OnPage_Open(CPDFSDK_FormFillEnvironment* pFormFillEnv) override; + void OnPage_Close(CPDFSDK_FormFillEnvironment* pFormFillEnv) override; + void OnPage_InView(CPDFSDK_FormFillEnvironment* pFormFillEnv) override; + void OnPage_OutView(CPDFSDK_FormFillEnvironment* pFormFillEnv) override; void OnField_MouseDown(FX_BOOL bModifier, FX_BOOL bShift, CPDF_FormField* pTarget) override; @@ -115,18 +115,17 @@ class CJS_Context : public IJS_Context { FX_BOOL bShift, CPDFSDK_Annot* pScreen) override; void OnBookmark_MouseUp(CPDF_Bookmark* pBookMark) override; - void OnLink_MouseUp(CPDFSDK_Document* pTarget) override; - void OnMenu_Exec(CPDFSDK_Document* pTarget, + void OnLink_MouseUp(CPDFSDK_FormFillEnvironment* pFormFillEnv) override; + void OnMenu_Exec(CPDFSDK_FormFillEnvironment* pFormFillEnv, const CFX_WideString& strTargetName) override; - void OnBatchExec(CPDFSDK_Document* pTarget) override; + void OnBatchExec(CPDFSDK_FormFillEnvironment* pFormFillEnv) override; void OnConsole_Exec() override; void OnExternal_Exec() override; CJS_Runtime* GetJSRuntime() const { return m_pRuntime; } CJS_EventHandler* GetEventHandler() const { return m_pEventHandler.get(); } - CPDFSDK_FormFillEnvironment* GetReaderEnv(); - CPDFSDK_Document* GetReaderDocument(); + CPDFSDK_FormFillEnvironment* GetFormFillEnv(); private: CJS_Runtime* const m_pRuntime; |