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 CHROME_BROWSER_DEBUGGER_DEVTOOLS_WINDOW_H_ | 5 #ifndef CHROME_BROWSER_DEBUGGER_DEVTOOLS_WINDOW_H_ |
6 #define CHROME_BROWSER_DEBUGGER_DEVTOOLS_WINDOW_H_ | 6 #define CHROME_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> |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
50 DevToolsAgentHost* worker_agent); | 50 DevToolsAgentHost* worker_agent); |
51 static DevToolsWindow* CreateDevToolsWindowForWorker(Profile* profile); | 51 static DevToolsWindow* CreateDevToolsWindowForWorker(Profile* profile); |
52 static DevToolsWindow* OpenDevToolsWindow(RenderViewHost* inspected_rvh); | 52 static DevToolsWindow* OpenDevToolsWindow(RenderViewHost* inspected_rvh); |
53 static DevToolsWindow* ToggleDevToolsWindow(RenderViewHost* inspected_rvh, | 53 static DevToolsWindow* ToggleDevToolsWindow(RenderViewHost* inspected_rvh, |
54 DevToolsToggleAction action); | 54 DevToolsToggleAction action); |
55 static void InspectElement(RenderViewHost* inspected_rvh, int x, int y); | 55 static void InspectElement(RenderViewHost* inspected_rvh, int x, int y); |
56 | 56 |
57 virtual ~DevToolsWindow(); | 57 virtual ~DevToolsWindow(); |
58 | 58 |
59 // Overridden from DevToolsClientHost. | 59 // Overridden from DevToolsClientHost. |
60 virtual void SendMessageToClient(const IPC::Message& message); | 60 virtual void SendMessageToClient(const IPC::Message& message) OVERRIDE; |
61 virtual void InspectedTabClosing(); | 61 virtual void InspectedTabClosing() OVERRIDE; |
62 virtual void TabReplaced(TabContents* new_tab); | 62 virtual void TabReplaced(TabContents* new_tab) OVERRIDE; |
63 virtual RenderViewHost* GetClientRenderViewHost(); | 63 virtual RenderViewHost* GetClientRenderViewHost() OVERRIDE; |
64 RenderViewHost* GetRenderViewHost(); | 64 RenderViewHost* GetRenderViewHost(); |
Nico
2011/11/21 16:03:13
This is not an override? Is it called by anyone? (
Avi (use Gerrit)
2011/11/21 16:16:51
These megapatches only change OVERRIDE. I haven't
| |
65 | 65 |
66 void Show(DevToolsToggleAction action); | 66 void Show(DevToolsToggleAction action); |
67 | 67 |
68 TabContentsWrapper* tab_contents() { return tab_contents_; } | 68 TabContentsWrapper* tab_contents() { return tab_contents_; } |
69 Browser* browser() { return browser_; } // For tests. | 69 Browser* browser() { return browser_; } // For tests. |
70 bool is_docked() { return docked_; } | 70 bool is_docked() { return docked_; } |
71 | 71 |
72 private: | 72 private: |
73 static DevToolsWindow* Create(Profile* profile, | 73 static DevToolsWindow* Create(Profile* profile, |
74 RenderViewHost* inspected_rvh, | 74 RenderViewHost* inspected_rvh, |
75 bool docked, bool shared_worker_frontend); | 75 bool docked, bool shared_worker_frontend); |
76 DevToolsWindow(TabContentsWrapper* tab_contents, Profile* profile, | 76 DevToolsWindow(TabContentsWrapper* tab_contents, Profile* profile, |
77 RenderViewHost* inspected_rvh, bool docked); | 77 RenderViewHost* inspected_rvh, bool docked); |
78 | 78 |
79 void CreateDevToolsBrowser(); | 79 void CreateDevToolsBrowser(); |
80 bool FindInspectedBrowserAndTabIndex(Browser**, int* tab); | 80 bool FindInspectedBrowserAndTabIndex(Browser**, int* tab); |
81 BrowserWindow* GetInspectedBrowserWindow(); | 81 BrowserWindow* GetInspectedBrowserWindow(); |
82 bool IsInspectedBrowserPopupOrPanel(); | 82 bool IsInspectedBrowserPopupOrPanel(); |
83 void UpdateFrontendAttachedState(); | 83 void UpdateFrontendAttachedState(); |
84 | 84 |
85 // Overridden from content::NotificationObserver. | 85 // Overridden from content::NotificationObserver. |
86 virtual void Observe(int type, | 86 virtual void Observe(int type, |
87 const content::NotificationSource& source, | 87 const content::NotificationSource& source, |
88 const content::NotificationDetails& details); | 88 const content::NotificationDetails& details) OVERRIDE; |
89 | 89 |
90 void ScheduleAction(DevToolsToggleAction action); | 90 void ScheduleAction(DevToolsToggleAction action); |
91 void DoAction(); | 91 void DoAction(); |
92 static GURL GetDevToolsUrl(Profile* profile, bool docked, | 92 static GURL GetDevToolsUrl(Profile* profile, bool docked, |
93 bool shared_worker_frontend); | 93 bool shared_worker_frontend); |
94 void UpdateTheme(); | 94 void UpdateTheme(); |
95 void AddDevToolsExtensionsToClient(); | 95 void AddDevToolsExtensionsToClient(); |
96 void CallClientFunction(const string16& function_name, | 96 void CallClientFunction(const string16& function_name, |
97 const base::Value& arg); | 97 const base::Value& arg); |
98 // Overridden from TabContentsDelegate. | 98 // Overridden from TabContentsDelegate. |
99 // Deprecated. Use two-arguments variant instead. | 99 // Deprecated. Use two-arguments variant instead. |
100 virtual TabContents* OpenURLFromTab( | 100 virtual TabContents* OpenURLFromTab( |
101 TabContents* source, | 101 TabContents* source, |
102 const GURL& url, | 102 const GURL& url, |
103 const GURL& referrer, | 103 const GURL& referrer, |
104 WindowOpenDisposition disposition, | 104 WindowOpenDisposition disposition, |
105 content::PageTransition transition) OVERRIDE; | 105 content::PageTransition transition) OVERRIDE; |
106 virtual TabContents* OpenURLFromTab(TabContents* source, | 106 virtual TabContents* OpenURLFromTab(TabContents* source, |
107 const OpenURLParams& params) OVERRIDE; | 107 const OpenURLParams& params) OVERRIDE; |
108 virtual void AddNewContents(TabContents* source, | 108 virtual void AddNewContents(TabContents* source, |
109 TabContents* new_contents, | 109 TabContents* new_contents, |
110 WindowOpenDisposition disposition, | 110 WindowOpenDisposition disposition, |
111 const gfx::Rect& initial_pos, | 111 const gfx::Rect& initial_pos, |
112 bool user_gesture); | 112 bool user_gesture) OVERRIDE; |
113 virtual void CloseContents(TabContents* source) {} | 113 virtual void CloseContents(TabContents* source) OVERRIDE {} |
114 virtual bool CanReloadContents(TabContents* source) const; | 114 virtual bool CanReloadContents(TabContents* source) const OVERRIDE; |
115 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, | 115 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, |
116 bool* is_keyboard_shortcut); | 116 bool* is_keyboard_shortcut) OVERRIDE; |
117 virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event); | 117 virtual void HandleKeyboardEvent( |
118 virtual content::JavaScriptDialogCreator* GetJavaScriptDialogCreator(); | 118 const NativeWebKeyboardEvent& event) OVERRIDE; |
119 virtual content::JavaScriptDialogCreator* | |
120 GetJavaScriptDialogCreator() OVERRIDE; | |
119 | 121 |
120 virtual void FrameNavigating(const std::string& url) {} | 122 virtual void FrameNavigating(const std::string& url) OVERRIDE {} |
121 | 123 |
122 static DevToolsWindow* ToggleDevToolsWindow(RenderViewHost* inspected_rvh, | 124 static DevToolsWindow* ToggleDevToolsWindow(RenderViewHost* inspected_rvh, |
123 bool force_open, | 125 bool force_open, |
124 DevToolsToggleAction action); | 126 DevToolsToggleAction action); |
125 static DevToolsWindow* AsDevToolsWindow(DevToolsClientHost*); | 127 static DevToolsWindow* AsDevToolsWindow(DevToolsClientHost*); |
126 | 128 |
127 // RenderViewHostObserver overrides. | 129 // RenderViewHostObserver overrides. |
128 virtual void RenderViewHostDestroyed(RenderViewHost* rvh) OVERRIDE; | 130 virtual void RenderViewHostDestroyed(RenderViewHost* rvh) OVERRIDE; |
129 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 131 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
130 | 132 |
(...skipping 11 matching lines...) Expand all Loading... | |
142 TabContentsWrapper* tab_contents_; | 144 TabContentsWrapper* tab_contents_; |
143 Browser* browser_; | 145 Browser* browser_; |
144 bool docked_; | 146 bool docked_; |
145 bool is_loaded_; | 147 bool is_loaded_; |
146 DevToolsToggleAction action_on_load_; | 148 DevToolsToggleAction action_on_load_; |
147 content::NotificationRegistrar registrar_; | 149 content::NotificationRegistrar registrar_; |
148 DISALLOW_COPY_AND_ASSIGN(DevToolsWindow); | 150 DISALLOW_COPY_AND_ASSIGN(DevToolsWindow); |
149 }; | 151 }; |
150 | 152 |
151 #endif // CHROME_BROWSER_DEBUGGER_DEVTOOLS_WINDOW_H_ | 153 #endif // CHROME_BROWSER_DEBUGGER_DEVTOOLS_WINDOW_H_ |
OLD | NEW |