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

Unified Diff: chrome/browser/ui/window_sizer/window_sizer_ash.cc

Issue 13934007: Adding experimental maximize mode (behind a flag) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added comment and tabbed reference Created 7 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/views/frame/app_non_client_frame_view_ash.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/window_sizer/window_sizer_ash.cc
diff --git a/chrome/browser/ui/window_sizer/window_sizer_ash.cc b/chrome/browser/ui/window_sizer/window_sizer_ash.cc
index e4ed3740c7622e4c83d164d68f76577b593a5609..b6184bd50e521e9aaa54e66b7d0380eecb2a60b5 100644
--- a/chrome/browser/ui/window_sizer/window_sizer_ash.cc
+++ b/chrome/browser/ui/window_sizer/window_sizer_ash.cc
@@ -159,6 +159,17 @@ bool WindowSizer::GetBoundsOverrideAsh(gfx::Rect* bounds_in_screen,
}
bounds_in_screen->SetRect(0, 0, 0, 0);
+ // Experiment: Force the maximize mode for all windows.
+ if (ash::Shell::IsForcedMaximizeMode()) {
+ // Exceptions: Do not maximize popups and do not maximize windowed V1 apps
+ // which explicitly specify a |show_state| (they might be tuned for a
+ // particular resolution / type).
+ bool is_tabbed = browser_ && browser_->is_type_tabbed();
+ bool is_popup = browser_ && browser_->is_type_popup();
+ if (!is_popup && (is_tabbed || *show_state == ui::SHOW_STATE_DEFAULT))
+ *show_state = ui::SHOW_STATE_MAXIMIZED;
+ }
+
ui::WindowShowState passed_show_state = *show_state;
if (!GetSavedWindowBounds(bounds_in_screen, show_state))
GetDefaultWindowBounds(bounds_in_screen);
« no previous file with comments | « chrome/browser/ui/views/frame/app_non_client_frame_view_ash.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698