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