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

Side by Side Diff: webkit/glue/devtools/debugger_agent_manager.cc

Issue 113085: Split V8Proxy::retrieveActiveFrame() into two methods. (Closed)
Patch Set: Darin feedback Created 11 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 | « chrome/renderer/loadtimes_extension_bindings.cc ('k') | webkit/glue/webdevtoolsclient_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 6
7 #include "Frame.h" 7 #include "Frame.h"
8 #include "PageGroupLoadDeferrer.h" 8 #include "PageGroupLoadDeferrer.h"
9 #include "v8_proxy.h" 9 #include "v8_proxy.h"
10 #include <wtf/HashSet.h> 10 #include <wtf/HashSet.h>
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 SendCommandToV8(continue_cmd, new CallerIdWrapper()); 228 SendCommandToV8(continue_cmd, new CallerIdWrapper());
229 } 229 }
230 230
231 // static 231 // static
232 DebuggerAgentImpl* DebuggerAgentManager::FindAgentForCurrentV8Context() { 232 DebuggerAgentImpl* DebuggerAgentManager::FindAgentForCurrentV8Context() {
233 if (!attached_agents_) { 233 if (!attached_agents_) {
234 return NULL; 234 return NULL;
235 } 235 }
236 DCHECK(!attached_agents_->isEmpty()); 236 DCHECK(!attached_agents_->isEmpty());
237 237
238 WebCore::Frame* frame = WebCore::V8Proxy::retrieveActiveFrame(); 238 WebCore::Frame* frame = WebCore::V8Proxy::retrieveFrameForEnteredContext();
239 if (!frame) { 239 if (!frame) {
240 return NULL; 240 return NULL;
241 } 241 }
242 WebCore::Page* page = frame->page(); 242 WebCore::Page* page = frame->page();
243 for (AttachedAgentsSet::iterator it = attached_agents_->begin(); 243 for (AttachedAgentsSet::iterator it = attached_agents_->begin();
244 it != attached_agents_->end(); ++it) { 244 it != attached_agents_->end(); ++it) {
245 if ((*it)->GetPage() == page) { 245 if ((*it)->GetPage() == page) {
246 return *it; 246 return *it;
247 } 247 }
248 } 248 }
249 return NULL; 249 return NULL;
250 } 250 }
251 251
252 DebuggerAgentImpl* DebuggerAgentManager::FindDebuggerAgentForToolsAgent( 252 DebuggerAgentImpl* DebuggerAgentManager::FindDebuggerAgentForToolsAgent(
253 int caller_id) { 253 int caller_id) {
254 for (AttachedAgentsSet::iterator it = attached_agents_->begin(); 254 for (AttachedAgentsSet::iterator it = attached_agents_->begin();
255 it != attached_agents_->end(); ++it) { 255 it != attached_agents_->end(); ++it) {
256 if ((*it)->webdevtools_agent()->host_id() == caller_id) { 256 if ((*it)->webdevtools_agent()->host_id() == caller_id) {
257 return *it; 257 return *it;
258 } 258 }
259 } 259 }
260 return NULL; 260 return NULL;
261 } 261 }
OLDNEW
« no previous file with comments | « chrome/renderer/loadtimes_extension_bindings.cc ('k') | webkit/glue/webdevtoolsclient_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698