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

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: Rebase 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
« no previous file with comments | « chrome/browser/ui/gtk/browser_window_gtk.cc ('k') | chrome/browser/ui/views/frame/browser_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d53f37379082719da3591917f05e40dba881ad72..77dab20914f6e017cfa1c5dbbf7e489f909c592f 100644
--- a/chrome/browser/ui/views/frame/browser_view.h
+++ b/chrome/browser/ui/views/frame/browser_view.h
@@ -28,7 +28,6 @@
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/sys_color_change_listener.h"
#include "ui/views/controls/button/button.h"
-#include "ui/views/controls/single_split_view_listener.h"
#include "ui/views/controls/webview/unhandled_keyboard_event_handler.h"
#include "ui/views/widget/widget_delegate.h"
#include "ui/views/widget/widget_observer.h"
@@ -45,7 +44,7 @@
class BookmarkBarView;
class Browser;
class BrowserViewLayout;
-class ContentsContainer;
+class ContentsLayoutManager;
class DownloadShelfView;
class FullscreenExitBubbleViews;
class InfoBarContainerView;
@@ -93,7 +92,6 @@ class BrowserView : public BrowserWindow,
public views::WidgetObserver,
public views::ClientView,
public InfoBarContainer::Delegate,
- public views::SingleSplitViewListener,
public gfx::SysColorChangeListener,
public LoadCompleteListener::Delegate,
public OmniboxPopupModelObserver {
@@ -434,9 +432,6 @@ class BrowserView : public BrowserWindow,
virtual void InfoBarContainerStateChanged(bool is_animating) OVERRIDE;
virtual bool DrawInfoBarArrows(int* x) const OVERRIDE;
- // views::SingleSplitViewListener overrides:
- virtual bool SplitHandleMoved(views::SingleSplitView* sender) OVERRIDE;
-
// gfx::SysColorChangeListener overrides:
virtual void OnSysColorChange() OVERRIDE;
@@ -456,11 +451,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 +485,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 +512,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 +600,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 +651,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.
« no previous file with comments | « chrome/browser/ui/gtk/browser_window_gtk.cc ('k') | chrome/browser/ui/views/frame/browser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698