| 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 <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "Document.h" | 9 #include "Document.h" |
| 10 #include "EventListener.h" | 10 #include "EventListener.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 using WebCore::Node; | 42 using WebCore::Node; |
| 43 using WebCore::Page; | 43 using WebCore::Page; |
| 44 using WebCore::ScriptObject; | 44 using WebCore::ScriptObject; |
| 45 using WebCore::ScriptState; | 45 using WebCore::ScriptState; |
| 46 using WebCore::ScriptValue; | 46 using WebCore::ScriptValue; |
| 47 using WebCore::String; | 47 using WebCore::String; |
| 48 using WebCore::V8ClassIndex; | 48 using WebCore::V8ClassIndex; |
| 49 using WebCore::V8DOMWrapper; | 49 using WebCore::V8DOMWrapper; |
| 50 using WebCore::V8Proxy; | 50 using WebCore::V8Proxy; |
| 51 using WebKit::WebDataSource; | 51 using WebKit::WebDataSource; |
| 52 using WebKit::WebFrame; |
| 52 using WebKit::WebURLRequest; | 53 using WebKit::WebURLRequest; |
| 53 | 54 |
| 54 WebDevToolsAgentImpl::WebDevToolsAgentImpl( | 55 WebDevToolsAgentImpl::WebDevToolsAgentImpl( |
| 55 WebViewImpl* web_view_impl, | 56 WebViewImpl* web_view_impl, |
| 56 WebDevToolsAgentDelegate* delegate) | 57 WebDevToolsAgentDelegate* delegate) |
| 57 : host_id_(delegate->GetHostId()), | 58 : host_id_(delegate->GetHostId()), |
| 58 delegate_(delegate), | 59 delegate_(delegate), |
| 59 web_view_impl_(web_view_impl), | 60 web_view_impl_(web_view_impl), |
| 60 document_(NULL), | 61 document_(NULL), |
| 61 attached_(false) { | 62 attached_(false) { |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 } | 152 } |
| 152 | 153 |
| 153 void WebDevToolsAgentImpl::DidCommitLoadForFrame( | 154 void WebDevToolsAgentImpl::DidCommitLoadForFrame( |
| 154 WebViewImpl* webview, | 155 WebViewImpl* webview, |
| 155 WebFrame* frame, | 156 WebFrame* frame, |
| 156 bool is_new_navigation) { | 157 bool is_new_navigation) { |
| 157 if (!attached_) { | 158 if (!attached_) { |
| 158 DisposeUtilityContext(); | 159 DisposeUtilityContext(); |
| 159 return; | 160 return; |
| 160 } | 161 } |
| 161 WebDataSource* ds = frame->GetDataSource(); | 162 WebDataSource* ds = frame->dataSource(); |
| 162 const WebURLRequest& request = ds->request(); | 163 const WebURLRequest& request = ds->request(); |
| 163 GURL url = ds->hasUnreachableURL() ? | 164 GURL url = ds->hasUnreachableURL() ? |
| 164 ds->unreachableURL() : | 165 ds->unreachableURL() : |
| 165 request.url(); | 166 request.url(); |
| 166 if (webview->GetMainFrame() == frame) { | 167 if (webview->GetMainFrame() == frame) { |
| 167 tools_agent_delegate_stub_->FrameNavigate( | 168 tools_agent_delegate_stub_->FrameNavigate( |
| 168 url.possibly_invalid_spec()); | 169 url.possibly_invalid_spec()); |
| 169 } | 170 } |
| 170 InspectorController* ic = webview->page()->inspectorController(); | 171 InspectorController* ic = webview->page()->inspectorController(); |
| 171 // Unhide resources panel if necessary. | 172 // Unhide resources panel if necessary. |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 const std::string& command, | 356 const std::string& command, |
| 356 int caller_id) { | 357 int caller_id) { |
| 357 DebuggerAgentManager::ExecuteDebuggerCommand(command, caller_id); | 358 DebuggerAgentManager::ExecuteDebuggerCommand(command, caller_id); |
| 358 } | 359 } |
| 359 | 360 |
| 360 // static | 361 // static |
| 361 void WebDevToolsAgent::SetMessageLoopDispatchHandler( | 362 void WebDevToolsAgent::SetMessageLoopDispatchHandler( |
| 362 MessageLoopDispatchHandler handler) { | 363 MessageLoopDispatchHandler handler) { |
| 363 DebuggerAgentManager::SetMessageLoopDispatchHandler(handler); | 364 DebuggerAgentManager::SetMessageLoopDispatchHandler(handler); |
| 364 } | 365 } |
| OLD | NEW |