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& class_name, | 36 virtual void SendMessageToAgent(const WebKit::WebString& class_name, |
37 const std::string& method_name, | 37 const WebKit::WebString& method_name, |
38 const std::string& param1, | 38 const WebKit::WebString& param1, |
39 const std::string& param2, | 39 const WebKit::WebString& param2, |
40 const std::string& param3); | 40 const WebKit::WebString& param3); |
41 virtual void SendDebuggerCommandToAgent(const std::string& command); | 41 virtual void SendDebuggerCommandToAgent(const WebKit::WebString& command); |
42 | 42 |
43 virtual void ActivateWindow(); | 43 virtual void ActivateWindow(); |
44 virtual void CloseWindow(); | 44 virtual void CloseWindow(); |
45 virtual void DockWindow(); | 45 virtual void DockWindow(); |
46 virtual void UndockWindow(); | 46 virtual void UndockWindow(); |
47 virtual void ToggleInspectElementMode(bool enabled); | 47 virtual void ToggleInspectElementMode(bool enabled); |
48 | 48 |
49 private: | 49 private: |
50 void OnRpcMessage(const std::string& class_name, | 50 void OnRpcMessage(const std::string& class_name, |
51 const std::string& method_name, | 51 const std::string& method_name, |
52 const std::string& param1, | 52 const std::string& param1, |
53 const std::string& param2, | 53 const std::string& param2, |
54 const std::string& param3); | 54 const std::string& param3); |
55 | 55 |
56 // Sends message to DevToolsAgent. | 56 // Sends message to DevToolsAgent. |
57 void Send(const IPC::Message& tools_agent_message); | 57 void Send(const IPC::Message& tools_agent_message); |
58 | 58 |
59 RenderView* render_view_; // host render view | 59 RenderView* render_view_; // host render view |
60 scoped_ptr<WebDevToolsClient> web_tools_client_; | 60 scoped_ptr<WebDevToolsClient> web_tools_client_; |
61 | 61 |
62 DISALLOW_COPY_AND_ASSIGN(DevToolsClient); | 62 DISALLOW_COPY_AND_ASSIGN(DevToolsClient); |
63 }; | 63 }; |
64 | 64 |
65 #endif // CHROME_RENDERER_DEVTOOLS_CLIENT_H_ | 65 #endif // CHROME_RENDERER_DEVTOOLS_CLIENT_H_ |
OLD | NEW |