| Index: chrome/browser/devtools/devtools_window.h
|
| diff --git a/chrome/browser/devtools/devtools_window.h b/chrome/browser/devtools/devtools_window.h
|
| index e3b2e90525e6e6effd06f68c155c630c8d8cfe73..e3cfd7df898953198c55ee615122e57e395b4a37 100644
|
| --- a/chrome/browser/devtools/devtools_window.h
|
| +++ b/chrome/browser/devtools/devtools_window.h
|
| @@ -54,6 +54,12 @@ enum DevToolsDockSide {
|
| DEVTOOLS_DOCK_SIDE_MINIMIZED
|
| };
|
|
|
| +enum DevToolsClosingTarget {
|
| + DEVTOOLS_CLOSING_TARGET_NONE = 0,
|
| + DEVTOOLS_CLOSING_TARGET_DEVTOOLS,
|
| + DEVTOOLS_CLOSING_TARGET_INSPECTED_PAGE
|
| +};
|
| +
|
| class DevToolsWindow : private content::NotificationObserver,
|
| private content::WebContentsDelegate,
|
| private content::DevToolsFrontendHostDelegate,
|
| @@ -67,6 +73,8 @@ class DevToolsWindow : private content::NotificationObserver,
|
|
|
| static std::string GetDevToolsWindowPlacementPrefKey();
|
| static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
|
| + static DevToolsWindow* GetInstanceForInspectedTab(
|
| + content::WebContents* inspected_tab);
|
| static DevToolsWindow* GetDockedInstanceForInspectedTab(
|
| content::WebContents* inspected_tab);
|
| static bool IsDevToolsWindow(content::RenderViewHost* window_rvh);
|
| @@ -125,6 +133,10 @@ class DevToolsWindow : private content::NotificationObserver,
|
|
|
| void Show(DevToolsToggleAction action);
|
|
|
| + static void HandleBeforeUnload(content::WebContents*, bool, bool*);
|
| + bool InspectedPageWillClose();
|
| + void InspectedPageCancelClose();
|
| +
|
| private:
|
| friend class DevToolsControllerTest;
|
|
|
| @@ -166,6 +178,9 @@ class DevToolsWindow : private content::NotificationObserver,
|
| bool user_gesture,
|
| bool* was_blocked) OVERRIDE;
|
| virtual void CloseContents(content::WebContents* source) OVERRIDE;
|
| + virtual void BeforeUnloadFired(content::WebContents* tab,
|
| + bool proceed,
|
| + bool* proceed_to_fire_unload) OVERRIDE;
|
| virtual bool PreHandleKeyboardEvent(
|
| content::WebContents* source,
|
| const content::NativeWebKeyboardEvent& event,
|
| @@ -188,6 +203,7 @@ class DevToolsWindow : private content::NotificationObserver,
|
|
|
| // DevToolsEmbedderMessageDispatcher::Delegate overrides:
|
| virtual void ActivateWindow() OVERRIDE;
|
| + virtual void ActivateContents(content::WebContents* contents) OVERRIDE;
|
| virtual void CloseWindow() OVERRIDE;
|
| virtual void MoveWindow(int x, int y) OVERRIDE;
|
| virtual void SetDockSide(const std::string& side) OVERRIDE;
|
| @@ -269,6 +285,8 @@ class DevToolsWindow : private content::NotificationObserver,
|
| int width_;
|
| int height_;
|
| DevToolsDockSide dock_side_before_minimized_;
|
| + DevToolsClosingTarget closing_target_;
|
| + bool inspected_page_is_closing_;
|
|
|
| scoped_ptr<DevToolsEmbedderMessageDispatcher> embedder_message_dispatcher_;
|
| DISALLOW_COPY_AND_ASSIGN(DevToolsWindow);
|
|
|