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

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

Issue 2630693002: Make ScriptController inherit LocalWindowProxyManager
Patch Set: Add comments Created 3 years, 11 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: third_party/WebKit/Source/bindings/core/v8/ScriptController.h
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptController.h b/third_party/WebKit/Source/bindings/core/v8/ScriptController.h
index 747bea01e12b952305134034d9bd0c4f8714bba2..219d6b693d8e70976e8aca9ce592319c92900832 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptController.h
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptController.h
@@ -47,7 +47,6 @@
namespace blink {
class CompiledScript;
-class DOMWrapperWorld;
class Element;
class KURL;
class ScriptSourceCode;
@@ -61,8 +60,7 @@ enum ReasonForCallingCanExecuteScripts {
NotAboutToExecuteScript
};
-class CORE_EXPORT ScriptController final
- : public GarbageCollected<ScriptController> {
+class CORE_EXPORT ScriptController final : public LocalWindowProxyManager {
Yuki 2017/01/13 10:42:00 If possible, could you elaborate what ScriptContro
dcheng 2017/01/13 18:57:30 Done.
WTF_MAKE_NONCOPYABLE(ScriptController);
public:
@@ -71,16 +69,10 @@ class CORE_EXPORT ScriptController final
DoNotExecuteScriptWhenScriptsDisabled
};
- static ScriptController* create(LocalFrame* frame) {
+ static ScriptController* create(LocalFrame& frame) {
return new ScriptController(frame);
}
- DECLARE_TRACE();
-
- // This returns an initialized window proxy. (If the window proxy is not
- // yet initialized, it's implicitly initialized at the first access.)
- LocalWindowProxy* windowProxy(DOMWrapperWorld&);
-
// Evaluate JavaScript in the main world.
void executeScriptInMainWorld(
const String&,
@@ -132,35 +124,23 @@ class CORE_EXPORT ScriptController final
TextPosition eventHandlerPosition() const;
- void clearWindowProxy();
+ void clearForClose();
+ void clearForNavigation();
void updateDocument();
-
void updateSecurityOrigin(SecurityOrigin*);
- void clearForClose();
-
// Registers a v8 extension to be available on webpages. Will only
// affect v8 contexts initialized after this call. Takes ownership of
// the v8::Extension object passed.
static void registerExtensionIfNeeded(v8::Extension*);
static V8Extensions& registeredExtensions();
- v8::Isolate* isolate() const { return m_windowProxyManager->isolate(); }
-
- LocalWindowProxyManager* getWindowProxyManager() const {
- return m_windowProxyManager.get();
- }
-
private:
- explicit ScriptController(LocalFrame*);
-
- LocalFrame* frame() const { return m_windowProxyManager->frame(); }
+ explicit ScriptController(LocalFrame&);
v8::Local<v8::Value> evaluateScriptInMainWorld(const ScriptSourceCode&,
AccessControlStatus,
ExecuteScriptPolicy);
-
- Member<LocalWindowProxyManager> m_windowProxyManager;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698