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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/LocalWindowProxy.h

Issue 2724573002: Prepare WindowProxy for using v8::Context::NewRemoteContext(). (Closed)
Patch Set: Remove duplicate v8 include Created 3 years, 10 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/LocalWindowProxy.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/bindings/core/v8/LocalWindowProxy.h
diff --git a/third_party/WebKit/Source/bindings/core/v8/LocalWindowProxy.h b/third_party/WebKit/Source/bindings/core/v8/LocalWindowProxy.h
index 5283aa62f914d04c09825afb277e19e50b2aef6f..c6b8cd6a5f5d94df36aeb3bb6a3fb2cfa29d4432 100644
--- a/third_party/WebKit/Source/bindings/core/v8/LocalWindowProxy.h
+++ b/third_party/WebKit/Source/bindings/core/v8/LocalWindowProxy.h
@@ -62,6 +62,11 @@ class LocalWindowProxy final : public WindowProxy {
// (e.g., after setting docoument.domain).
void updateSecurityOrigin(SecurityOrigin*);
+ ScriptState* getScriptState() const { return m_scriptState.get(); }
+ v8::Local<v8::Context> contextIfInitialized() const {
+ return m_scriptState ? m_scriptState->context() : v8::Local<v8::Context>();
+ }
+
private:
LocalWindowProxy(v8::Isolate*, LocalFrame&, RefPtr<DOMWrapperWorld>);
@@ -74,6 +79,10 @@ class LocalWindowProxy final : public WindowProxy {
// wrapper is not yet associated with the native DOMWindow object.
void createContext();
+ // Associates the window wrapper and its prototype chain with the native
+ // DOMWindow object. Also does some more Window-specific initialization.
+ void setupWindowPrototypeChain();
+
void setSecurityToken(SecurityOrigin*);
// The JavaScript wrapper for the document object is cached on the global
@@ -85,6 +94,8 @@ class LocalWindowProxy final : public WindowProxy {
void updateActivityLogger();
LocalFrame* frame() const { return toLocalFrame(WindowProxy::frame()); }
+
+ RefPtr<ScriptState> m_scriptState;
};
} // namespace blink
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/LocalWindowProxy.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698