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 PrefServiceSyncable; | 24 class PrefRegistrySyncable; |
25 class Profile; | 25 class Profile; |
26 | 26 |
27 namespace base { | 27 namespace base { |
28 class Value; | 28 class Value; |
29 } | 29 } |
30 | 30 |
31 namespace chrome { | 31 namespace chrome { |
32 class BrowserListImpl; | 32 class BrowserListImpl; |
33 } | 33 } |
34 | 34 |
(...skipping 13 matching lines...) Expand all Loading... |
48 DEVTOOLS_DOCK_SIDE_UNDOCKED = 0, | 48 DEVTOOLS_DOCK_SIDE_UNDOCKED = 0, |
49 DEVTOOLS_DOCK_SIDE_BOTTOM, | 49 DEVTOOLS_DOCK_SIDE_BOTTOM, |
50 DEVTOOLS_DOCK_SIDE_RIGHT | 50 DEVTOOLS_DOCK_SIDE_RIGHT |
51 }; | 51 }; |
52 | 52 |
53 class DevToolsWindow : private content::NotificationObserver, | 53 class DevToolsWindow : private content::NotificationObserver, |
54 private content::WebContentsDelegate, | 54 private content::WebContentsDelegate, |
55 private content::DevToolsFrontendHostDelegate { | 55 private content::DevToolsFrontendHostDelegate { |
56 public: | 56 public: |
57 static const char kDevToolsApp[]; | 57 static const char kDevToolsApp[]; |
58 static void RegisterUserPrefs(PrefServiceSyncable* prefs); | 58 static void RegisterUserPrefs(PrefRegistrySyncable* registry); |
59 static DevToolsWindow* GetDockedInstanceForInspectedTab( | 59 static DevToolsWindow* GetDockedInstanceForInspectedTab( |
60 content::WebContents* inspected_tab); | 60 content::WebContents* inspected_tab); |
61 static bool IsDevToolsWindow(content::RenderViewHost* window_rvh); | 61 static bool IsDevToolsWindow(content::RenderViewHost* window_rvh); |
62 | 62 |
63 static DevToolsWindow* OpenDevToolsWindowForWorker( | 63 static DevToolsWindow* OpenDevToolsWindowForWorker( |
64 Profile* profile, | 64 Profile* profile, |
65 content::DevToolsAgentHost* worker_agent); | 65 content::DevToolsAgentHost* worker_agent); |
66 static DevToolsWindow* CreateDevToolsWindowForWorker(Profile* profile); | 66 static DevToolsWindow* CreateDevToolsWindowForWorker(Profile* profile); |
67 static DevToolsWindow* OpenDevToolsWindow( | 67 static DevToolsWindow* OpenDevToolsWindow( |
68 content::RenderViewHost* inspected_rvh); | 68 content::RenderViewHost* inspected_rvh); |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 content::NotificationRegistrar registrar_; | 213 content::NotificationRegistrar registrar_; |
214 scoped_ptr<content::DevToolsClientHost> frontend_host_; | 214 scoped_ptr<content::DevToolsClientHost> frontend_host_; |
215 base::WeakPtrFactory<DevToolsWindow> weak_factory_; | 215 base::WeakPtrFactory<DevToolsWindow> weak_factory_; |
216 scoped_ptr<DevToolsFileHelper> file_helper_; | 216 scoped_ptr<DevToolsFileHelper> file_helper_; |
217 int width_; | 217 int width_; |
218 int height_; | 218 int height_; |
219 DISALLOW_COPY_AND_ASSIGN(DevToolsWindow); | 219 DISALLOW_COPY_AND_ASSIGN(DevToolsWindow); |
220 }; | 220 }; |
221 | 221 |
222 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_ | 222 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_ |
OLD | NEW |