| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ash/wm/window_state.h" | 5 #include "ash/wm/window_state.h" |
| 6 | 6 |
| 7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
| 8 #include "ash/root_window_controller.h" | 8 #include "ash/root_window_controller.h" |
| 9 #include "ash/screen_ash.h" | 9 #include "ash/screen_ash.h" |
| 10 #include "ash/shell_window_ids.h" | 10 #include "ash/shell_window_ids.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 always_restores_to_restore_bounds_(false), | 36 always_restores_to_restore_bounds_(false), |
| 37 hide_shelf_when_fullscreen_(true), | 37 hide_shelf_when_fullscreen_(true), |
| 38 animate_to_fullscreen_(true), | 38 animate_to_fullscreen_(true), |
| 39 minimum_visibility_(false), | 39 minimum_visibility_(false), |
| 40 in_set_window_show_type_(false), | 40 in_set_window_show_type_(false), |
| 41 window_show_type_(ToWindowShowType(GetShowState())) { | 41 window_show_type_(ToWindowShowType(GetShowState())) { |
| 42 window_->AddObserver(this); | 42 window_->AddObserver(this); |
| 43 | 43 |
| 44 #if defined(OS_CHROMEOS) | 44 #if defined(OS_CHROMEOS) |
| 45 // NOTE(pkotwicz): Animating to immersive fullscreen does not look good. When | 45 // NOTE(pkotwicz): Animating to immersive fullscreen does not look good. When |
| 46 // the kAshEnableImmersiveFullscreenForAllWindows flag is set most windows | 46 // switches::UseImmersiveFullscreenForAllWindows() returns true, most windows |
| 47 // can be put into immersive fullscreen. It is not worth the added complexity | 47 // can be put into immersive fullscreen. It is not worth the added complexity |
| 48 // to only animate to fullscreen if the window is put into immersive | 48 // to only animate to fullscreen if the window is put into immersive |
| 49 // fullscreen. | 49 // fullscreen. |
| 50 animate_to_fullscreen_ = !CommandLine::ForCurrentProcess()->HasSwitch( | 50 animate_to_fullscreen_ = !switches::UseImmersiveFullscreenForAllWindows(); |
| 51 switches::kAshEnableImmersiveFullscreenForAllWindows); | |
| 52 #endif | 51 #endif |
| 53 } | 52 } |
| 54 | 53 |
| 55 WindowState::~WindowState() { | 54 WindowState::~WindowState() { |
| 56 } | 55 } |
| 57 | 56 |
| 58 bool WindowState::HasDelegate() const { | 57 bool WindowState::HasDelegate() const { |
| 59 return delegate_; | 58 return delegate_; |
| 60 } | 59 } |
| 61 | 60 |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 } | 337 } |
| 339 return settings; | 338 return settings; |
| 340 } | 339 } |
| 341 | 340 |
| 342 const WindowState* GetWindowState(const aura::Window* window) { | 341 const WindowState* GetWindowState(const aura::Window* window) { |
| 343 return GetWindowState(const_cast<aura::Window*>(window)); | 342 return GetWindowState(const_cast<aura::Window*>(window)); |
| 344 } | 343 } |
| 345 | 344 |
| 346 } // namespace wm | 345 } // namespace wm |
| 347 } // namespace ash | 346 } // namespace ash |
| OLD | NEW |