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_PUBLIC_BROWSER_DEVTOOLS_MANAGER_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_DEVTOOLS_MANAGER_H_ |
6 #define CONTENT_PUBLIC_BROWSER_DEVTOOLS_MANAGER_H_ | 6 #define CONTENT_PUBLIC_BROWSER_DEVTOOLS_MANAGER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
(...skipping 16 matching lines...) Expand all Loading... | |
27 public: | 27 public: |
28 static DevToolsManager* GetInstance(); | 28 static DevToolsManager* GetInstance(); |
29 | 29 |
30 virtual ~DevToolsManager() {} | 30 virtual ~DevToolsManager() {} |
31 | 31 |
32 // Routes devtools message from |from| client to corresponding | 32 // Routes devtools message from |from| client to corresponding |
33 // DevToolsAgentHost. | 33 // DevToolsAgentHost. |
34 virtual bool DispatchOnInspectorBackend(DevToolsClientHost* from, | 34 virtual bool DispatchOnInspectorBackend(DevToolsClientHost* from, |
35 const std::string& message) = 0; | 35 const std::string& message) = 0; |
36 | 36 |
37 // Closes all open developer tools windows. | 37 // Routes devtools message from |from| agent host to corresponding |
38 // DevToolsClientHost. | |
39 virtual void DispatchOnInspectorFrontend(DevToolsAgentHost* from, | |
pfeldman
2013/03/29 11:35:49
I don't think that anyone other than devtools agen
Vladislav Kaznacheev
2013/03/29 15:15:35
Moved to impl part.
On 2013/03/29 11:35:49, pfeldm
| |
40 const std::string& message) = 0; | |
41 | |
42 // Disconnects all client hostst. | |
38 virtual void CloseAllClientHosts() = 0; | 43 virtual void CloseAllClientHosts() = 0; |
39 | 44 |
40 // Returns client attached to the |agent_host| if there is one. | 45 // Returns true if there is a client attached to the |agent_host|. |
41 virtual DevToolsClientHost* GetDevToolsClientHostFor( | 46 virtual bool IsAttached(DevToolsAgentHost* agent_host) = 0; |
42 DevToolsAgentHost* agent_host) = 0; | |
43 | 47 |
44 // Returns agent that has |client_host| attachd to it if there is one. | 48 // Returns agent that has |client_host| attachd to it if there is one. |
45 virtual DevToolsAgentHost* GetDevToolsAgentHostFor( | 49 virtual DevToolsAgentHost* GetDevToolsAgentHostFor( |
46 DevToolsClientHost* client_host) = 0; | 50 DevToolsClientHost* client_host) = 0; |
47 | 51 |
48 // Registers new DevToolsClientHost for inspected |agent_host|. There must be | 52 // Registers new DevToolsClientHost for inspected |agent_host|. If there is |
49 // no other DevToolsClientHosts registered for the |agent_host| at the moment. | 53 // another DevToolsClientHost registered for the |agent_host| at the moment |
54 // it is disconnected. | |
50 virtual void RegisterDevToolsClientHostFor( | 55 virtual void RegisterDevToolsClientHostFor( |
51 DevToolsAgentHost* agent_host, | 56 DevToolsAgentHost* agent_host, |
52 DevToolsClientHost* client_host) = 0; | 57 DevToolsClientHost* client_host) = 0; |
53 // Unregisters given |agent_host|. DevToolsManager will notify corresponding | |
54 // client if one is attached. | |
55 virtual void UnregisterDevToolsClientHostFor( | |
56 DevToolsAgentHost* agent_host) = 0; | |
57 | 58 |
58 // This method will remove all references from the manager to the | 59 // This method will remove all references from the manager to the |
59 // DevToolsClientHost and unregister all listeners related to the | 60 // DevToolsClientHost and unregister all listeners related to the |
60 // DevToolsClientHost. Called by closing client. | 61 // DevToolsClientHost. Called by closing client. |
61 virtual void ClientHostClosing(DevToolsClientHost* client_host) = 0; | 62 virtual void ClientHostClosing(DevToolsClientHost* client_host) = 0; |
62 }; | 63 }; |
63 | 64 |
64 } // namespace content | 65 } // namespace content |
65 | 66 |
66 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_MANAGER_H_ | 67 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_MANAGER_H_ |
OLD | NEW |