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 |