OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_DEBUGGER_DEVTOOLS_CLIENT_HOST_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_DEVTOOLS_DEVTOOLS_CLIENT_HOST_H_ |
6 #define CONTENT_BROWSER_DEBUGGER_DEVTOOLS_CLIENT_HOST_H_ | 6 #define CONTENT_PUBLIC_BROWSER_DEVTOOLS_DEVTOOLS_CLIENT_HOST_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
13 #include "content/common/content_export.h" | 13 #include "content/common/content_export.h" |
14 | 14 |
15 namespace IPC { | 15 namespace IPC { |
16 class Message; | 16 class Message; |
17 } | 17 } |
18 | 18 |
19 class RenderViewHost; | 19 class RenderViewHost; |
20 class TabContents; | 20 class TabContents; |
21 | 21 |
22 namespace content { | |
23 | |
22 // Describes interface for managing devtools clients from browser process. There | 24 // Describes interface for managing devtools clients from browser process. There |
23 // are currently two types of clients: devtools windows and TCP socket | 25 // are currently two types of clients: devtools windows and TCP socket |
24 // debuggers. | 26 // debuggers. |
25 class CONTENT_EXPORT DevToolsClientHost { | 27 class CONTENT_EXPORT DevToolsClientHost { |
26 public: | 28 public: |
27 class CONTENT_EXPORT CloseListener { | 29 class CONTENT_EXPORT CloseListener { |
28 public: | 30 public: |
29 CloseListener() {} | 31 CloseListener() {} |
30 virtual ~CloseListener() {} | 32 virtual ~CloseListener() {} |
31 virtual void ClientHostClosing(DevToolsClientHost* host) = 0; | 33 virtual void ClientHostClosing(DevToolsClientHost* host) = 0; |
(...skipping 19 matching lines...) Expand all Loading... | |
51 void set_close_listener(CloseListener* listener) { | 53 void set_close_listener(CloseListener* listener) { |
52 close_listener_ = listener; | 54 close_listener_ = listener; |
53 } | 55 } |
54 | 56 |
55 // Invoked when a tab is replaced by another tab. This is triggered by | 57 // Invoked when a tab is replaced by another tab. This is triggered by |
56 // TabStripModel::ReplaceTabContentsAt. | 58 // TabStripModel::ReplaceTabContentsAt. |
57 virtual void TabReplaced(TabContents* new_tab) = 0; | 59 virtual void TabReplaced(TabContents* new_tab) = 0; |
58 | 60 |
59 // Returns client (front-end) RenderViewHost implementation of this | 61 // Returns client (front-end) RenderViewHost implementation of this |
60 // client host if applicable. NULL otherwise. | 62 // client host if applicable. NULL otherwise. |
61 virtual RenderViewHost* GetClientRenderViewHost(); | 63 virtual RenderViewHost* GetClientRenderViewHost(); |
jam
2011/11/21 21:16:04
we've been trying to make all the interfaces in co
yurys
2011/11/30 15:49:43
Done.
| |
62 | 64 |
63 protected: | 65 protected: |
64 DevToolsClientHost(); | 66 DevToolsClientHost(); |
65 | 67 |
66 void ForwardToDevToolsAgent(const IPC::Message& message); | 68 void ForwardToDevToolsAgent(const IPC::Message& message); |
jam
2011/11/21 21:16:04
is this actually used by anyone? i couldn't find i
yurys
2011/11/30 15:49:43
It is used only in DevToolsWindow::OnMessageReceiv
| |
67 | 69 |
68 // Should be called when the devtools client is going to die and this | 70 // Should be called when the devtools client is going to die and this |
69 // DevToolsClientHost should not be used anymore. | 71 // DevToolsClientHost should not be used anymore. |
70 void NotifyCloseListener(); | 72 void NotifyCloseListener(); |
jam
2011/11/21 21:16:04
this and close_listener: can they be taken out of
yurys
2011/11/30 15:49:43
Done. Removed the CloseListener, there is no much
| |
71 | 73 |
72 private: | 74 private: |
73 CloseListener* close_listener_; | 75 CloseListener* close_listener_; |
74 DISALLOW_COPY_AND_ASSIGN(DevToolsClientHost); | 76 DISALLOW_COPY_AND_ASSIGN(DevToolsClientHost); |
jam
2011/11/21 21:16:04
nit: not needed
yurys
2011/11/30 15:49:43
Done.
| |
75 }; | 77 }; |
76 | 78 |
77 #endif // CONTENT_BROWSER_DEBUGGER_DEVTOOLS_CLIENT_HOST_H_ | 79 } // namespace content |
80 | |
81 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_DEVTOOLS_CLIENT_HOST_H_ | |
OLD | NEW |