| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |