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 CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_ | 5 #ifndef CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_ |
6 #define CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_ | 6 #define CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
14 #include "chrome/browser/devtools/devtools_file_helper.h" | 14 #include "chrome/browser/devtools/devtools_file_helper.h" |
15 #include "chrome/browser/devtools/devtools_toggle_action.h" | 15 #include "chrome/browser/devtools/devtools_toggle_action.h" |
16 #include "content/public/browser/devtools_client_host.h" | 16 #include "content/public/browser/devtools_client_host.h" |
17 #include "content/public/browser/devtools_frontend_host_delegate.h" | 17 #include "content/public/browser/devtools_frontend_host_delegate.h" |
18 #include "content/public/browser/notification_observer.h" | 18 #include "content/public/browser/notification_observer.h" |
19 #include "content/public/browser/notification_registrar.h" | 19 #include "content/public/browser/notification_registrar.h" |
20 #include "content/public/browser/web_contents_delegate.h" | 20 #include "content/public/browser/web_contents_delegate.h" |
21 | 21 |
22 class Browser; | 22 class Browser; |
23 class BrowserWindow; | 23 class BrowserWindow; |
| 24 class DevToolsControllerTest; |
24 class PrefServiceSyncable; | 25 class PrefServiceSyncable; |
25 class Profile; | 26 class Profile; |
26 | 27 |
27 namespace base { | 28 namespace base { |
28 class Value; | 29 class Value; |
29 } | 30 } |
30 | 31 |
31 namespace chrome { | 32 namespace chrome { |
32 class BrowserListImpl; | 33 class BrowserListImpl; |
33 } | 34 } |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 // Called only for the case when devtools window is docked to bottom. | 105 // Called only for the case when devtools window is docked to bottom. |
105 int GetHeight(int container_height); | 106 int GetHeight(int container_height); |
106 | 107 |
107 // Stores preferred devtools window width for this instance. | 108 // Stores preferred devtools window width for this instance. |
108 void SetWidth(int width); | 109 void SetWidth(int width); |
109 | 110 |
110 // Stores preferred devtools window height for this instance. | 111 // Stores preferred devtools window height for this instance. |
111 void SetHeight(int height); | 112 void SetHeight(int height); |
112 | 113 |
113 private: | 114 private: |
| 115 friend class DevToolsControllerTest; |
114 static DevToolsWindow* Create(Profile* profile, | 116 static DevToolsWindow* Create(Profile* profile, |
115 content::RenderViewHost* inspected_rvh, | 117 content::RenderViewHost* inspected_rvh, |
116 DevToolsDockSide dock_side, | 118 DevToolsDockSide dock_side, |
117 bool shared_worker_frontend); | 119 bool shared_worker_frontend); |
118 DevToolsWindow(content::WebContents* web_contents, | 120 DevToolsWindow(content::WebContents* web_contents, |
119 Profile* profile, | 121 Profile* profile, |
120 content::RenderViewHost* inspected_rvh, | 122 content::RenderViewHost* inspected_rvh, |
121 DevToolsDockSide dock_side); | 123 DevToolsDockSide dock_side); |
122 | 124 |
123 void CreateDevToolsBrowser(); | 125 void CreateDevToolsBrowser(); |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 content::NotificationRegistrar registrar_; | 215 content::NotificationRegistrar registrar_; |
214 scoped_ptr<content::DevToolsClientHost> frontend_host_; | 216 scoped_ptr<content::DevToolsClientHost> frontend_host_; |
215 base::WeakPtrFactory<DevToolsWindow> weak_factory_; | 217 base::WeakPtrFactory<DevToolsWindow> weak_factory_; |
216 scoped_ptr<DevToolsFileHelper> file_helper_; | 218 scoped_ptr<DevToolsFileHelper> file_helper_; |
217 int width_; | 219 int width_; |
218 int height_; | 220 int height_; |
219 DISALLOW_COPY_AND_ASSIGN(DevToolsWindow); | 221 DISALLOW_COPY_AND_ASSIGN(DevToolsWindow); |
220 }; | 222 }; |
221 | 223 |
222 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_ | 224 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_ |
OLD | NEW |