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

Unified Diff: ash/wm/window_state.cc

Issue 83343006: Enable immersive fullscreen for hosted apps part 2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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/header_painter.cc ('k') | chrome/browser/ui/views/frame/browser_frame_ash.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/window_state.cc
diff --git a/ash/wm/window_state.cc b/ash/wm/window_state.cc
index 85976b5a7f47021876ab875a045a564c3f293554..e29b9642f5f6d0022f1a7d24da212827df292e8f 100644
--- a/ash/wm/window_state.cc
+++ b/ash/wm/window_state.cc
@@ -4,6 +4,7 @@
#include "ash/wm/window_state.h"
+#include "ash/ash_switches.h"
#include "ash/root_window_controller.h"
#include "ash/screen_ash.h"
#include "ash/shell_window_ids.h"
@@ -12,6 +13,7 @@
#include "ash/wm/window_state_observer.h"
#include "ash/wm/window_util.h"
#include "ash/wm/wm_types.h"
+#include "base/command_line.h"
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/window.h"
#include "ui/aura/window_delegate.h"
@@ -44,6 +46,16 @@ WindowState::WindowState(aura::Window* window)
minimum_visibility_(false),
window_show_type_(ToWindowShowType(GetShowState())) {
window_->AddObserver(this);
+
+#if defined(OS_CHROMEOS)
+ // NOTE(pkotwicz): Animating to immersive fullscreen does not look good. When
+ // the kAshEnableImmersiveFullscreenForAllWindows flag is set most windows
+ // can be put into immersive fullscreen. It is not worth the added complexity
+ // to only animate to fullscreen if the window is put into immersive
+ // fullscreen.
+ animate_to_fullscreen_ = !CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kAshEnableImmersiveFullscreenForAllWindows);
+#endif
}
WindowState::~WindowState() {
« no previous file with comments | « ash/wm/header_painter.cc ('k') | chrome/browser/ui/views/frame/browser_frame_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698