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

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

Issue 11272015: DevTools: “Dock to right” broken after turning a tab into a window of its own. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cocoa review comment addressed. Created 8 years, 2 months 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 c5905c846f67457d5a37ffa38774fdc41db68854..3a6a525a150f2883565622c8b928d6b586c8fede 100644
--- a/chrome/browser/ui/views/frame/browser_view.h
+++ b/chrome/browser/ui/views/frame/browser_view.h
@@ -499,17 +499,21 @@ class BrowserView : public BrowserWindow,
// |contents| can be NULL.
bool MaybeShowInfoBar(TabContents* contents);
+ // Updates devtools window for given contents. This method will show docked
+ // devtools window for inspected |tab_contents| that has docked devtools
+ // and hide it for NULL or not inspected |tab_contents|. It will also make
+ // sure devtools window size and position are restored for given tab.
Peter Kasting 2012/10/26 03:22:07 Nit: How about: // If |tab_contents| is non-NUL
+ void UpdateDevToolsForContents(TabContents* tab_contents);
+
// Shows docked devtools.
- void ShowDevToolsContainer(DevToolsDockSide side);
+ void ShowDevToolsContainer();
// Hides docked devtools.
void HideDevToolsContainer();
- // Updates devtools dock side.
- void SetDevToolsDockSide(DevToolsDockSide side);
-
- // Updated devtools window for given contents.
- void UpdateDevToolsForContents(TabContents* tab_contents);
+ // Reads split position from the current tab's devtools window and applies
+ // it to the devtools split.
Peter Kasting 2012/10/26 03:22:07 Nit: How about: // Resets the splitter position
+ void UpdateDevToolsSplitPosition();
// Updates various optional child Views, e.g. Bookmarks Bar, Info Bar or the
// Download Shelf in response to a change notification from the specified
@@ -659,9 +663,13 @@ class BrowserView : public BrowserWindow,
// Split view containing the contents container and devtools container.
views::SingleSplitView* contents_split_;
- // Side to dock devtools to
+ // Side to dock devtools to.
DevToolsDockSide devtools_dock_side_;
+ // 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.

Powered by Google App Engine
This is Rietveld 408576698