Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Side by Side Diff: trunk/src/content/renderer/devtools/devtools_agent.cc

Issue 177713006: Revert 251563 "Move browser initiated navigation from RenderView..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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.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"
16 #include "content/common/gpu/gpu_messages.h" 15 #include "content/common/gpu/gpu_messages.h"
17 #include "content/common/view_messages.h" 16 #include "content/common/view_messages.h"
18 #include "content/renderer/devtools/devtools_agent_filter.h" 17 #include "content/renderer/devtools/devtools_agent_filter.h"
19 #include "content/renderer/devtools/devtools_client.h" 18 #include "content/renderer/devtools/devtools_client.h"
20 #include "content/renderer/render_thread_impl.h" 19 #include "content/renderer/render_thread_impl.h"
21 #include "content/renderer/render_view_impl.h" 20 #include "content/renderer/render_view_impl.h"
22 #include "third_party/WebKit/public/platform/WebPoint.h" 21 #include "third_party/WebKit/public/platform/WebPoint.h"
23 #include "third_party/WebKit/public/platform/WebString.h" 22 #include "third_party/WebKit/public/platform/WebString.h"
24 #include "third_party/WebKit/public/web/WebConsoleMessage.h" 23 #include "third_party/WebKit/public/web/WebConsoleMessage.h"
25 #include "third_party/WebKit/public/web/WebConsoleMessage.h" 24 #include "third_party/WebKit/public/web/WebConsoleMessage.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 IPC_MESSAGE_HANDLER(DevToolsAgentMsg_DispatchOnInspectorBackend, 98 IPC_MESSAGE_HANDLER(DevToolsAgentMsg_DispatchOnInspectorBackend,
100 OnDispatchOnInspectorBackend) 99 OnDispatchOnInspectorBackend)
101 IPC_MESSAGE_HANDLER(DevToolsAgentMsg_InspectElement, OnInspectElement) 100 IPC_MESSAGE_HANDLER(DevToolsAgentMsg_InspectElement, OnInspectElement)
102 IPC_MESSAGE_HANDLER(DevToolsAgentMsg_AddMessageToConsole, 101 IPC_MESSAGE_HANDLER(DevToolsAgentMsg_AddMessageToConsole,
103 OnAddMessageToConsole) 102 OnAddMessageToConsole)
104 IPC_MESSAGE_HANDLER(DevToolsAgentMsg_GpuTasksChunk, OnGpuTasksChunk) 103 IPC_MESSAGE_HANDLER(DevToolsAgentMsg_GpuTasksChunk, OnGpuTasksChunk)
105 IPC_MESSAGE_HANDLER(DevToolsMsg_SetupDevToolsClient, OnSetupDevToolsClient) 104 IPC_MESSAGE_HANDLER(DevToolsMsg_SetupDevToolsClient, OnSetupDevToolsClient)
106 IPC_MESSAGE_UNHANDLED(handled = false) 105 IPC_MESSAGE_UNHANDLED(handled = false)
107 IPC_END_MESSAGE_MAP() 106 IPC_END_MESSAGE_MAP()
108 107
109 if (message.type() == FrameMsg_Navigate::ID || 108 if (message.type() == ViewMsg_Navigate::ID ||
110 message.type() == ViewMsg_Close::ID) 109 message.type() == ViewMsg_Close::ID)
111 ContinueProgram(); // Don't want to swallow the message. 110 ContinueProgram(); // Don't want to swallow the message.
112 111
113 return handled; 112 return handled;
114 } 113 }
115 114
116 void DevToolsAgent::sendMessageToInspectorFrontend( 115 void DevToolsAgent::sendMessageToInspectorFrontend(
117 const blink::WebString& message) { 116 const blink::WebString& message) {
118 Send(new DevToolsClientMsg_DispatchOnInspectorFrontend(routing_id(), 117 Send(new DevToolsClientMsg_DispatchOnInspectorFrontend(routing_id(),
119 message.utf8())); 118 message.utf8()));
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 if (!web_view) 339 if (!web_view)
341 return NULL; 340 return NULL;
342 return web_view->devToolsAgent(); 341 return web_view->devToolsAgent();
343 } 342 }
344 343
345 bool DevToolsAgent::IsAttached() { 344 bool DevToolsAgent::IsAttached() {
346 return is_attached_; 345 return is_attached_;
347 } 346 }
348 347
349 } // namespace content 348 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698