| 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..83b6f32f996f59631dbce5089c3b592db660db0f
|
| --- /dev/null
|
| +++ b/Source/bindings/core/v8/WindowProxyManager.h
|
| @@ -0,0 +1,56 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// 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 final : public NoBaseWillBeGarbageCollectedFinalized<WindowProxyManager> {
|
| +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
|
|
|