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

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, 1 month 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
Index: ash/wm/window_state.cc
diff --git a/ash/wm/window_state.cc b/ash/wm/window_state.cc
index 1a06a58da1bb0a0b876bb2c64457d10d234feab1..1799c0f958693735bb5b0b260b8c52a286e93844 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() {

Powered by Google App Engine
This is Rietveld 408576698