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 |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 | 104 |
105 // Stores preferred devtools window width for this instance. | 105 // Stores preferred devtools window width for this instance. |
106 void SetWidth(int width); | 106 void SetWidth(int width); |
107 | 107 |
108 // Stores preferred devtools window height for this instance. | 108 // Stores preferred devtools window height for this instance. |
109 void SetHeight(int height); | 109 void SetHeight(int height); |
110 | 110 |
111 private: | 111 private: |
112 friend class DevToolsControllerTest; | 112 friend class DevToolsControllerTest; |
113 static DevToolsWindow* Create(Profile* profile, | 113 static DevToolsWindow* Create(Profile* profile, |
114 content::RenderViewHost* inspected_rvh, | |
115 DevToolsDockSide dock_side, | 114 DevToolsDockSide dock_side, |
116 bool shared_worker_frontend); | 115 bool shared_worker_frontend); |
117 DevToolsWindow(content::WebContents* web_contents, | 116 DevToolsWindow(content::WebContents* web_contents, |
118 Profile* profile, | 117 Profile* profile, |
119 content::RenderViewHost* inspected_rvh, | |
120 DevToolsDockSide dock_side); | 118 DevToolsDockSide dock_side); |
121 | 119 |
| 120 content::WebContents* GetInspectedWebContents(); |
| 121 |
122 void CreateDevToolsBrowser(); | 122 void CreateDevToolsBrowser(); |
123 bool FindInspectedBrowserAndTabIndex(Browser**, int* tab); | 123 bool FindInspectedBrowserAndTabIndex(Browser**, int* tab); |
124 BrowserWindow* GetInspectedBrowserWindow(); | 124 BrowserWindow* GetInspectedBrowserWindow(); |
125 bool IsInspectedBrowserPopupOrPanel(); | 125 bool IsInspectedBrowserPopupOrPanel(); |
126 void UpdateFrontendDockSide(); | 126 void UpdateFrontendDockSide(); |
127 | 127 |
128 // Overridden from content::NotificationObserver. | 128 // Overridden from content::NotificationObserver. |
129 virtual void Observe(int type, | 129 virtual void Observe(int type, |
130 const content::NotificationSource& source, | 130 const content::NotificationSource& source, |
131 const content::NotificationDetails& details) OVERRIDE; | 131 const content::NotificationDetails& details) OVERRIDE; |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 void FileSystemAdded(std::string error_string, | 192 void FileSystemAdded(std::string error_string, |
193 const DevToolsFileHelper::FileSystem& file_system); | 193 const DevToolsFileHelper::FileSystem& file_system); |
194 | 194 |
195 void UpdateBrowserToolbar(); | 195 void UpdateBrowserToolbar(); |
196 bool IsDocked(); | 196 bool IsDocked(); |
197 static DevToolsDockSide GetDockSideFromPrefs(Profile* profile); | 197 static DevToolsDockSide GetDockSideFromPrefs(Profile* profile); |
198 static std::string SideToString(DevToolsDockSide dock_side); | 198 static std::string SideToString(DevToolsDockSide dock_side); |
199 static DevToolsDockSide SideFromString(const std::string& dock_side); | 199 static DevToolsDockSide SideFromString(const std::string& dock_side); |
200 | 200 |
201 Profile* profile_; | 201 Profile* profile_; |
202 content::WebContents* inspected_web_contents_; | |
203 content::WebContents* web_contents_; | 202 content::WebContents* web_contents_; |
204 Browser* browser_; | 203 Browser* browser_; |
205 DevToolsDockSide dock_side_; | 204 DevToolsDockSide dock_side_; |
206 bool is_loaded_; | 205 bool is_loaded_; |
207 DevToolsToggleAction action_on_load_; | 206 DevToolsToggleAction action_on_load_; |
208 content::NotificationRegistrar registrar_; | 207 content::NotificationRegistrar registrar_; |
209 scoped_ptr<content::DevToolsClientHost> frontend_host_; | 208 scoped_ptr<content::DevToolsClientHost> frontend_host_; |
210 base::WeakPtrFactory<DevToolsWindow> weak_factory_; | 209 base::WeakPtrFactory<DevToolsWindow> weak_factory_; |
211 scoped_ptr<DevToolsFileHelper> file_helper_; | 210 scoped_ptr<DevToolsFileHelper> file_helper_; |
212 int width_; | 211 int width_; |
213 int height_; | 212 int height_; |
214 DISALLOW_COPY_AND_ASSIGN(DevToolsWindow); | 213 DISALLOW_COPY_AND_ASSIGN(DevToolsWindow); |
215 }; | 214 }; |
216 | 215 |
217 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_ | 216 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_ |
OLD | NEW |