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" |
11 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
12 #include "content/public/browser/devtools_agent_host.h" | 12 #include "content/public/browser/devtools_agent_host.h" |
13 | 13 |
14 namespace IPC { | 14 namespace IPC { |
15 class Message; | 15 class Message; |
16 } | 16 } |
17 | 17 |
18 namespace content { | 18 namespace content { |
19 | 19 |
20 // Describes interface for managing devtools agents from the browser process. | 20 // Describes interface for managing devtools agents from the browser process. |
21 class CONTENT_EXPORT DevToolsAgentHostImpl : public DevToolsAgentHost { | 21 class CONTENT_EXPORT DevToolsAgentHostImpl : public DevToolsAgentHost { |
22 public: | 22 public: |
23 class CONTENT_EXPORT CloseListener { | 23 class CONTENT_EXPORT CloseListener { |
24 public: | 24 public: |
25 virtual void AgentHostClosing(DevToolsAgentHostImpl*) = 0; | 25 virtual void AgentHostClosing(DevToolsAgentHostImpl*) = 0; |
26 protected: | 26 protected: |
27 virtual ~CloseListener() {} | 27 virtual ~CloseListener() {} |
28 }; | 28 }; |
29 | 29 |
| 30 // Returns a list of all existing WebContents that can be debugged. |
| 31 static std::vector<WebContents*> GetInspectableWebContents(); |
| 32 |
30 // Informs the hosted agent that a client host has attached. | 33 // Informs the hosted agent that a client host has attached. |
31 virtual void Attach() = 0; | 34 virtual void Attach() = 0; |
32 | 35 |
33 // Informs the hosted agent that a client host has detached. | 36 // Informs the hosted agent that a client host has detached. |
34 virtual void Detach() = 0; | 37 virtual void Detach() = 0; |
35 | 38 |
36 // Sends a message to the agent hosted by this object. | 39 // Sends a message to the agent hosted by this object. |
37 virtual void DispatchOnInspectorBackend(const std::string& message) = 0; | 40 virtual void DispatchOnInspectorBackend(const std::string& message) = 0; |
38 | 41 |
39 void set_close_listener(CloseListener* listener) { | 42 void set_close_listener(CloseListener* listener) { |
(...skipping 22 matching lines...) Expand all Loading... |
62 void NotifyCloseListener(); | 65 void NotifyCloseListener(); |
63 | 66 |
64 private: | 67 private: |
65 CloseListener* close_listener_; | 68 CloseListener* close_listener_; |
66 const std::string id_; | 69 const std::string id_; |
67 }; | 70 }; |
68 | 71 |
69 } // namespace content | 72 } // namespace content |
70 | 73 |
71 #endif // CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_AGENT_HOST_IMPL_H_ | 74 #endif // CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_AGENT_HOST_IMPL_H_ |
OLD | NEW |