| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/renderer/devtools/devtools_agent.h" | 5 #include "content/renderer/devtools/devtools_agent.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 | 8 |
| 9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
| 10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
| 11 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
| 12 #include "base/process/process.h" | 12 #include "base/process/process_handle.h" |
| 13 #include "base/strings/string_number_conversions.h" | 13 #include "base/strings/string_number_conversions.h" |
| 14 #include "content/common/devtools_messages.h" | 14 #include "content/common/devtools_messages.h" |
| 15 #include "content/common/frame_messages.h" | 15 #include "content/common/frame_messages.h" |
| 16 #include "content/common/gpu/gpu_messages.h" | 16 #include "content/common/gpu/gpu_messages.h" |
| 17 #include "content/common/view_messages.h" | 17 #include "content/common/view_messages.h" |
| 18 #include "content/renderer/devtools/devtools_agent_filter.h" | 18 #include "content/renderer/devtools/devtools_agent_filter.h" |
| 19 #include "content/renderer/devtools/devtools_client.h" | 19 #include "content/renderer/devtools/devtools_client.h" |
| 20 #include "content/renderer/render_thread_impl.h" | 20 #include "content/renderer/render_thread_impl.h" |
| 21 #include "content/renderer/render_view_impl.h" | 21 #include "content/renderer/render_view_impl.h" |
| 22 #include "third_party/WebKit/public/platform/WebPoint.h" | 22 #include "third_party/WebKit/public/platform/WebPoint.h" |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 return handled; | 114 return handled; |
| 115 } | 115 } |
| 116 | 116 |
| 117 void DevToolsAgent::sendMessageToInspectorFrontend( | 117 void DevToolsAgent::sendMessageToInspectorFrontend( |
| 118 const blink::WebString& message) { | 118 const blink::WebString& message) { |
| 119 Send(new DevToolsClientMsg_DispatchOnInspectorFrontend(routing_id(), | 119 Send(new DevToolsClientMsg_DispatchOnInspectorFrontend(routing_id(), |
| 120 message.utf8())); | 120 message.utf8())); |
| 121 } | 121 } |
| 122 | 122 |
| 123 long DevToolsAgent::processId() { | 123 long DevToolsAgent::processId() { |
| 124 return base::Process::Current().pid(); | 124 return base::GetCurrentProcId(); |
| 125 } | 125 } |
| 126 | 126 |
| 127 int DevToolsAgent::debuggerId() { | 127 int DevToolsAgent::debuggerId() { |
| 128 return routing_id(); | 128 return routing_id(); |
| 129 } | 129 } |
| 130 | 130 |
| 131 void DevToolsAgent::saveAgentRuntimeState( | 131 void DevToolsAgent::saveAgentRuntimeState( |
| 132 const blink::WebString& state) { | 132 const blink::WebString& state) { |
| 133 Send(new DevToolsHostMsg_SaveAgentRuntimeState(routing_id(), state.utf8())); | 133 Send(new DevToolsHostMsg_SaveAgentRuntimeState(routing_id(), state.utf8())); |
| 134 } | 134 } |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 if (!web_view) | 354 if (!web_view) |
| 355 return NULL; | 355 return NULL; |
| 356 return web_view->devToolsAgent(); | 356 return web_view->devToolsAgent(); |
| 357 } | 357 } |
| 358 | 358 |
| 359 bool DevToolsAgent::IsAttached() { | 359 bool DevToolsAgent::IsAttached() { |
| 360 return is_attached_; | 360 return is_attached_; |
| 361 } | 361 } |
| 362 | 362 |
| 363 } // namespace content | 363 } // namespace content |
| OLD | NEW |