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 // Disconnects all client hostst. |
38 virtual void CloseAllClientHosts() = 0; | 38 virtual void CloseAllClientHosts() = 0; |
39 | 39 |
40 // Returns client attached to the |agent_host| if there is one. | 40 // Returns true if there is a client attached to the |agent_host|. |
41 virtual DevToolsClientHost* GetDevToolsClientHostFor( | 41 virtual bool IsAttached(DevToolsAgentHost* agent_host) = 0; |
pfeldman
2013/03/29 14:59:23
Sounds like an instance method on DevToolsAgentHos
Vladislav Kaznacheev
2013/03/29 15:15:35
The real knowledge resides in DevToolsManager(Impl
pfeldman
2013/03/30 08:54:57
Here is how I see it: you are adding this method i
Vladislav Kaznacheev
2013/04/01 09:26:17
Agree. Done.
On 2013/03/30 08:54:57, pfeldman wro
| |
42 DevToolsAgentHost* agent_host) = 0; | |
43 | 42 |
44 // Returns agent that has |client_host| attachd to it if there is one. | 43 // Returns agent that has |client_host| attachd to it if there is one. |
45 virtual DevToolsAgentHost* GetDevToolsAgentHostFor( | 44 virtual DevToolsAgentHost* GetDevToolsAgentHostFor( |
46 DevToolsClientHost* client_host) = 0; | 45 DevToolsClientHost* client_host) = 0; |
47 | 46 |
48 // Registers new DevToolsClientHost for inspected |agent_host|. There must be | 47 // Registers new DevToolsClientHost for inspected |agent_host|. If there is |
49 // no other DevToolsClientHosts registered for the |agent_host| at the moment. | 48 // another DevToolsClientHost registered for the |agent_host| at the moment |
49 // it is disconnected. | |
50 virtual void RegisterDevToolsClientHostFor( | 50 virtual void RegisterDevToolsClientHostFor( |
51 DevToolsAgentHost* agent_host, | 51 DevToolsAgentHost* agent_host, |
52 DevToolsClientHost* client_host) = 0; | 52 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 | 53 |
58 // This method will remove all references from the manager to the | 54 // This method will remove all references from the manager to the |
59 // DevToolsClientHost and unregister all listeners related to the | 55 // DevToolsClientHost and unregister all listeners related to the |
60 // DevToolsClientHost. Called by closing client. | 56 // DevToolsClientHost. Called by closing client. |
61 virtual void ClientHostClosing(DevToolsClientHost* client_host) = 0; | 57 virtual void ClientHostClosing(DevToolsClientHost* client_host) = 0; |
62 }; | 58 }; |
63 | 59 |
64 } // namespace content | 60 } // namespace content |
65 | 61 |
66 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_MANAGER_H_ | 62 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_MANAGER_H_ |
OLD | NEW |