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

Unified Diff: content/renderer/devtools_agent_filter.cc

Issue 10071038: RefCounted types should not have public destructors, content/browser part 2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Copyright bump Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/devtools_agent_filter.h ('k') | content/renderer/gpu/compositor_thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/devtools_agent_filter.cc
diff --git a/content/renderer/devtools_agent_filter.cc b/content/renderer/devtools_agent_filter.cc
index 4e42ce3c59afcc5bc1193e336f8a5b6f64919dcd..312e5996c8b635aff4d4233b0c6187d9eafeae56 100644
--- a/content/renderer/devtools_agent_filter.cc
+++ b/content/renderer/devtools_agent_filter.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -21,7 +21,8 @@ class MessageImpl : public WebDevToolsAgent::MessageDescriptor {
public:
MessageImpl(const std::string& message, int host_id)
: msg(message),
- host_id(host_id) {}
+ host_id(host_id) {
+ }
virtual ~MessageImpl() {}
virtual WebDevToolsAgent* agent() {
DevToolsAgent* agent = DevToolsAgent::FromHostId(host_id);
@@ -35,25 +36,21 @@ class MessageImpl : public WebDevToolsAgent::MessageDescriptor {
int host_id;
};
-}
+// Made static to allow DevToolsAgent to use it for replying directly
+// from IO thread.
+int g_current_routing_id = 0;
-// static
-IPC::Channel* DevToolsAgentFilter::channel_ = NULL;
-// static
-int DevToolsAgentFilter::current_routing_id_ = 0;
+} // namespace
DevToolsAgentFilter::DevToolsAgentFilter()
: message_handled_(false),
render_thread_loop_(MessageLoop::current()) {
}
-DevToolsAgentFilter::~DevToolsAgentFilter() {
-}
-
bool DevToolsAgentFilter::OnMessageReceived(const IPC::Message& message) {
// Dispatch debugger commands directly from IO.
message_handled_ = true;
- current_routing_id_ = message.routing_id();
+ g_current_routing_id = message.routing_id();
IPC_BEGIN_MESSAGE_MAP(DevToolsAgentFilter, message)
IPC_MESSAGE_HANDLER(DevToolsAgentMsg_DispatchOnInspectorBackend,
OnDispatchOnInspectorBackend)
@@ -62,9 +59,7 @@ bool DevToolsAgentFilter::OnMessageReceived(const IPC::Message& message) {
return message_handled_;
}
-void DevToolsAgentFilter::OnFilterAdded(IPC::Channel* channel) {
- channel_ = channel;
-}
+DevToolsAgentFilter::~DevToolsAgentFilter() {}
void DevToolsAgentFilter::OnDispatchOnInspectorBackend(
const std::string& message) {
@@ -74,7 +69,7 @@ void DevToolsAgentFilter::OnDispatchOnInspectorBackend(
return;
}
WebDevToolsAgent::interruptAndDispatch(
- new MessageImpl(message, current_routing_id_));
+ new MessageImpl(message, g_current_routing_id));
render_thread_loop_->PostTask(
FROM_HERE, base::Bind(&WebDevToolsAgent::processPendingMessages));
« no previous file with comments | « content/renderer/devtools_agent_filter.h ('k') | content/renderer/gpu/compositor_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698