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

Unified Diff: content/renderer/devtools_agent_filter.cc

Issue 11630004: DevTools: rename debugger/ to devtools/, move DevTools files into content/renderer/devtools. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: For landing Created 8 years 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/devtools_client.h » ('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
deleted file mode 100644
index f640c590666cecf1e1a714077fb048296ccff097..0000000000000000000000000000000000000000
--- a/content/renderer/devtools_agent_filter.cc
+++ /dev/null
@@ -1,77 +0,0 @@
-// 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.
-
-#include "content/renderer/devtools_agent_filter.h"
-
-#include "base/bind.h"
-#include "base/message_loop.h"
-#include "content/common/devtools_messages.h"
-#include "content/renderer/devtools_agent.h"
-#include "content/renderer/plugin_channel_host.h"
-#include "third_party/WebKit/Source/WebKit/chromium/public/WebDevToolsAgent.h"
-#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
-
-using WebKit::WebDevToolsAgent;
-using WebKit::WebString;
-
-namespace content {
-
-namespace {
-
-class MessageImpl : public WebDevToolsAgent::MessageDescriptor {
- public:
- MessageImpl(const std::string& message, int host_id)
- : msg(message),
- host_id(host_id) {
- }
- virtual ~MessageImpl() {}
- virtual WebDevToolsAgent* agent() {
- DevToolsAgent* agent = DevToolsAgent::FromHostId(host_id);
- if (!agent)
- return 0;
- return agent->GetWebAgent();
- }
- virtual WebString message() { return WebString::fromUTF8(msg); }
- private:
- std::string msg;
- int host_id;
-};
-
-} // namespace
-
-DevToolsAgentFilter::DevToolsAgentFilter()
- : message_handled_(false),
- render_thread_loop_(MessageLoop::current()),
- current_routing_id_(0) {
-}
-
-bool DevToolsAgentFilter::OnMessageReceived(const IPC::Message& message) {
- // Dispatch debugger commands directly from IO.
- message_handled_ = true;
- current_routing_id_ = message.routing_id();
- IPC_BEGIN_MESSAGE_MAP(DevToolsAgentFilter, message)
- IPC_MESSAGE_HANDLER(DevToolsAgentMsg_DispatchOnInspectorBackend,
- OnDispatchOnInspectorBackend)
- IPC_MESSAGE_UNHANDLED(message_handled_ = false)
- IPC_END_MESSAGE_MAP()
- return message_handled_;
-}
-
-DevToolsAgentFilter::~DevToolsAgentFilter() {}
-
-void DevToolsAgentFilter::OnDispatchOnInspectorBackend(
- const std::string& message) {
- if (!WebDevToolsAgent::shouldInterruptForMessage(
- WebString::fromUTF8(message))) {
- message_handled_ = false;
- return;
- }
- WebDevToolsAgent::interruptAndDispatch(
- new MessageImpl(message, current_routing_id_));
-
- render_thread_loop_->PostTask(
- FROM_HERE, base::Bind(&WebDevToolsAgent::processPendingMessages));
-}
-
-} // namespace content
« no previous file with comments | « content/renderer/devtools_agent_filter.h ('k') | content/renderer/devtools_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698