| 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" |
| 11 #include "chrome/browser/devtools/devtools_ui_bindings.h" | 11 #include "chrome/browser/devtools/devtools_ui_bindings.h" |
| 12 #include "content/public/browser/web_contents_delegate.h" | 12 #include "content/public/browser/web_contents_delegate.h" |
| 13 #include "content/public/browser/web_contents_observer.h" | 13 #include "content/public/browser/web_contents_observer.h" |
| 14 | 14 |
| 15 class Browser; | 15 class Browser; |
| 16 class BrowserWindow; | 16 class BrowserWindow; |
| 17 class DevToolsWindowTesting; | 17 class DevToolsWindowTesting; |
| 18 class DevToolsEventForwarder; | 18 class DevToolsEventForwarder; |
| 19 class DevToolsEyeDropper; |
| 19 | 20 |
| 20 namespace content { | 21 namespace content { |
| 21 class DevToolsAgentHost; | 22 class DevToolsAgentHost; |
| 22 struct NativeWebKeyboardEvent; | 23 struct NativeWebKeyboardEvent; |
| 23 class RenderFrameHost; | 24 class RenderFrameHost; |
| 24 } | 25 } |
| 25 | 26 |
| 26 namespace user_prefs { | 27 namespace user_prefs { |
| 27 class PrefRegistrySyncable; | 28 class PrefRegistrySyncable; |
| 28 } | 29 } |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 | 320 |
| 320 // content::DevToolsUIBindings::Delegate overrides | 321 // content::DevToolsUIBindings::Delegate overrides |
| 321 void ActivateWindow() override; | 322 void ActivateWindow() override; |
| 322 void CloseWindow() override; | 323 void CloseWindow() override; |
| 323 void Inspect(scoped_refptr<content::DevToolsAgentHost> host) override; | 324 void Inspect(scoped_refptr<content::DevToolsAgentHost> host) override; |
| 324 void SetInspectedPageBounds(const gfx::Rect& rect) override; | 325 void SetInspectedPageBounds(const gfx::Rect& rect) override; |
| 325 void InspectElementCompleted() override; | 326 void InspectElementCompleted() override; |
| 326 void SetIsDocked(bool is_docked) override; | 327 void SetIsDocked(bool is_docked) override; |
| 327 void OpenInNewTab(const std::string& url) override; | 328 void OpenInNewTab(const std::string& url) override; |
| 328 void SetWhitelistedShortcuts(const std::string& message) override; | 329 void SetWhitelistedShortcuts(const std::string& message) override; |
| 330 void SetEyeDropperActive(bool active) override; |
| 329 void OpenNodeFrontend() override; | 331 void OpenNodeFrontend() override; |
| 330 void InspectedContentsClosing() override; | 332 void InspectedContentsClosing() override; |
| 331 void OnLoadCompleted() override; | 333 void OnLoadCompleted() override; |
| 332 void ReadyForTest() override; | 334 void ReadyForTest() override; |
| 333 InfoBarService* GetInfoBarService() override; | 335 InfoBarService* GetInfoBarService() override; |
| 334 void RenderProcessGone(bool crashed) override; | 336 void RenderProcessGone(bool crashed) override; |
| 335 | 337 |
| 338 void ColorPickedInEyeDropper(int r, int g, int b, int a); |
| 336 void CreateDevToolsBrowser(); | 339 void CreateDevToolsBrowser(); |
| 337 BrowserWindow* GetInspectedBrowserWindow(); | 340 BrowserWindow* GetInspectedBrowserWindow(); |
| 338 void ScheduleShow(const DevToolsToggleAction& action); | 341 void ScheduleShow(const DevToolsToggleAction& action); |
| 339 void Show(const DevToolsToggleAction& action); | 342 void Show(const DevToolsToggleAction& action); |
| 340 void DoAction(const DevToolsToggleAction& action); | 343 void DoAction(const DevToolsToggleAction& action); |
| 341 void LoadCompleted(); | 344 void LoadCompleted(); |
| 342 void UpdateBrowserToolbar(); | 345 void UpdateBrowserToolbar(); |
| 343 void UpdateBrowserWindow(); | 346 void UpdateBrowserWindow(); |
| 344 | 347 |
| 345 std::unique_ptr<ObserverWithAccessor> inspected_contents_observer_; | 348 std::unique_ptr<ObserverWithAccessor> inspected_contents_observer_; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 358 // True if we're in the process of handling a beforeunload event originating | 361 // True if we're in the process of handling a beforeunload event originating |
| 359 // from the inspected webcontents, see InterceptPageBeforeUnload for details. | 362 // from the inspected webcontents, see InterceptPageBeforeUnload for details. |
| 360 bool intercepted_page_beforeunload_; | 363 bool intercepted_page_beforeunload_; |
| 361 base::Closure load_completed_callback_; | 364 base::Closure load_completed_callback_; |
| 362 base::Closure close_callback_; | 365 base::Closure close_callback_; |
| 363 bool ready_for_test_; | 366 bool ready_for_test_; |
| 364 base::Closure ready_for_test_callback_; | 367 base::Closure ready_for_test_callback_; |
| 365 | 368 |
| 366 base::TimeTicks inspect_element_start_time_; | 369 base::TimeTicks inspect_element_start_time_; |
| 367 std::unique_ptr<DevToolsEventForwarder> event_forwarder_; | 370 std::unique_ptr<DevToolsEventForwarder> event_forwarder_; |
| 371 std::unique_ptr<DevToolsEyeDropper> eye_dropper_; |
| 368 | 372 |
| 369 friend class DevToolsEventForwarder; | 373 friend class DevToolsEventForwarder; |
| 370 DISALLOW_COPY_AND_ASSIGN(DevToolsWindow); | 374 DISALLOW_COPY_AND_ASSIGN(DevToolsWindow); |
| 371 }; | 375 }; |
| 372 | 376 |
| 373 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_ | 377 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_ |
| OLD | NEW |