| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "config.h" | 5 #include "config.h" |
| 6 #include "bindings/core/v8/WindowProxyManager.h" | 6 #include "bindings/core/v8/WindowProxyManager.h" |
| 7 | 7 |
| 8 #include "bindings/core/v8/DOMWrapperWorld.h" | 8 #include "bindings/core/v8/DOMWrapperWorld.h" |
| 9 #include "bindings/core/v8/WindowProxy.h" | 9 #include "bindings/core/v8/WindowProxy.h" |
| 10 #include "core/frame/Frame.h" | 10 #include "core/frame/Frame.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 | 22 |
| 23 DEFINE_TRACE(WindowProxyManager) | 23 DEFINE_TRACE(WindowProxyManager) |
| 24 { | 24 { |
| 25 #if ENABLE(OILPAN) | 25 #if ENABLE(OILPAN) |
| 26 visitor->trace(m_frame); | 26 visitor->trace(m_frame); |
| 27 visitor->trace(m_windowProxy); | 27 visitor->trace(m_windowProxy); |
| 28 visitor->trace(m_isolatedWorlds); | 28 visitor->trace(m_isolatedWorlds); |
| 29 #endif | 29 #endif |
| 30 } | 30 } |
| 31 | 31 |
| 32 Frame* WindowProxyManager::frame() const | |
| 33 { | |
| 34 return m_frame.get(); | |
| 35 } | |
| 36 | |
| 37 WindowProxy* WindowProxyManager::mainWorldProxy() const | |
| 38 { | |
| 39 return m_windowProxy.get(); | |
| 40 } | |
| 41 | |
| 42 WindowProxy* WindowProxyManager::windowProxy(DOMWrapperWorld& world) | 32 WindowProxy* WindowProxyManager::windowProxy(DOMWrapperWorld& world) |
| 43 { | 33 { |
| 44 WindowProxy* windowProxy = nullptr; | 34 WindowProxy* windowProxy = nullptr; |
| 45 if (world.isMainWorld()) { | 35 if (world.isMainWorld()) { |
| 46 windowProxy = m_windowProxy.get(); | 36 windowProxy = m_windowProxy.get(); |
| 47 } else { | 37 } else { |
| 48 IsolatedWorldMap::iterator iter = m_isolatedWorlds.find(world.worldId())
; | 38 IsolatedWorldMap::iterator iter = m_isolatedWorlds.find(world.worldId())
; |
| 49 if (iter != m_isolatedWorlds.end()) { | 39 if (iter != m_isolatedWorlds.end()) { |
| 50 windowProxy = iter->value.get(); | 40 windowProxy = iter->value.get(); |
| 51 } else { | 41 } else { |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 } | 97 } |
| 108 | 98 |
| 109 WindowProxyManager::WindowProxyManager(Frame& frame) | 99 WindowProxyManager::WindowProxyManager(Frame& frame) |
| 110 : m_frame(&frame) | 100 : m_frame(&frame) |
| 111 , m_isolate(v8::Isolate::GetCurrent()) | 101 , m_isolate(v8::Isolate::GetCurrent()) |
| 112 , m_windowProxy(WindowProxy::create(m_isolate, &frame, DOMWrapperWorld::main
World())) | 102 , m_windowProxy(WindowProxy::create(m_isolate, &frame, DOMWrapperWorld::main
World())) |
| 113 { | 103 { |
| 114 } | 104 } |
| 115 | 105 |
| 116 } // namespace blink | 106 } // namespace blink |
| OLD | NEW |