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

Unified Diff: Source/bindings/core/v8/WindowProxyManager.h

Issue 854453003: Revert of Revert of Reland factor out window proxy management portions of ScriptController. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase and deflake test Created 5 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
« no previous file with comments | « Source/bindings/core/v8/WindowProxy.cpp ('k') | Source/bindings/core/v8/WindowProxyManager.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/WindowProxyManager.h
diff --git a/Source/bindings/core/v8/WindowProxyManager.h b/Source/bindings/core/v8/WindowProxyManager.h
new file mode 100644
index 0000000000000000000000000000000000000000..026a87327ee64562a7de01ff5475be92524d099a
--- /dev/null
+++ b/Source/bindings/core/v8/WindowProxyManager.h
@@ -0,0 +1,56 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
haraken 2015/01/16 04:55:01 2015
dcheng 2015/01/17 00:33:05 Done.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef WindowProxyManager_h
+#define WindowProxyManager_h
+
+#include "platform/heap/Handle.h"
+#include "wtf/Vector.h"
+#include <utility>
+#include <v8.h>
+
+namespace blink {
+
+class DOMWrapperWorld;
+class Frame;
+class ScriptState;
+class SecurityOrigin;
+class WindowProxy;
+
+class WindowProxyManager : public NoBaseWillBeGarbageCollectedFinalized<WindowProxyManager> {
haraken 2015/01/16 04:55:01 Add final.
dcheng 2015/01/17 00:33:05 Done.
+public:
+ static PassOwnPtrWillBeRawPtr<WindowProxyManager> create(Frame*);
+
+ ~WindowProxyManager();
+ void trace(Visitor*);
+
+ Frame* frame() const { return m_frame.get(); }
+ v8::Isolate* isolate() const { return m_isolate; }
+ WindowProxy* mainWorldProxy() const { return m_windowProxy.get(); }
+
+ WindowProxy* windowProxy(DOMWrapperWorld&);
+
+ void clearForClose();
+ void clearForNavigation();
+
+ // For devtools:
+ WindowProxy* existingWindowProxy(DOMWrapperWorld&);
+ void collectIsolatedContexts(Vector<std::pair<ScriptState*, SecurityOrigin*>>&);
+ void setWorldDebugId(int worldId, int debuggerId);
+
+private:
+ typedef WillBeHeapHashMap<int, OwnPtrWillBeMember<WindowProxy> > IsolatedWorldMap;
+
+ explicit WindowProxyManager(Frame*);
+
+ RawPtrWillBeMember<Frame> m_frame;
+ v8::Isolate* const m_isolate;
+
+ const OwnPtrWillBeMember<WindowProxy> m_windowProxy;
+ IsolatedWorldMap m_isolatedWorlds;
+};
+
+} // namespace blink
+
+#endif // WindowProxyManager_h
« no previous file with comments | « Source/bindings/core/v8/WindowProxy.cpp ('k') | Source/bindings/core/v8/WindowProxyManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698