| Index: chrome/browser/devtools/devtools_window.h
|
| diff --git a/chrome/browser/devtools/devtools_window.h b/chrome/browser/devtools/devtools_window.h
|
| index 2247de28173683f60f8534a2de51c26f2398681d..69684b372eb951bd67c882d95262982ba8fd77ad 100644
|
| --- a/chrome/browser/devtools/devtools_window.h
|
| +++ b/chrome/browser/devtools/devtools_window.h
|
| @@ -21,6 +21,7 @@
|
| #include "content/public/browser/notification_observer.h"
|
| #include "content/public/browser/notification_registrar.h"
|
| #include "content/public/browser/web_contents_delegate.h"
|
| +#include "ui/gfx/size.h"
|
|
|
| class Browser;
|
| class BrowserWindow;
|
| @@ -96,8 +97,6 @@ class DevToolsWindow : private content::NotificationObserver,
|
| static void InspectElement(
|
| content::RenderViewHost* inspected_rvh, int x, int y);
|
|
|
| - static int GetMinimumWidth();
|
| - static int GetMinimumHeight();
|
| static int GetMinimizedHeight();
|
|
|
| // content::DevToolsFrontendHostDelegate:
|
| @@ -110,23 +109,15 @@ class DevToolsWindow : private content::NotificationObserver,
|
| content::RenderViewHost* GetRenderViewHost();
|
| content::DevToolsClientHost* GetDevToolsClientHostForTest();
|
|
|
| - // Returns preferred devtools window width for given |container_width|. It
|
| - // tries to use the saved window width, or, if none exists, 1/3 of the
|
| - // container width, then clamps to try and ensure both devtools and content
|
| - // are at least somewhat visible.
|
| - // Called only for the case when devtools window is docked to the side.
|
| - int GetWidth(int container_width);
|
| + // Inspected WebContents is placed over DevTools WebContents in docked mode.
|
| + // The following methods return the top-left and bottom-right offsets of
|
| + // inspected WebContents relative to DevTools WebContents.
|
| + gfx::Size GetTopLeftContentsOffset() const;
|
| + gfx::Size GetBottomRightContentsOffset() const;
|
|
|
| - // Returns preferred devtools window height for given |container_height|.
|
| - // Uses the same logic as GetWidth.
|
| - // Called only for the case when devtools window is docked to bottom.
|
| - int GetHeight(int container_height);
|
| -
|
| - // Stores preferred devtools window width for this instance.
|
| - void SetWidth(int width);
|
| -
|
| - // Stores preferred devtools window height for this instance.
|
| - void SetHeight(int height);
|
| + // Minimum size of the docked DevTools WebContents. This includes
|
| + // the overlaying inspected WebContents size.
|
| + gfx::Size GetMinimumSize() const;
|
|
|
| void Show(const DevToolsToggleAction& action);
|
|
|
| @@ -275,7 +266,8 @@ class DevToolsWindow : private content::NotificationObserver,
|
| virtual void ActivateWindow() OVERRIDE;
|
| virtual void ActivateContents(content::WebContents* contents) OVERRIDE;
|
| virtual void CloseWindow() OVERRIDE;
|
| - virtual void SetWindowBounds(int x, int y, int width, int height) OVERRIDE;
|
| + virtual void SetContentsOffsets(
|
| + int left, int top, int right, int bottom) OVERRIDE;
|
| virtual void MoveWindow(int x, int y) OVERRIDE;
|
| virtual void SetDockSide(const std::string& side) OVERRIDE;
|
| virtual void OpenInNewTab(const std::string& url) OVERRIDE;
|
| @@ -344,6 +336,7 @@ class DevToolsWindow : private content::NotificationObserver,
|
| Profile* profile_;
|
| content::WebContents* web_contents_;
|
| Browser* browser_;
|
| + // TODO(dgozman): move dock side knowledge entirely to frontend.
|
| DevToolsDockSide dock_side_;
|
| bool is_loaded_;
|
| DevToolsToggleAction action_on_load_;
|
| @@ -356,8 +349,8 @@ class DevToolsWindow : private content::NotificationObserver,
|
| scoped_refptr<DevToolsFileSystemIndexer::FileSystemIndexingJob> >
|
| IndexingJobsMap;
|
| IndexingJobsMap indexing_jobs_;
|
| - int width_;
|
| - int height_;
|
| + gfx::Size top_left_contents_offset_;
|
| + gfx::Size bottom_right_contents_offset_;
|
| DevToolsDockSide dock_side_before_minimized_;
|
| // True if we're in the process of handling a beforeunload event originating
|
| // from the inspected webcontents, see InterceptPageBeforeUnload for details.
|
|
|