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

Unified Diff: ash/wm/custom_frame_view_ash.cc

Issue 183793011: App windows on ChromeOS cannot be sized to their maximum height (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@appwindow_chromeos_insets
Patch Set: Addressed review comments Created 6 years, 9 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 | « ash/wm/custom_frame_view_ash.h ('k') | ash/wm/custom_frame_view_ash_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/custom_frame_view_ash.cc
diff --git a/ash/wm/custom_frame_view_ash.cc b/ash/wm/custom_frame_view_ash.cc
index 85082d3a9c4b75b2718a04666d5b68e342e4c772..4eb5c8fb20699cfc2bfdecc66e458dc038645d8c 100644
--- a/ash/wm/custom_frame_view_ash.cc
+++ b/ash/wm/custom_frame_view_ash.cc
@@ -475,7 +475,16 @@ gfx::Size CustomFrameViewAsh::GetMinimumSize() {
}
gfx::Size CustomFrameViewAsh::GetMaximumSize() {
- return frame_->client_view()->GetMaximumSize();
+ gfx::Size max_client_size(frame_->client_view()->GetMaximumSize());
+ int width = 0;
+ int height = 0;
+
+ if (max_client_size.width() > 0)
+ width = std::max(header_view_->GetMinimumWidth(), max_client_size.width());
+ if (max_client_size.height() > 0)
+ height = NonClientTopBorderHeight() + max_client_size.height();
+
+ return gfx::Size(width, height);
}
void CustomFrameViewAsh::SchedulePaintInRect(const gfx::Rect& r) {
« no previous file with comments | « ash/wm/custom_frame_view_ash.h ('k') | ash/wm/custom_frame_view_ash_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698