OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 CHROME_BROWSER_DEBUGGER_DEV_TOOLS_WINDOW_H_ | 5 #ifndef CHROME_BROWSER_DEBUGGER_DEV_TOOLS_WINDOW_H_ |
6 #define CHROME_BROWSER_DEBUGGER_DEV_TOOLS_WINDOW_H_ | 6 #define CHROME_BROWSER_DEBUGGER_DEV_TOOLS_WINDOW_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 | 9 |
10 class DevToolsInstanceDescriptor; | 10 class DevToolsInstanceDescriptor; |
11 | 11 |
12 class DevToolsWindow { | 12 class DevToolsWindow { |
13 public: | 13 public: |
14 static DevToolsWindow* Create(DevToolsInstanceDescriptor* descriptor); | 14 static DevToolsWindow* Create(DevToolsInstanceDescriptor* descriptor); |
15 virtual ~DevToolsWindow() {} | 15 virtual ~DevToolsWindow() {} |
16 | 16 |
17 // Show developer tools window. | 17 // Show developer tools window. |
18 virtual void Show() = 0; | 18 virtual void Show() = 0; |
19 virtual void Close() = 0; | 19 virtual void Close() = 0; |
20 | 20 |
21 protected: | 21 protected: |
22 DevToolsWindow() {} | 22 DevToolsWindow() {} |
23 | 23 |
24 private: | 24 private: |
25 DISALLOW_COPY_AND_ASSIGN(DevToolsWindow); | 25 DISALLOW_COPY_AND_ASSIGN(DevToolsWindow); |
26 }; | 26 }; |
27 | 27 |
| 28 // Factory for creating DevToolsWindows. Useful for unit tests. |
| 29 class DevToolsWindowFactory { |
| 30 public: |
| 31 virtual ~DevToolsWindowFactory() {} |
| 32 virtual DevToolsWindow* CreateDevToolsWindow( |
| 33 DevToolsInstanceDescriptor* descriptor) = 0; |
| 34 }; |
| 35 |
| 36 |
28 #endif // CHROME_BROWSER_DEBUGGER_DEV_TOOLS_WINDOW_H_ | 37 #endif // CHROME_BROWSER_DEBUGGER_DEV_TOOLS_WINDOW_H_ |
OLD | NEW |