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

Unified Diff: chrome/browser/ui/panels/panel.cc

Issue 10260001: Remove panel size limit when user resizes it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch for landing Created 8 years, 8 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.h ('k') | chrome/browser/ui/panels/panel_browser_view_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/panels/panel.cc
diff --git a/chrome/browser/ui/panels/panel.cc b/chrome/browser/ui/panels/panel.cc
index 2d5cc59d5004522059401805da633b769d0c4d59..7c89a8a084e072c00d946a7efc815777d0c317f9 100644
--- a/chrome/browser/ui/panels/panel.cc
+++ b/chrome/browser/ui/panels/panel.cc
@@ -136,11 +136,11 @@ void Panel::SetSizeRange(const gfx::Size& min_size, const gfx::Size& max_size) {
ConfigureAutoResize(browser()->GetSelectedWebContents());
}
-void Panel::ClampSize(gfx::Size* size) const {
+gfx::Size Panel::ClampSize(const gfx::Size& size) const {
// The panel width:
// * cannot grow or shrink to go beyond [min_width, max_width]
- int new_width = size->width();
+ int new_width = size.width();
if (new_width > max_size_.width())
new_width = max_size_.width();
if (new_width < min_size_.width())
@@ -148,13 +148,13 @@ void Panel::ClampSize(gfx::Size* size) const {
// The panel height:
// * cannot grow or shrink to go beyond [min_height, max_height]
- int new_height = size->height();
+ int new_height = size.height();
if (new_height > max_size_.height())
new_height = max_size_.height();
if (new_height < min_size_.height())
new_height = min_size_.height();
- size->SetSize(new_width, new_height);
+ return gfx::Size(new_width, new_height);
}
« no previous file with comments | « chrome/browser/ui/panels/panel.h ('k') | chrome/browser/ui/panels/panel_browser_view_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698