OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CONTENT_BROWSER_DEBUGGER_DEVTOOLS_WINDOW_H_ | 5 #ifndef CONTENT_BROWSER_DEBUGGER_DEVTOOLS_WINDOW_H_ |
6 #define CONTENT_BROWSER_DEBUGGER_DEVTOOLS_WINDOW_H_ | 6 #define CONTENT_BROWSER_DEBUGGER_DEVTOOLS_WINDOW_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
13 #include "content/browser/debugger/devtools_client_host.h" | 13 #include "content/browser/debugger/devtools_client_host.h" |
14 #include "content/browser/debugger/devtools_toggle_action.h" | 14 #include "content/browser/debugger/devtools_toggle_action.h" |
15 #include "content/browser/tab_contents/tab_contents_delegate.h" | 15 #include "content/browser/tab_contents/tab_contents_delegate.h" |
16 #include "content/common/notification_observer.h" | 16 #include "content/common/notification_observer.h" |
17 #include "content/common/notification_registrar.h" | 17 #include "content/common/notification_registrar.h" |
18 | 18 |
19 namespace IPC { | 19 namespace IPC { |
20 class Message; | 20 class Message; |
21 } | 21 } |
22 | 22 |
23 class Browser; | 23 class Browser; |
24 class BrowserWindow; | 24 class BrowserWindow; |
25 class Profile; | 25 class Profile; |
26 class RenderViewHost; | 26 class RenderViewHost; |
| 27 |
| 28 namespace base { |
27 class Value; | 29 class Value; |
| 30 } |
28 | 31 |
29 class DevToolsWindow | 32 class DevToolsWindow |
30 : public DevToolsClientHost, | 33 : public DevToolsClientHost, |
31 public NotificationObserver, | 34 public NotificationObserver, |
32 public TabContentsDelegate { | 35 public TabContentsDelegate { |
33 public: | 36 public: |
34 static const char kDevToolsApp[]; | 37 static const char kDevToolsApp[]; |
35 static TabContentsWrapper* GetDevToolsContents(TabContents* inspected_tab); | 38 static TabContentsWrapper* GetDevToolsContents(TabContents* inspected_tab); |
36 static DevToolsWindow* FindDevToolsWindow(RenderViewHost* window_rvh); | 39 static DevToolsWindow* FindDevToolsWindow(RenderViewHost* window_rvh); |
37 | 40 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 virtual void Observe(int type, | 73 virtual void Observe(int type, |
71 const NotificationSource& source, | 74 const NotificationSource& source, |
72 const NotificationDetails& details); | 75 const NotificationDetails& details); |
73 | 76 |
74 void ScheduleAction(DevToolsToggleAction action); | 77 void ScheduleAction(DevToolsToggleAction action); |
75 void DoAction(); | 78 void DoAction(); |
76 GURL GetDevToolsUrl(); | 79 GURL GetDevToolsUrl(); |
77 void UpdateTheme(); | 80 void UpdateTheme(); |
78 void AddDevToolsExtensionsToClient(); | 81 void AddDevToolsExtensionsToClient(); |
79 void CallClientFunction(const string16& function_name, | 82 void CallClientFunction(const string16& function_name, |
80 const Value& arg); | 83 const base::Value& arg); |
81 // Overridden from TabContentsDelegate. | 84 // Overridden from TabContentsDelegate. |
82 virtual void OpenURLFromTab(TabContents* source, | 85 virtual void OpenURLFromTab(TabContents* source, |
83 const GURL& url, | 86 const GURL& url, |
84 const GURL& referrer, | 87 const GURL& referrer, |
85 WindowOpenDisposition disposition, | 88 WindowOpenDisposition disposition, |
86 PageTransition::Type transition); | 89 PageTransition::Type transition); |
87 virtual void AddNewContents(TabContents* source, | 90 virtual void AddNewContents(TabContents* source, |
88 TabContents* new_contents, | 91 TabContents* new_contents, |
89 WindowOpenDisposition disposition, | 92 WindowOpenDisposition disposition, |
90 const gfx::Rect& initial_pos, | 93 const gfx::Rect& initial_pos, |
(...skipping 18 matching lines...) Expand all Loading... |
109 bool docked_; | 112 bool docked_; |
110 bool is_loaded_; | 113 bool is_loaded_; |
111 DevToolsToggleAction action_on_load_; | 114 DevToolsToggleAction action_on_load_; |
112 NotificationRegistrar registrar_; | 115 NotificationRegistrar registrar_; |
113 typedef std::vector<DevToolsWindow*> DevToolsWindowList; | 116 typedef std::vector<DevToolsWindow*> DevToolsWindowList; |
114 static DevToolsWindowList instances_; | 117 static DevToolsWindowList instances_; |
115 DISALLOW_COPY_AND_ASSIGN(DevToolsWindow); | 118 DISALLOW_COPY_AND_ASSIGN(DevToolsWindow); |
116 }; | 119 }; |
117 | 120 |
118 #endif // CONTENT_BROWSER_DEBUGGER_DEVTOOLS_WINDOW_H_ | 121 #endif // CONTENT_BROWSER_DEBUGGER_DEVTOOLS_WINDOW_H_ |
OLD | NEW |