diff options
author | dsinclair <dsinclair@chromium.org> | 2016-10-11 12:38:01 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-10-11 12:38:01 -0700 |
commit | 82e1767b757d96e6b81d3e42b24048a9bea387a8 (patch) | |
tree | b7d14dfcd42ce6acf7a5552be0ff185cf0a9ed58 /fpdfsdk/javascript/cjs_runtime.h | |
parent | 9fa95efa11f211a6faf9b2adb27211f784aee89a (diff) | |
download | pdfium-82e1767b757d96e6b81d3e42b24048a9bea387a8.tar.xz |
Convert IJS_Runtime to CPDFSDK_FormFillEnvironment
This CL changes the use of CPDFSDK_Document to CPDFSDK_FormFillEnvironment.
Review-Url: https://codereview.chromium.org/2394313002
Diffstat (limited to 'fpdfsdk/javascript/cjs_runtime.h')
-rw-r--r-- | fpdfsdk/javascript/cjs_runtime.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/fpdfsdk/javascript/cjs_runtime.h b/fpdfsdk/javascript/cjs_runtime.h index 2b075afa01..1b004ded89 100644 --- a/fpdfsdk/javascript/cjs_runtime.h +++ b/fpdfsdk/javascript/cjs_runtime.h @@ -30,20 +30,19 @@ class CJS_Runtime : public IJS_Runtime, static CJS_Runtime* FromContext(const IJS_Context* cc); static CJS_Runtime* CurrentRuntimeFromIsolate(v8::Isolate* pIsolate); - explicit CJS_Runtime(CPDFSDK_FormFillEnvironment* pApp); + explicit CJS_Runtime(CPDFSDK_FormFillEnvironment* pFormFillEnv); ~CJS_Runtime() override; // IJS_Runtime IJS_Context* NewContext() override; void ReleaseContext(IJS_Context* pContext) override; IJS_Context* GetCurrentContext() override; - void SetReaderDocument(CPDFSDK_Document* pReaderDoc) override; - CPDFSDK_Document* GetReaderDocument() override; + + CPDFSDK_FormFillEnvironment* GetFormFillEnv() const override; + int ExecuteScript(const CFX_WideString& script, CFX_WideString* info) override; - CPDFSDK_FormFillEnvironment* GetReaderEnv() const { return m_pEnv; } - // Returns true if the event isn't already found in the set. bool AddEventToSet(const FieldEvent& event); void RemoveEventFromSet(const FieldEvent& event); @@ -61,10 +60,10 @@ class CJS_Runtime : public IJS_Runtime, private: void DefineJSObjects(); + void SetFormFillEnvToDocument(); std::vector<std::unique_ptr<CJS_Context>> m_ContextArray; - CPDFSDK_FormFillEnvironment* const m_pEnv; - CPDFSDK_Document* m_pDocument; + CPDFSDK_FormFillEnvironment* const m_pFormFillEnv; bool m_bBlocking; bool m_isolateManaged; std::set<FieldEvent> m_FieldEventSet; |