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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 16 matching lines...) Expand all Loading... |
27 // remove it from the map. | 27 // remove it from the map. |
28 class CONTENT_EXPORT DevToolsManager { | 28 class CONTENT_EXPORT DevToolsManager { |
29 public: | 29 public: |
30 static DevToolsManager* GetInstance(); | 30 static DevToolsManager* GetInstance(); |
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 // Invoked when a tab is replaced by another tab. This is triggered by | 37 // Invoked when contents is replaced by another contents. This is triggered by |
38 // TabStripModel::ReplaceTabContentsAt. | 38 // TabStripModel::ReplaceTabContentsAt. |
39 virtual void TabReplaced(WebContents* old_tab, WebContents* new_tab) = 0; | 39 virtual void ContentsReplaced(WebContents* old_contents, |
| 40 WebContents* new_contents) = 0; |
40 | 41 |
41 // Closes all open developer tools windows. | 42 // Closes all open developer tools windows. |
42 virtual void CloseAllClientHosts() = 0; | 43 virtual void CloseAllClientHosts() = 0; |
43 | 44 |
44 // Returns client attached to the |agent_host| if there is one. | 45 // Returns client attached to the |agent_host| if there is one. |
45 virtual DevToolsClientHost* GetDevToolsClientHostFor( | 46 virtual DevToolsClientHost* GetDevToolsClientHostFor( |
46 DevToolsAgentHost* agent_host) = 0; | 47 DevToolsAgentHost* agent_host) = 0; |
47 | 48 |
48 // Returns agent that has |client_host| attachd to it if there is one. | 49 // Returns agent that has |client_host| attachd to it if there is one. |
49 virtual DevToolsAgentHost* GetDevToolsAgentHostFor( | 50 virtual DevToolsAgentHost* GetDevToolsAgentHostFor( |
(...skipping 29 matching lines...) Expand all Loading... |
79 // Logs given |message| on behalf of the given |agent_host|. | 80 // Logs given |message| on behalf of the given |agent_host|. |
80 virtual void AddMessageToConsole(DevToolsAgentHost* agent_host, | 81 virtual void AddMessageToConsole(DevToolsAgentHost* agent_host, |
81 ConsoleMessageLevel level, | 82 ConsoleMessageLevel level, |
82 const std::string& message) = 0; | 83 const std::string& message) = 0; |
83 | 84 |
84 }; | 85 }; |
85 | 86 |
86 } // namespace content | 87 } // namespace content |
87 | 88 |
88 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_MANAGER_H_ | 89 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_MANAGER_H_ |
OLD | NEW |