OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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_BROWSER_DEVTOOLS_DEVTOOLS_AGENT_HOST_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_AGENT_HOST_IMPL_H_ |
6 #define CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_AGENT_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_AGENT_HOST_IMPL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 void Detach(); | 34 void Detach(); |
35 virtual void DispatchOnInspectorBackend(const std::string& message); | 35 virtual void DispatchOnInspectorBackend(const std::string& message); |
36 void InspectElement(int x, int y); | 36 void InspectElement(int x, int y); |
37 void AddMessageToConsole(ConsoleMessageLevel level, | 37 void AddMessageToConsole(ConsoleMessageLevel level, |
38 const std::string& message); | 38 const std::string& message); |
39 | 39 |
40 void set_close_listener(CloseListener* listener) { | 40 void set_close_listener(CloseListener* listener) { |
41 close_listener_ = listener; | 41 close_listener_ = listener; |
42 } | 42 } |
43 | 43 |
44 int id() { return id_; } | 44 // DevToolsAgentHost implementation. |
| 45 virtual std::string GetId() OVERRIDE; |
45 | 46 |
46 // DevToolsAgentHost implementation. | |
47 virtual RenderViewHost* GetRenderViewHost() OVERRIDE; | 47 virtual RenderViewHost* GetRenderViewHost() OVERRIDE; |
48 | 48 |
49 protected: | 49 protected: |
50 DevToolsAgentHostImpl(); | 50 DevToolsAgentHostImpl(); |
51 virtual ~DevToolsAgentHostImpl() {} | 51 virtual ~DevToolsAgentHostImpl() {} |
52 | 52 |
53 virtual void SendMessageToAgent(IPC::Message* msg) = 0; | 53 virtual void SendMessageToAgent(IPC::Message* msg) = 0; |
54 virtual void NotifyClientAttaching() = 0; | 54 virtual void NotifyClientAttaching() = 0; |
55 virtual void NotifyClientDetaching() = 0; | 55 virtual void NotifyClientDetaching() = 0; |
56 | 56 |
57 void NotifyCloseListener(); | 57 void NotifyCloseListener(); |
58 | 58 |
59 CloseListener* close_listener_; | 59 CloseListener* close_listener_; |
60 | 60 |
61 private: | 61 private: |
62 int id_; | 62 const std::string id_; |
63 }; | 63 }; |
64 | 64 |
65 } // namespace content | 65 } // namespace content |
66 | 66 |
67 #endif // CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_AGENT_HOST_IMPL_H_ | 67 #endif // CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_AGENT_HOST_IMPL_H_ |
OLD | NEW |