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

Unified Diff: chrome/browser/ui/panels/panel_manager.h

Issue 7537030: Make panel adjust bounds per preferred size change notification on Windows. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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
« no previous file with comments | « chrome/browser/ui/panels/panel_browser_window_gtk.cc ('k') | chrome/browser/ui/panels/panel_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/panels/panel_manager.h
===================================================================
--- chrome/browser/ui/panels/panel_manager.h (revision 98900)
+++ chrome/browser/ui/panels/panel_manager.h (working copy)
@@ -45,6 +45,11 @@
void Drag(int delta_x);
void EndDragging(bool cancelled);
+ // Invoked when the preferred window size of the given panel might need to
+ // get changed.
+ void OnPreferredWindowSizeChanged(
+ Panel* panel, const gfx::Size& preferred_window_size);
+
// Returns true if we should bring up the titlebars, given the current mouse
// point.
bool ShouldBringUpTitlebars(int mouse_x, int mouse_y) const;
@@ -74,6 +79,10 @@
auto_hiding_desktop_bar_ = auto_hiding_desktop_bar;
}
+ void enable_auto_sizing(bool enabled) {
+ auto_sizing_enabled_ = enabled;
+ }
+
void SetWorkAreaForTesting(const gfx::Rect& work_area) {
SetWorkArea(work_area);
}
@@ -128,8 +137,14 @@
// Does the real job of bringing up or down the titlebars.
void DoBringUpOrDownTitlebars(bool bring_up);
+ int GetMaxPanelWidth() const;
+ int GetMaxPanelHeight() const;
int GetRightMostAvaialblePosition() const;
+ // Updates the maximum size of each panel as the result of adding, removing,
+ // or sizing panels.
+ void UpdateMaxSizeForAllPanels();
+
Panels panels_;
// Stores the panels that are pending to remove. We want to delay the removal
@@ -164,6 +179,11 @@
ScopedRunnableMethodFactory<PanelManager> method_factory_;
+ // Whether or not bounds will be updated when the preferred content size is
+ // changed. The testing code could set this flag to false so that other tests
+ // will not be affected.
+ bool auto_sizing_enabled_;
+
static const int kPanelsHorizontalSpacing = 4;
DISALLOW_COPY_AND_ASSIGN(PanelManager);
« no previous file with comments | « chrome/browser/ui/panels/panel_browser_window_gtk.cc ('k') | chrome/browser/ui/panels/panel_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698