Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(391)

Unified Diff: chrome/browser/ui/views/frame/browser_view.h

Issue 63173016: DevTools: place DevTools WebContents underneath inspected WebContents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Views fixes Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/frame/browser_view.h
diff --git a/chrome/browser/ui/views/frame/browser_view.h b/chrome/browser/ui/views/frame/browser_view.h
index a053d2c52164c61dbd64cfd4f7f649c2bc61687c..8410ec23461d9a093c12a4b3a66f189acec35a00 100644
--- a/chrome/browser/ui/views/frame/browser_view.h
+++ b/chrome/browser/ui/views/frame/browser_view.h
@@ -45,7 +45,7 @@
class BookmarkBarView;
class Browser;
class BrowserViewLayout;
-class ContentsContainer;
+class ContentsLayoutManager;
class DownloadShelfView;
class FullscreenExitBubbleViews;
class InfoBarContainerView;
@@ -456,11 +456,9 @@ class BrowserView : public BrowserWindow,
virtual void OnOmniboxPopupShownOrHidden() OVERRIDE;
// Testing interface:
- views::SingleSplitView* GetContentsSplitForTest() { return contents_split_; }
- ContentsContainer* GetContentsContainerForTest() {
- return contents_container_;
- }
+ views::View* GetContentsContainerForTest() { return contents_container_; }
views::WebView* GetContentsWebViewForTest() { return contents_web_view_; }
+ views::WebView* GetDevToolsWebViewForTest() { return devtools_web_view_; }
private:
// Do not friend BrowserViewLayout. Use the BrowserViewLayoutDelegate
@@ -492,6 +490,9 @@ class BrowserView : public BrowserWindow,
// Returns the BrowserViewLayout.
BrowserViewLayout* GetBrowserViewLayout() const;
+ // Returns the ContentsLayoutManager.
+ ContentsLayoutManager* GetContentsLayoutManager() const;
+
// Layout the Status Bubble.
void LayoutStatusBubble();
@@ -516,17 +517,10 @@ class BrowserView : public BrowserWindow,
// devtools window for inspected |web_contents| that has docked devtools
// and hide it for NULL or not inspected |web_contents|. It will also make
// sure devtools window size and position are restored for given tab.
- void UpdateDevToolsForContents(content::WebContents* web_contents);
-
- // Shows docked devtools.
- void ShowDevToolsContainer();
-
- // Hides docked devtools.
- void HideDevToolsContainer();
-
- // Reads split position from the current tab's devtools window and applies
- // it to the devtools split.
- void UpdateDevToolsSplitPosition();
+ // This method will not update actual DevTools WebContents, if not
+ // |update_devtools_web_contents|. In this case, manual update is required.
+ void UpdateDevToolsForContents(content::WebContents* web_contents,
+ bool update_devtools_web_contents);
// Updates various optional child Views, e.g. Bookmarks Bar, Info Bar or the
// Download Shelf in response to a change notification from the specified
@@ -611,16 +605,11 @@ class BrowserView : public BrowserWindow,
// |------------------------------------------------------------------|
// | Bookmarks (bookmark_bar_view_) [1] |
// |------------------------------------------------------------------|
- // | Debugger splitter (contents_split_) |
+ // | Contents container (contents_container_) |
// | -------------------------------------------------------------- |
- // | | Page content (contents_container_) | |
- // | | -------------------------------------------------------- | |
- // | | | contents_web_view_ | | |
- // | | -------------------------------------------------------- | |
- // | -------------------------------------------------------------- |
- // | -------------------------------------------------------------- |
- // | | Debugger (devtools_container_) | |
- // | | | |
+ // | | devtools_web_view_ | |
+ // | |------------------------------------------------------------| |
+ // | | contents_web_view_ | |
// | -------------------------------------------------------------- |
// |------------------------------------------------------------------|
// | Active downloads (download_shelf_) |
@@ -667,24 +656,19 @@ class BrowserView : public BrowserWindow,
views::WebView* contents_web_view_;
// The view that contains devtools window for the selected WebContents.
- views::WebView* devtools_container_;
-
- // The view managing the |contents_web_view_|.
- ContentsContainer* contents_container_;
-
- // Split view containing the contents container and devtools container.
- views::SingleSplitView* contents_split_;
+ views::WebView* devtools_web_view_;
- // Side to dock devtools to.
- DevToolsDockSide devtools_dock_side_;
+ // The view managing the devtools and contents positions.
+ // Handled by ContentsLayoutManager.
+ views::View* contents_container_;
// Docked devtools window instance. NULL when current tab is not inspected
// or is inspected with undocked version of DevToolsWindow.
DevToolsWindow* devtools_window_;
// Tracks and stores the last focused view which is not the
- // devtools_container_ or any of its children. Used to restore focus once
- // the devtools_container_ is hidden.
+ // devtools_web_view_ or any of its children. Used to restore focus once
+ // the devtools_web_view_ is hidden.
scoped_ptr<views::ExternalFocusTracker> devtools_focus_tracker_;
// The Status information bubble that appears at the bottom of the window.

Powered by Google App Engine
This is Rietveld 408576698