OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_AGENT_HOST_OBSERVER_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_DEVTOOLS_AGENT_HOST_OBSERVER_H_ |
6 #define CONTENT_PUBLIC_BROWSER_DEVTOOLS_AGENT_HOST_OBSERVER_H_ | 6 #define CONTENT_PUBLIC_BROWSER_DEVTOOLS_AGENT_HOST_OBSERVER_H_ |
7 | 7 |
8 #include "content/common/content_export.h" | 8 #include "content/common/content_export.h" |
9 | 9 |
10 namespace content { | 10 namespace content { |
11 | 11 |
12 class DevToolsAgentHost; | 12 class DevToolsAgentHost; |
13 | 13 |
14 // Observer API notifies interested parties about changes in DevToolsAgentHosts. | 14 // Observer API notifies interested parties about changes in DevToolsAgentHosts. |
15 class CONTENT_EXPORT DevToolsAgentHostObserver { | 15 class CONTENT_EXPORT DevToolsAgentHostObserver { |
16 public: | 16 public: |
17 virtual ~DevToolsAgentHostObserver() {} | 17 virtual ~DevToolsAgentHostObserver(); |
18 | 18 |
19 virtual void DevToolsAgentHostAttached(DevToolsAgentHost* agent_host) {} | 19 // If observer returns |true|, DevToolsAgentHost instances are created |
20 virtual void DevToolsAgentHostDetached(DevToolsAgentHost* agent_host) {} | 20 // (and reported in DevToolsAgentHostCreated) for every possible devtools |
| 21 // target (e.g. WebContents). |
| 22 virtual bool ShouldForceDevToolsAgentHostCreation(); |
| 23 |
| 24 // Called when DevToolsAgentHost was created and is ready to be used. |
| 25 virtual void DevToolsAgentHostCreated(DevToolsAgentHost* agent_host); |
| 26 |
| 27 // Called when client has attached to DevToolsAgentHost. |
| 28 virtual void DevToolsAgentHostAttached(DevToolsAgentHost* agent_host); |
| 29 |
| 30 // Called when client has detached from DevToolsAgentHost. |
| 31 virtual void DevToolsAgentHostDetached(DevToolsAgentHost* agent_host); |
| 32 |
| 33 // Called when DevToolsAgentHost was destroyed. |
| 34 virtual void DevToolsAgentHostDestroyed(DevToolsAgentHost* agent_host); |
21 }; | 35 }; |
22 | 36 |
23 } // namespace content | 37 } // namespace content |
24 | 38 |
25 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_AGENT_HOST_OBSERVER_H_ | 39 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_AGENT_HOST_OBSERVER_H_ |
OLD | NEW |