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

Side by Side Diff: Source/bindings/core/v8/WindowProxyManager.cpp

Issue 1110433002: Make Isolate as the first argument. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix Compile error Created 5 years, 7 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 unified diff | Download patch
« no previous file with comments | « Source/bindings/core/v8/WindowProxy.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 21 matching lines...) Expand all
32 WindowProxy* WindowProxyManager::windowProxy(DOMWrapperWorld& world) 32 WindowProxy* WindowProxyManager::windowProxy(DOMWrapperWorld& world)
33 { 33 {
34 WindowProxy* windowProxy = nullptr; 34 WindowProxy* windowProxy = nullptr;
35 if (world.isMainWorld()) { 35 if (world.isMainWorld()) {
36 windowProxy = m_windowProxy.get(); 36 windowProxy = m_windowProxy.get();
37 } else { 37 } else {
38 IsolatedWorldMap::iterator iter = m_isolatedWorlds.find(world.worldId()) ; 38 IsolatedWorldMap::iterator iter = m_isolatedWorlds.find(world.worldId()) ;
39 if (iter != m_isolatedWorlds.end()) { 39 if (iter != m_isolatedWorlds.end()) {
40 windowProxy = iter->value.get(); 40 windowProxy = iter->value.get();
41 } else { 41 } else {
42 OwnPtrWillBeRawPtr<WindowProxy> isolatedWorldWindowProxy = WindowPro xy::create(m_frame, world, m_isolate); 42 OwnPtrWillBeRawPtr<WindowProxy> isolatedWorldWindowProxy = WindowPro xy::create(m_isolate, m_frame, world);
43 windowProxy = isolatedWorldWindowProxy.get(); 43 windowProxy = isolatedWorldWindowProxy.get();
44 m_isolatedWorlds.set(world.worldId(), isolatedWorldWindowProxy.relea se()); 44 m_isolatedWorlds.set(world.worldId(), isolatedWorldWindowProxy.relea se());
45 } 45 }
46 } 46 }
47 return windowProxy; 47 return windowProxy;
48 } 48 }
49 49
50 void WindowProxyManager::clearForClose() 50 void WindowProxyManager::clearForClose()
51 { 51 {
52 m_windowProxy->clearForClose(); 52 m_windowProxy->clearForClose();
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 void WindowProxyManager::takeGlobalFrom(WindowProxyManager* other) 86 void WindowProxyManager::takeGlobalFrom(WindowProxyManager* other)
87 { 87 {
88 m_windowProxy->takeGlobalFrom(other->m_windowProxy.get()); 88 m_windowProxy->takeGlobalFrom(other->m_windowProxy.get());
89 for (auto& entry : other->m_isolatedWorlds) 89 for (auto& entry : other->m_isolatedWorlds)
90 windowProxy(entry.value->world())->takeGlobalFrom(entry.value.get()); 90 windowProxy(entry.value->world())->takeGlobalFrom(entry.value.get());
91 } 91 }
92 92
93 WindowProxyManager::WindowProxyManager(Frame& frame) 93 WindowProxyManager::WindowProxyManager(Frame& frame)
94 : m_frame(&frame) 94 : m_frame(&frame)
95 , m_isolate(v8::Isolate::GetCurrent()) 95 , m_isolate(v8::Isolate::GetCurrent())
96 , m_windowProxy(WindowProxy::create(&frame, DOMWrapperWorld::mainWorld(), m_ isolate)) 96 , m_windowProxy(WindowProxy::create(m_isolate, &frame, DOMWrapperWorld::main World()))
97 { 97 {
98 } 98 }
99 99
100 } // namespace blink 100 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/core/v8/WindowProxy.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698