| 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 "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "chrome/browser/devtools/devtools_contents_resizing_strategy.h" | 9 #include "chrome/browser/devtools/devtools_contents_resizing_strategy.h" |
| 10 #include "chrome/browser/devtools/devtools_toggle_action.h" | 10 #include "chrome/browser/devtools/devtools_toggle_action.h" |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 const DevToolsToggleAction& action); | 99 const DevToolsToggleAction& action); |
| 100 | 100 |
| 101 // External frontend is always undocked. | 101 // External frontend is always undocked. |
| 102 static void OpenExternalFrontend( | 102 static void OpenExternalFrontend( |
| 103 Profile* profile, | 103 Profile* profile, |
| 104 const std::string& frontend_uri, | 104 const std::string& frontend_uri, |
| 105 const scoped_refptr<content::DevToolsAgentHost>& agent_host, | 105 const scoped_refptr<content::DevToolsAgentHost>& agent_host, |
| 106 bool is_worker, | 106 bool is_worker, |
| 107 bool is_v8_only); | 107 bool is_v8_only); |
| 108 | 108 |
| 109 // Node frontend is always undocked. |
| 110 static void OpenNodeFrontendWindow(Profile* profile); |
| 111 |
| 109 // Worker frontend is always undocked. | 112 // Worker frontend is always undocked. |
| 110 static void OpenDevToolsWindowForWorker( | 113 static void OpenDevToolsWindowForWorker( |
| 111 Profile* profile, | 114 Profile* profile, |
| 112 const scoped_refptr<content::DevToolsAgentHost>& worker_agent); | 115 const scoped_refptr<content::DevToolsAgentHost>& worker_agent); |
| 113 | 116 |
| 114 static void InspectElement(content::RenderFrameHost* inspected_frame_host, | 117 static void InspectElement(content::RenderFrameHost* inspected_frame_host, |
| 115 int x, | 118 int x, |
| 116 int y); | 119 int y); |
| 117 | 120 |
| 118 // Sets closure to be called after load is done. If already loaded, calls | 121 // Sets closure to be called after load is done. If already loaded, calls |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 content::WebContents* main_web_contents, | 249 content::WebContents* main_web_contents, |
| 247 DevToolsUIBindings* bindings, | 250 DevToolsUIBindings* bindings, |
| 248 content::WebContents* inspected_web_contents, | 251 content::WebContents* inspected_web_contents, |
| 249 bool can_dock); | 252 bool can_dock); |
| 250 | 253 |
| 251 static DevToolsWindow* Create(Profile* profile, | 254 static DevToolsWindow* Create(Profile* profile, |
| 252 const GURL& frontend_url, | 255 const GURL& frontend_url, |
| 253 content::WebContents* inspected_web_contents, | 256 content::WebContents* inspected_web_contents, |
| 254 bool shared_worker_frontend, | 257 bool shared_worker_frontend, |
| 255 bool v8_only_frontend, | 258 bool v8_only_frontend, |
| 259 bool node_frontend, |
| 256 const std::string& remote_frontend, | 260 const std::string& remote_frontend, |
| 257 bool can_dock, | 261 bool can_dock, |
| 258 const std::string& settings, | 262 const std::string& settings, |
| 259 const std::string& panel); | 263 const std::string& panel); |
| 260 static GURL GetDevToolsURL(Profile* profile, | 264 static GURL GetDevToolsURL(Profile* profile, |
| 261 const GURL& base_url, | 265 const GURL& base_url, |
| 262 bool shared_worker_frontend, | 266 bool shared_worker_frontend, |
| 263 bool v8_only_frontend, | 267 bool v8_only_frontend, |
| 268 bool node_frontend, |
| 264 const std::string& remote_frontend, | 269 const std::string& remote_frontend, |
| 265 bool can_dock, | 270 bool can_dock, |
| 266 const std::string& panel); | 271 const std::string& panel); |
| 267 | 272 |
| 268 static DevToolsWindow* CreateDevToolsWindowForWorker(Profile* profile); | 273 static DevToolsWindow* CreateDevToolsWindowForWorker(Profile* profile); |
| 269 static void ToggleDevToolsWindow( | 274 static void ToggleDevToolsWindow( |
| 270 content::WebContents* web_contents, | 275 content::WebContents* web_contents, |
| 271 bool force_open, | 276 bool force_open, |
| 272 const DevToolsToggleAction& action, | 277 const DevToolsToggleAction& action, |
| 273 const std::string& settings); | 278 const std::string& settings); |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 | 318 |
| 314 // content::DevToolsUIBindings::Delegate overrides | 319 // content::DevToolsUIBindings::Delegate overrides |
| 315 void ActivateWindow() override; | 320 void ActivateWindow() override; |
| 316 void CloseWindow() override; | 321 void CloseWindow() override; |
| 317 void Inspect(scoped_refptr<content::DevToolsAgentHost> host) override; | 322 void Inspect(scoped_refptr<content::DevToolsAgentHost> host) override; |
| 318 void SetInspectedPageBounds(const gfx::Rect& rect) override; | 323 void SetInspectedPageBounds(const gfx::Rect& rect) override; |
| 319 void InspectElementCompleted() override; | 324 void InspectElementCompleted() override; |
| 320 void SetIsDocked(bool is_docked) override; | 325 void SetIsDocked(bool is_docked) override; |
| 321 void OpenInNewTab(const std::string& url) override; | 326 void OpenInNewTab(const std::string& url) override; |
| 322 void SetWhitelistedShortcuts(const std::string& message) override; | 327 void SetWhitelistedShortcuts(const std::string& message) override; |
| 328 void OpenNodeFrontend() override; |
| 323 void InspectedContentsClosing() override; | 329 void InspectedContentsClosing() override; |
| 324 void OnLoadCompleted() override; | 330 void OnLoadCompleted() override; |
| 325 void ReadyForTest() override; | 331 void ReadyForTest() override; |
| 326 InfoBarService* GetInfoBarService() override; | 332 InfoBarService* GetInfoBarService() override; |
| 327 void RenderProcessGone(bool crashed) override; | 333 void RenderProcessGone(bool crashed) override; |
| 328 | 334 |
| 329 void CreateDevToolsBrowser(); | 335 void CreateDevToolsBrowser(); |
| 330 BrowserWindow* GetInspectedBrowserWindow(); | 336 BrowserWindow* GetInspectedBrowserWindow(); |
| 331 void ScheduleShow(const DevToolsToggleAction& action); | 337 void ScheduleShow(const DevToolsToggleAction& action); |
| 332 void Show(const DevToolsToggleAction& action); | 338 void Show(const DevToolsToggleAction& action); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 357 base::Closure ready_for_test_callback_; | 363 base::Closure ready_for_test_callback_; |
| 358 | 364 |
| 359 base::TimeTicks inspect_element_start_time_; | 365 base::TimeTicks inspect_element_start_time_; |
| 360 std::unique_ptr<DevToolsEventForwarder> event_forwarder_; | 366 std::unique_ptr<DevToolsEventForwarder> event_forwarder_; |
| 361 | 367 |
| 362 friend class DevToolsEventForwarder; | 368 friend class DevToolsEventForwarder; |
| 363 DISALLOW_COPY_AND_ASSIGN(DevToolsWindow); | 369 DISALLOW_COPY_AND_ASSIGN(DevToolsWindow); |
| 364 }; | 370 }; |
| 365 | 371 |
| 366 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_ | 372 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_ |
| OLD | NEW |