summaryrefslogtreecommitdiff
path: root/fpdfsdk/javascript/JS_Runtime_Stub.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-02-16 11:49:55 -0800
committerChromium commit bot <commit-bot@chromium.org>2017-02-16 20:23:48 +0000
commitd6ae2afa821c87e84790d5c04bbc172a7b12f08f (patch)
tree10beb72deaffca61ccc54a3fb49ea0d9636579bb /fpdfsdk/javascript/JS_Runtime_Stub.cpp
parent49f7deb494064351c72ef4d31577e04f634e63f3 (diff)
downloadpdfium-d6ae2afa821c87e84790d5c04bbc172a7b12f08f.tar.xz
Rename IJS_Context to IJS_EventContext.
Prevents confusion with v8::Context, which is wrapped by a different IJS_ class. Change-Id: Iff75809e65015c0f810294de1f0d8ecf963150a3 Reviewed-on: https://pdfium-review.googlesource.com/2751 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk/javascript/JS_Runtime_Stub.cpp')
-rw-r--r--fpdfsdk/javascript/JS_Runtime_Stub.cpp24
1 files changed, 13 insertions, 11 deletions
diff --git a/fpdfsdk/javascript/JS_Runtime_Stub.cpp b/fpdfsdk/javascript/JS_Runtime_Stub.cpp
index 96148d83a0..12edc1be3f 100644
--- a/fpdfsdk/javascript/JS_Runtime_Stub.cpp
+++ b/fpdfsdk/javascript/JS_Runtime_Stub.cpp
@@ -6,16 +6,16 @@
#include <memory>
-#include "fpdfsdk/javascript/ijs_context.h"
+#include "fpdfsdk/javascript/ijs_event_context.h"
#include "fpdfsdk/javascript/ijs_runtime.h"
#include "third_party/base/ptr_util.h"
-class CJS_ContextStub final : public IJS_Context {
+class CJS_EventContextStub final : public IJS_EventContext {
public:
- CJS_ContextStub() {}
- ~CJS_ContextStub() override {}
+ CJS_EventContextStub() {}
+ ~CJS_EventContextStub() override {}
- // IJS_Context:
+ // IJS_EventContext:
bool RunScript(const CFX_WideString& script, CFX_WideString* info) override {
return false;
}
@@ -124,14 +124,16 @@ class CJS_RuntimeStub final : public IJS_Runtime {
: m_pFormFillEnv(pFormFillEnv) {}
~CJS_RuntimeStub() override {}
- IJS_Context* NewContext() override {
+ IJS_EventContext* NewEventContext() override {
if (!m_pContext)
- m_pContext = pdfium::MakeUnique<CJS_ContextStub>();
- return GetCurrentContext();
+ m_pContext = pdfium::MakeUnique<CJS_EventContextStub>();
+ return GetCurrentEventContext();
}
- IJS_Context* GetCurrentContext() override { return m_pContext.get(); }
- void ReleaseContext(IJS_Context* pContext) override {}
+ IJS_EventContext* GetCurrentEventContext() override {
+ return m_pContext.get();
+ }
+ void ReleaseEventContext(IJS_EventContext* pContext) override {}
CPDFSDK_FormFillEnvironment* GetFormFillEnv() const override {
return m_pFormFillEnv;
@@ -154,7 +156,7 @@ class CJS_RuntimeStub final : public IJS_Runtime {
protected:
CPDFSDK_FormFillEnvironment* m_pFormFillEnv;
- std::unique_ptr<CJS_ContextStub> m_pContext;
+ std::unique_ptr<CJS_EventContextStub> m_pContext;
};
// static