OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef CONTENT_RENDERER_DEVTOOLS_AGENT_FILTER_H_ | 5 #ifndef CONTENT_RENDERER_DEVTOOLS_AGENT_FILTER_H_ |
6 #define CONTENT_RENDERER_DEVTOOLS_AGENT_FILTER_H_ | 6 #define CONTENT_RENDERER_DEVTOOLS_AGENT_FILTER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 15 matching lines...) Expand all Loading... |
26 virtual ~DevToolsAgentFilter(); | 26 virtual ~DevToolsAgentFilter(); |
27 | 27 |
28 static void SendRpcMessage(const DevToolsMessageData& data); | 28 static void SendRpcMessage(const DevToolsMessageData& data); |
29 | 29 |
30 private: | 30 private: |
31 // IPC::ChannelProxy::MessageFilter override. Called on IO thread. | 31 // IPC::ChannelProxy::MessageFilter override. Called on IO thread. |
32 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 32 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
33 | 33 |
34 virtual void OnFilterAdded(IPC::Channel* channel) OVERRIDE; | 34 virtual void OnFilterAdded(IPC::Channel* channel) OVERRIDE; |
35 | 35 |
36 static void DispatchMessageLoop(); | |
37 | |
38 // OnDebuggerCommand will be executed in the IO thread so that we can | |
39 // handle debug messages even when v8 is stopped. | |
40 void OnDebuggerCommand(const std::string& command); | |
41 void OnDispatchOnInspectorBackend(const std::string& message); | 36 void OnDispatchOnInspectorBackend(const std::string& message); |
42 | 37 |
43 bool message_handled_; | 38 bool message_handled_; |
44 MessageLoop* render_thread_loop_; | 39 MessageLoop* render_thread_loop_; |
45 | 40 |
46 // Made static to allow DevToolsAgent to use it for replying directly | 41 // Made static to allow DevToolsAgent to use it for replying directly |
47 // from IO thread. | 42 // from IO thread. |
48 static int current_routing_id_; | 43 static int current_routing_id_; |
49 static IPC::Channel* channel_; | 44 static IPC::Channel* channel_; |
50 | 45 |
51 DISALLOW_COPY_AND_ASSIGN(DevToolsAgentFilter); | 46 DISALLOW_COPY_AND_ASSIGN(DevToolsAgentFilter); |
52 }; | 47 }; |
53 | 48 |
54 #endif // CONTENT_RENDERER_DEVTOOLS_AGENT_FILTER_H_ | 49 #endif // CONTENT_RENDERER_DEVTOOLS_AGENT_FILTER_H_ |
OLD | NEW |