| 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_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 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 static TabContents* GetDevToolsContents(content::WebContents* inspected_tab); | 50 static TabContents* GetDevToolsContents(content::WebContents* inspected_tab); |
| 51 static bool IsDevToolsWindow(content::RenderViewHost* window_rvh); | 51 static bool IsDevToolsWindow(content::RenderViewHost* window_rvh); |
| 52 | 52 |
| 53 static DevToolsWindow* OpenDevToolsWindowForWorker( | 53 static DevToolsWindow* OpenDevToolsWindowForWorker( |
| 54 Profile* profile, | 54 Profile* profile, |
| 55 content::DevToolsAgentHost* worker_agent); | 55 content::DevToolsAgentHost* worker_agent); |
| 56 static DevToolsWindow* CreateDevToolsWindowForWorker(Profile* profile); | 56 static DevToolsWindow* CreateDevToolsWindowForWorker(Profile* profile); |
| 57 static DevToolsWindow* OpenDevToolsWindow( | 57 static DevToolsWindow* OpenDevToolsWindow( |
| 58 content::RenderViewHost* inspected_rvh); | 58 content::RenderViewHost* inspected_rvh); |
| 59 static DevToolsWindow* ToggleDevToolsWindow( | 59 static DevToolsWindow* ToggleDevToolsWindow( |
| 60 Browser* browser, |
| 61 DevToolsToggleAction action); |
| 62 |
| 63 // Exposed for testing, normal clients should not use this method. |
| 64 static DevToolsWindow* ToggleDevToolsWindow( |
| 60 content::RenderViewHost* inspected_rvh, | 65 content::RenderViewHost* inspected_rvh, |
| 66 bool force_open, |
| 61 DevToolsToggleAction action); | 67 DevToolsToggleAction action); |
| 62 static void InspectElement( | 68 static void InspectElement( |
| 63 content::RenderViewHost* inspected_rvh, int x, int y); | 69 content::RenderViewHost* inspected_rvh, int x, int y); |
| 64 | 70 |
| 65 virtual ~DevToolsWindow(); | 71 virtual ~DevToolsWindow(); |
| 66 | 72 |
| 67 // Overridden from DevToolsClientHost. | 73 // Overridden from DevToolsClientHost. |
| 68 virtual void InspectedContentsClosing() OVERRIDE; | 74 virtual void InspectedContentsClosing() OVERRIDE; |
| 69 virtual void ContentsReplaced(content::WebContents* new_contents) OVERRIDE; | 75 virtual void ContentsReplaced(content::WebContents* new_contents) OVERRIDE; |
| 70 content::RenderViewHost* GetRenderViewHost(); | 76 content::RenderViewHost* GetRenderViewHost(); |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 content::WebContents* source, | 128 content::WebContents* source, |
| 123 const content::NativeWebKeyboardEvent& event) OVERRIDE; | 129 const content::NativeWebKeyboardEvent& event) OVERRIDE; |
| 124 virtual content::JavaScriptDialogCreator* | 130 virtual content::JavaScriptDialogCreator* |
| 125 GetJavaScriptDialogCreator() OVERRIDE; | 131 GetJavaScriptDialogCreator() OVERRIDE; |
| 126 virtual void RunFileChooser( | 132 virtual void RunFileChooser( |
| 127 content::WebContents* web_contents, | 133 content::WebContents* web_contents, |
| 128 const content::FileChooserParams& params) OVERRIDE; | 134 const content::FileChooserParams& params) OVERRIDE; |
| 129 | 135 |
| 130 virtual void FrameNavigating(const std::string& url) OVERRIDE {} | 136 virtual void FrameNavigating(const std::string& url) OVERRIDE {} |
| 131 | 137 |
| 132 static DevToolsWindow* ToggleDevToolsWindow( | |
| 133 content::RenderViewHost* inspected_rvh, | |
| 134 bool force_open, | |
| 135 DevToolsToggleAction action); | |
| 136 static DevToolsWindow* AsDevToolsWindow(content::DevToolsClientHost*); | 138 static DevToolsWindow* AsDevToolsWindow(content::DevToolsClientHost*); |
| 139 static DevToolsWindow* AsDevToolsWindow(content::RenderViewHost*); |
| 137 | 140 |
| 138 // content::DevToolsClientHandlerDelegate overrides. | 141 // content::DevToolsClientHandlerDelegate overrides. |
| 139 virtual void ActivateWindow() OVERRIDE; | 142 virtual void ActivateWindow() OVERRIDE; |
| 140 virtual void CloseWindow() OVERRIDE; | 143 virtual void CloseWindow() OVERRIDE; |
| 141 virtual void MoveWindow(int x, int y) OVERRIDE; | 144 virtual void MoveWindow(int x, int y) OVERRIDE; |
| 142 virtual void DockWindow() OVERRIDE; | 145 virtual void DockWindow() OVERRIDE; |
| 143 virtual void UndockWindow() OVERRIDE; | 146 virtual void UndockWindow() OVERRIDE; |
| 144 virtual void SetDockSide(const std::string& side) OVERRIDE; | 147 virtual void SetDockSide(const std::string& side) OVERRIDE; |
| 145 virtual void OpenInNewTab(const std::string& url) OVERRIDE; | 148 virtual void OpenInNewTab(const std::string& url) OVERRIDE; |
| 146 virtual void SaveToFile(const std::string& url, | 149 virtual void SaveToFile(const std::string& url, |
| (...skipping 17 matching lines...) Expand all Loading... |
| 164 bool docked_; | 167 bool docked_; |
| 165 bool is_loaded_; | 168 bool is_loaded_; |
| 166 DevToolsToggleAction action_on_load_; | 169 DevToolsToggleAction action_on_load_; |
| 167 content::NotificationRegistrar registrar_; | 170 content::NotificationRegistrar registrar_; |
| 168 content::DevToolsClientHost* frontend_host_; | 171 content::DevToolsClientHost* frontend_host_; |
| 169 scoped_ptr<DevToolsFileHelper> file_helper_; | 172 scoped_ptr<DevToolsFileHelper> file_helper_; |
| 170 DISALLOW_COPY_AND_ASSIGN(DevToolsWindow); | 173 DISALLOW_COPY_AND_ASSIGN(DevToolsWindow); |
| 171 }; | 174 }; |
| 172 | 175 |
| 173 #endif // CHROME_BROWSER_DEBUGGER_DEVTOOLS_WINDOW_H_ | 176 #endif // CHROME_BROWSER_DEBUGGER_DEVTOOLS_WINDOW_H_ |
| OLD | NEW |