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

Unified Diff: fpdfsdk/javascript/cjs_runtime.h

Issue 2394313002: Convert IJS_Runtime to CPDFSDK_FormFillEnvironment (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 side-by-side diff with in-line comments
Download patch
Index: fpdfsdk/javascript/cjs_runtime.h
diff --git a/fpdfsdk/javascript/cjs_runtime.h b/fpdfsdk/javascript/cjs_runtime.h
index 2b075afa0181f8adaf1aceb93b84c39eb05432c3..1b004ded8945629929a134b4e16305ececf3b94b 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;

Powered by Google App Engine
This is Rietveld 408576698