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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 DevToolsWindow(content::WebContents* web_contents, | 123 DevToolsWindow(content::WebContents* web_contents, |
124 Profile* profile, | 124 Profile* profile, |
125 content::RenderViewHost* inspected_rvh, | 125 content::RenderViewHost* inspected_rvh, |
126 DevToolsDockSide dock_side); | 126 DevToolsDockSide dock_side); |
127 | 127 |
128 void CreateDevToolsBrowser(); | 128 void CreateDevToolsBrowser(); |
129 bool FindInspectedBrowserAndTabIndex(Browser**, int* tab); | 129 bool FindInspectedBrowserAndTabIndex(Browser**, int* tab); |
130 BrowserWindow* GetInspectedBrowserWindow(); | 130 BrowserWindow* GetInspectedBrowserWindow(); |
131 bool IsInspectedBrowserPopupOrPanel(); | 131 bool IsInspectedBrowserPopupOrPanel(); |
132 void UpdateFrontendDockSide(); | 132 void UpdateFrontendDockSide(); |
| 133 void Hide(); |
133 | 134 |
134 // Overridden from content::NotificationObserver. | 135 // Overridden from content::NotificationObserver. |
135 virtual void Observe(int type, | 136 virtual void Observe(int type, |
136 const content::NotificationSource& source, | 137 const content::NotificationSource& source, |
137 const content::NotificationDetails& details) OVERRIDE; | 138 const content::NotificationDetails& details) OVERRIDE; |
138 | 139 |
139 void ScheduleAction(DevToolsToggleAction action); | 140 void ScheduleAction(DevToolsToggleAction action); |
140 void DoAction(); | 141 void DoAction(); |
141 static GURL GetDevToolsUrl(Profile* profile, | 142 static GURL GetDevToolsUrl(Profile* profile, |
142 DevToolsDockSide dock_side, | 143 DevToolsDockSide dock_side, |
(...skipping 21 matching lines...) Expand all Loading... |
164 virtual void HandleKeyboardEvent( | 165 virtual void HandleKeyboardEvent( |
165 content::WebContents* source, | 166 content::WebContents* source, |
166 const content::NativeWebKeyboardEvent& event) OVERRIDE; | 167 const content::NativeWebKeyboardEvent& event) OVERRIDE; |
167 virtual content::JavaScriptDialogManager* | 168 virtual content::JavaScriptDialogManager* |
168 GetJavaScriptDialogManager() OVERRIDE; | 169 GetJavaScriptDialogManager() OVERRIDE; |
169 virtual void RunFileChooser( | 170 virtual void RunFileChooser( |
170 content::WebContents* web_contents, | 171 content::WebContents* web_contents, |
171 const content::FileChooserParams& params) OVERRIDE; | 172 const content::FileChooserParams& params) OVERRIDE; |
172 virtual void WebContentsFocused(content::WebContents* contents) OVERRIDE; | 173 virtual void WebContentsFocused(content::WebContents* contents) OVERRIDE; |
173 | 174 |
174 static DevToolsWindow* AsDevToolsWindow(content::DevToolsClientHost*); | 175 static DevToolsWindow* FindDevToolsWindow(content::DevToolsAgentHost*); |
175 static DevToolsWindow* AsDevToolsWindow(content::RenderViewHost*); | 176 static DevToolsWindow* AsDevToolsWindow(content::RenderViewHost*); |
176 | 177 |
177 // content::DevToolsFrontendHostDelegate overrides. | 178 // content::DevToolsFrontendHostDelegate overrides. |
178 virtual void ActivateWindow() OVERRIDE; | 179 virtual void ActivateWindow() OVERRIDE; |
179 virtual void ChangeAttachedWindowHeight(unsigned height) OVERRIDE; | 180 virtual void ChangeAttachedWindowHeight(unsigned height) OVERRIDE; |
180 virtual void CloseWindow() OVERRIDE; | 181 virtual void CloseWindow() OVERRIDE; |
181 virtual void MoveWindow(int x, int y) OVERRIDE; | 182 virtual void MoveWindow(int x, int y) OVERRIDE; |
182 virtual void SetDockSide(const std::string& side) OVERRIDE; | 183 virtual void SetDockSide(const std::string& side) OVERRIDE; |
183 virtual void OpenInNewTab(const std::string& url) OVERRIDE; | 184 virtual void OpenInNewTab(const std::string& url) OVERRIDE; |
184 virtual void SaveToFile(const std::string& url, | 185 virtual void SaveToFile(const std::string& url, |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 content::NotificationRegistrar registrar_; | 219 content::NotificationRegistrar registrar_; |
219 scoped_ptr<content::DevToolsClientHost> frontend_host_; | 220 scoped_ptr<content::DevToolsClientHost> frontend_host_; |
220 base::WeakPtrFactory<DevToolsWindow> weak_factory_; | 221 base::WeakPtrFactory<DevToolsWindow> weak_factory_; |
221 scoped_ptr<DevToolsFileHelper> file_helper_; | 222 scoped_ptr<DevToolsFileHelper> file_helper_; |
222 int width_; | 223 int width_; |
223 int height_; | 224 int height_; |
224 DISALLOW_COPY_AND_ASSIGN(DevToolsWindow); | 225 DISALLOW_COPY_AND_ASSIGN(DevToolsWindow); |
225 }; | 226 }; |
226 | 227 |
227 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_ | 228 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_ |
OLD | NEW |