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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 | 127 |
128 for (size_t pos = 0; pos < msg.length(); pos += kMaxMessageChunkSize) { | 128 for (size_t pos = 0; pos < msg.length(); pos += kMaxMessageChunkSize) { |
129 Send(new DevToolsClientMsg_DispatchOnInspectorFrontend( | 129 Send(new DevToolsClientMsg_DispatchOnInspectorFrontend( |
130 routing_id(), | 130 routing_id(), |
131 msg.substr(pos, kMaxMessageChunkSize), | 131 msg.substr(pos, kMaxMessageChunkSize), |
132 pos ? 0 : msg.size())); | 132 pos ? 0 : msg.size())); |
133 } | 133 } |
134 } | 134 } |
135 | 135 |
136 long DevToolsAgent::processId() { | 136 long DevToolsAgent::processId() { |
137 return base::Process::Current().pid(); | 137 return base::GetCurrentProcId(); |
138 } | 138 } |
139 | 139 |
140 int DevToolsAgent::debuggerId() { | 140 int DevToolsAgent::debuggerId() { |
141 return routing_id(); | 141 return routing_id(); |
142 } | 142 } |
143 | 143 |
144 void DevToolsAgent::saveAgentRuntimeState( | 144 void DevToolsAgent::saveAgentRuntimeState( |
145 const blink::WebString& state) { | 145 const blink::WebString& state) { |
146 Send(new DevToolsHostMsg_SaveAgentRuntimeState(routing_id(), state.utf8())); | 146 Send(new DevToolsHostMsg_SaveAgentRuntimeState(routing_id(), state.utf8())); |
147 } | 147 } |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 if (!web_view) | 367 if (!web_view) |
368 return NULL; | 368 return NULL; |
369 return web_view->devToolsAgent(); | 369 return web_view->devToolsAgent(); |
370 } | 370 } |
371 | 371 |
372 bool DevToolsAgent::IsAttached() { | 372 bool DevToolsAgent::IsAttached() { |
373 return is_attached_; | 373 return is_attached_; |
374 } | 374 } |
375 | 375 |
376 } // namespace content | 376 } // namespace content |
OLD | NEW |