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

Unified Diff: chrome/browser/ui/views/extensions/shell_window_frame_view.cc

Issue 15969028: Fixed extension/app window maximum size calculation on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Implemented additional review suggestions. Created 7 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/extensions/shell_window_frame_view.cc
diff --git a/chrome/browser/ui/views/extensions/shell_window_frame_view.cc b/chrome/browser/ui/views/extensions/shell_window_frame_view.cc
index 165691de80d275b274d9c8bab52417f7910fea96..628e1d9418ad1d169eec6300f3946832bb40e607 100644
--- a/chrome/browser/ui/views/extensions/shell_window_frame_view.cc
+++ b/chrome/browser/ui/views/extensions/shell_window_frame_view.cc
@@ -345,13 +345,14 @@ gfx::Size ShellWindowFrameView::GetMinimumSize() {
gfx::Size ShellWindowFrameView::GetMaximumSize() {
gfx::Size max_size = frame_->client_view()->GetMaximumSize();
- if (window_->frameless())
- return max_size;
- if (!max_size.IsEmpty()) {
- gfx::Rect client_bounds = GetBoundsForClientView();
- max_size.Enlarge(0, client_bounds.y());
- }
+ // Add to the client maximum size the height of any title bar and borders.
+ gfx::Size client_size = GetBoundsForClientView().size();
+ if (max_size.width())
+ max_size.Enlarge(width() - client_size.width(), 0);
+ if (max_size.height())
+ max_size.Enlarge(0, height() - client_size.height());
+
return max_size;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698