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

Side by Side Diff: content/renderer/devtools_agent_filter.h

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 unified diff | Download patch
« no previous file with comments | « content/renderer/devtools_agent.cc ('k') | content/renderer/devtools_agent_filter.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_RENDERER_DEVTOOLS_AGENT_FILTER_H_
6 #define CONTENT_RENDERER_DEVTOOLS_AGENT_FILTER_H_
7
8 #include <string>
9
10 #include "ipc/ipc_channel_proxy.h"
11
12 class MessageLoop;
13 struct DevToolsMessageData;
14
15 namespace content {
16
17 // DevToolsAgentFilter is registered as an IPC filter in order to be able to
18 // dispatch messages while on the IO thread. The reason for that is that while
19 // debugging, Render thread is being held by the v8 and hence no messages
20 // are being dispatched there. While holding the thread in a tight loop,
21 // v8 provides thread-safe Api for controlling debugger. In our case v8's Api
22 // is being used from this communication agent on the IO thread.
23 class DevToolsAgentFilter : public IPC::ChannelProxy::MessageFilter {
24 public:
25 // There is a single instance of this class instantiated by the RenderThread.
26 DevToolsAgentFilter();
27
28 static void SendRpcMessage(const DevToolsMessageData& data);
29
30 // IPC::ChannelProxy::MessageFilter override. Called on IO thread.
31 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
32
33 protected:
34 virtual ~DevToolsAgentFilter();
35
36 private:
37 void OnDispatchOnInspectorBackend(const std::string& message);
38
39 bool message_handled_;
40 MessageLoop* render_thread_loop_;
41 int current_routing_id_;
42
43 DISALLOW_COPY_AND_ASSIGN(DevToolsAgentFilter);
44 };
45
46 } // namespace content
47
48 #endif // CONTENT_RENDERER_DEVTOOLS_AGENT_FILTER_H_
OLDNEW
« no previous file with comments | « content/renderer/devtools_agent.cc ('k') | content/renderer/devtools_agent_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698