| 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 17 matching lines...) Expand all Loading... |
| 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& raw_msg); |
| 37 virtual void SendDebuggerCommandToAgent(const std::string& command); | 37 virtual void SendDebuggerCommandToAgent(const std::string& command); |
| 38 virtual void ActivateWindow(); |
| 38 | 39 |
| 39 private: | 40 private: |
| 40 void OnRpcMessage(const std::string& raw_msg); | 41 void OnRpcMessage(const std::string& raw_msg); |
| 41 | 42 |
| 42 // Sends message to DevToolsAgent. | 43 // Sends message to DevToolsAgent. |
| 43 void Send(const IPC::Message& tools_agent_message); | 44 void Send(const IPC::Message& tools_agent_message); |
| 44 | 45 |
| 45 RenderView* render_view_; // host render view | 46 RenderView* render_view_; // host render view |
| 46 scoped_ptr<WebDevToolsClient> web_tools_client_; | 47 scoped_ptr<WebDevToolsClient> web_tools_client_; |
| 47 | 48 |
| 48 DISALLOW_COPY_AND_ASSIGN(DevToolsClient); | 49 DISALLOW_COPY_AND_ASSIGN(DevToolsClient); |
| 49 }; | 50 }; |
| 50 | 51 |
| 51 #endif // CHROME_RENDERER_DEVTOOLS_CLIENT_H_ | 52 #endif // CHROME_RENDERER_DEVTOOLS_CLIENT_H_ |
| OLD | NEW |