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

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

Issue 383123003: DevTools: Do not set processId on WebDevToolsAgent explicitly now that we ask it from client. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 DevToolsAgent::DevToolsAgent(RenderViewImpl* render_view) 76 DevToolsAgent::DevToolsAgent(RenderViewImpl* render_view)
77 : RenderViewObserver(render_view), 77 : RenderViewObserver(render_view),
78 is_attached_(false), 78 is_attached_(false),
79 is_devtools_client_(false), 79 is_devtools_client_(false),
80 gpu_route_id_(MSG_ROUTING_NONE), 80 gpu_route_id_(MSG_ROUTING_NONE),
81 paused_in_mouse_move_(false) { 81 paused_in_mouse_move_(false) {
82 g_agent_for_routing_id.Get()[routing_id()] = this; 82 g_agent_for_routing_id.Get()[routing_id()] = this;
83 83
84 render_view->webview()->setDevToolsAgentClient(this); 84 render_view->webview()->setDevToolsAgentClient(this);
85 render_view->webview()->devToolsAgent()->setProcessId(
86 base::Process::Current().pid());
87 } 85 }
88 86
89 DevToolsAgent::~DevToolsAgent() { 87 DevToolsAgent::~DevToolsAgent() {
90 g_agent_for_routing_id.Get().erase(routing_id()); 88 g_agent_for_routing_id.Get().erase(routing_id());
91 resetTraceEventCallback(); 89 resetTraceEventCallback();
92 } 90 }
93 91
94 // Called on the Renderer thread. 92 // Called on the Renderer thread.
95 bool DevToolsAgent::OnMessageReceived(const IPC::Message& message) { 93 bool DevToolsAgent::OnMessageReceived(const IPC::Message& message) {
96 bool handled = true; 94 bool handled = true;
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 if (!web_view) 370 if (!web_view)
373 return NULL; 371 return NULL;
374 return web_view->devToolsAgent(); 372 return web_view->devToolsAgent();
375 } 373 }
376 374
377 bool DevToolsAgent::IsAttached() { 375 bool DevToolsAgent::IsAttached() {
378 return is_attached_; 376 return is_attached_;
379 } 377 }
380 378
381 } // namespace content 379 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698