OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 CHROME_RENDERER_DEVTOOLS_CLIENT_H_ | 5 #ifndef CHROME_RENDERER_DEVTOOLS_CLIENT_H_ |
6 #define CHROME_RENDERER_DEVTOOLS_CLIENT_H_ | 6 #define CHROME_RENDERER_DEVTOOLS_CLIENT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/scoped_ptr.h" | 10 #include "base/scoped_ptr.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 class DevToolsClient : public WebDevToolsClientDelegate { | 26 class DevToolsClient : public WebDevToolsClientDelegate { |
27 public: | 27 public: |
28 explicit DevToolsClient(RenderView* view); | 28 explicit DevToolsClient(RenderView* view); |
29 virtual ~DevToolsClient(); | 29 virtual ~DevToolsClient(); |
30 | 30 |
31 // Called to possibly handle the incoming IPC message. Returns true if | 31 // Called to possibly handle the incoming IPC message. Returns true if |
32 // handled. Called in render thread. | 32 // handled. Called in render thread. |
33 bool OnMessageReceived(const IPC::Message& message); | 33 bool OnMessageReceived(const IPC::Message& message); |
34 | 34 |
35 // WebDevToolsClient::Delegate implementation | 35 // WebDevToolsClient::Delegate implementation |
36 virtual void SendMessageToAgent(const std::string& raw_msg); | 36 virtual void SendMessageToAgent(const std::string& class_name, |
| 37 const std::string& method_name, |
| 38 const std::string& raw_msg); |
37 virtual void SendDebuggerCommandToAgent(const std::string& command); | 39 virtual void SendDebuggerCommandToAgent(const std::string& command); |
38 virtual void ActivateWindow(); | 40 virtual void ActivateWindow(); |
39 | 41 |
40 private: | 42 private: |
41 void OnRpcMessage(const std::string& raw_msg); | 43 void OnRpcMessage(const std::string& class_name, |
| 44 const std::string& method_name, |
| 45 const std::string& raw_msg); |
42 | 46 |
43 // Sends message to DevToolsAgent. | 47 // Sends message to DevToolsAgent. |
44 void Send(const IPC::Message& tools_agent_message); | 48 void Send(const IPC::Message& tools_agent_message); |
45 | 49 |
46 RenderView* render_view_; // host render view | 50 RenderView* render_view_; // host render view |
47 scoped_ptr<WebDevToolsClient> web_tools_client_; | 51 scoped_ptr<WebDevToolsClient> web_tools_client_; |
48 | 52 |
49 DISALLOW_COPY_AND_ASSIGN(DevToolsClient); | 53 DISALLOW_COPY_AND_ASSIGN(DevToolsClient); |
50 }; | 54 }; |
51 | 55 |
52 #endif // CHROME_RENDERER_DEVTOOLS_CLIENT_H_ | 56 #endif // CHROME_RENDERER_DEVTOOLS_CLIENT_H_ |
OLD | NEW |