| 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 "chrome/renderer/devtools_agent.h" | 5 #include "chrome/renderer/devtools_agent.h" |
| 6 | 6 |
| 7 #include "chrome/common/devtools_messages.h" | 7 #include "chrome/common/devtools_messages.h" |
| 8 #include "chrome/common/render_messages.h" | 8 #include "chrome/common/render_messages.h" |
| 9 #include "chrome/renderer/render_view.h" | 9 #include "chrome/renderer/render_view.h" |
| 10 #include "webkit/api/public/WebDevToolsAgent.h" | 10 #include "webkit/api/public/WebDevToolsAgent.h" |
| 11 #include "webkit/api/public/WebPoint.h" | 11 #include "webkit/api/public/WebPoint.h" |
| 12 #include "webkit/api/public/WebString.h" | 12 #include "webkit/api/public/WebString.h" |
| 13 | 13 |
| 14 using WebKit::WebDevToolsAgent; | 14 using WebKit::WebDevToolsAgent; |
| 15 using WebKit::WebPoint; | 15 using WebKit::WebPoint; |
| 16 using WebKit::WebString; | 16 using WebKit::WebString; |
| 17 using WebKit::WebView; |
| 17 | 18 |
| 18 // static | 19 // static |
| 19 std::map<int, DevToolsAgent*> DevToolsAgent::agent_for_routing_id_; | 20 std::map<int, DevToolsAgent*> DevToolsAgent::agent_for_routing_id_; |
| 20 | 21 |
| 21 DevToolsAgent::DevToolsAgent(int routing_id, RenderView* view) | 22 DevToolsAgent::DevToolsAgent(int routing_id, RenderView* view) |
| 22 : routing_id_(routing_id), | 23 : routing_id_(routing_id), |
| 23 view_(view) { | 24 view_(view) { |
| 24 agent_for_routing_id_[routing_id] = this; | 25 agent_for_routing_id_[routing_id] = this; |
| 25 } | 26 } |
| 26 | 27 |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 web_agent->setApuAgentEnabled(enabled); | 129 web_agent->setApuAgentEnabled(enabled); |
| 129 } | 130 } |
| 130 } | 131 } |
| 131 | 132 |
| 132 WebDevToolsAgent* DevToolsAgent::GetWebAgent() { | 133 WebDevToolsAgent* DevToolsAgent::GetWebAgent() { |
| 133 WebView* web_view = view_->webview(); | 134 WebView* web_view = view_->webview(); |
| 134 if (!web_view) | 135 if (!web_view) |
| 135 return NULL; | 136 return NULL; |
| 136 return web_view->devToolsAgent(); | 137 return web_view->devToolsAgent(); |
| 137 } | 138 } |
| OLD | NEW |