| 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_BROWSER_DEBUGGER_DEVTOOLS_CLIENT_HOST_H_ |
| 6 #define CONTENT_BROWSER_DEBUGGER_DEVTOOLS_CLIENT_HOST_H_ | 6 #define CONTENT_BROWSER_DEBUGGER_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 | 14 |
| 14 namespace IPC { | 15 namespace IPC { |
| 15 class Message; | 16 class Message; |
| 16 } | 17 } |
| 17 | 18 |
| 18 class RenderViewHost; | 19 class RenderViewHost; |
| 19 class TabContents; | 20 class TabContents; |
| 20 | 21 |
| 21 // Describes interface for managing devtools clients from browser process. There | 22 // Describes interface for managing devtools clients from browser process. There |
| 22 // are currently two types of clients: devtools windows and TCP socket | 23 // are currently two types of clients: devtools windows and TCP socket |
| 23 // debuggers. | 24 // debuggers. |
| 24 class DevToolsClientHost { | 25 class CONTENT_EXPORT DevToolsClientHost { |
| 25 public: | 26 public: |
| 26 class CloseListener { | 27 class CONTENT_EXPORT CloseListener { |
| 27 public: | 28 public: |
| 28 CloseListener() {} | 29 CloseListener() {} |
| 29 virtual ~CloseListener() {} | 30 virtual ~CloseListener() {} |
| 30 virtual void ClientHostClosing(DevToolsClientHost* host) = 0; | 31 virtual void ClientHostClosing(DevToolsClientHost* host) = 0; |
| 31 private: | 32 private: |
| 32 DISALLOW_COPY_AND_ASSIGN(CloseListener); | 33 DISALLOW_COPY_AND_ASSIGN(CloseListener); |
| 33 }; | 34 }; |
| 34 | 35 |
| 35 static DevToolsClientHost* FindOwnerClientHost(RenderViewHost* client_rvh); | 36 static DevToolsClientHost* FindOwnerClientHost(RenderViewHost* client_rvh); |
| 36 | 37 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 67 void NotifyCloseListener(); | 68 void NotifyCloseListener(); |
| 68 | 69 |
| 69 private: | 70 private: |
| 70 CloseListener* close_listener_; | 71 CloseListener* close_listener_; |
| 71 typedef std::vector<DevToolsClientHost*> DevToolsClientHostList; | 72 typedef std::vector<DevToolsClientHost*> DevToolsClientHostList; |
| 72 static DevToolsClientHostList instances_; | 73 static DevToolsClientHostList instances_; |
| 73 DISALLOW_COPY_AND_ASSIGN(DevToolsClientHost); | 74 DISALLOW_COPY_AND_ASSIGN(DevToolsClientHost); |
| 74 }; | 75 }; |
| 75 | 76 |
| 76 #endif // CONTENT_BROWSER_DEBUGGER_DEVTOOLS_CLIENT_HOST_H_ | 77 #endif // CONTENT_BROWSER_DEBUGGER_DEVTOOLS_CLIENT_HOST_H_ |
| OLD | NEW |