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_util.h" | 9 #include "ash/screen_util.h" |
10 #include "ash/shell_window_ids.h" | 10 #include "ash/shell_window_ids.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
89 can_consume_system_keys_(false), | 89 can_consume_system_keys_(false), |
90 top_row_keys_are_function_keys_(false), | 90 top_row_keys_are_function_keys_(false), |
91 unminimize_to_restore_bounds_(false), | 91 unminimize_to_restore_bounds_(false), |
92 hide_shelf_when_fullscreen_(true), | 92 hide_shelf_when_fullscreen_(true), |
93 animate_to_fullscreen_(true), | 93 animate_to_fullscreen_(true), |
94 minimum_visibility_(false), | 94 minimum_visibility_(false), |
95 can_be_dragged_(true), | 95 can_be_dragged_(true), |
96 ignore_property_change_(false), | 96 ignore_property_change_(false), |
97 current_state_(new DefaultState(ToWindowStateType(GetShowState()))) { | 97 current_state_(new DefaultState(ToWindowStateType(GetShowState()))) { |
98 window_->AddObserver(this); | 98 window_->AddObserver(this); |
99 #if defined(OS_CHROMEOS) | |
pkotwicz
2014/03/13 18:34:32
Can you merge with https://codereview.chromium.org
zturner
2014/03/13 19:28:10
Will wait for that patch to land and then rebase t
| |
100 // NOTE(pkotwicz): Animating to immersive fullscreen does not look good. When | 99 // NOTE(pkotwicz): Animating to immersive fullscreen does not look good. When |
101 // switches::UseImmersiveFullscreenForAllWindows() returns true, most windows | 100 // switches::UseImmersiveFullscreenForAllWindows() returns true, most windows |
102 // can be put into immersive fullscreen. It is not worth the added complexity | 101 // can be put into immersive fullscreen. It is not worth the added complexity |
103 // to only animate to fullscreen if the window is put into immersive | 102 // to only animate to fullscreen if the window is put into immersive |
104 // fullscreen. | 103 // fullscreen. |
105 animate_to_fullscreen_ = !switches::UseImmersiveFullscreenForAllWindows(); | 104 animate_to_fullscreen_ = !switches::UseImmersiveFullscreenForAllWindows(); |
106 #endif | |
107 } | 105 } |
108 | 106 |
109 WindowState::~WindowState() { | 107 WindowState::~WindowState() { |
110 } | 108 } |
111 | 109 |
112 bool WindowState::HasDelegate() const { | 110 bool WindowState::HasDelegate() const { |
113 return delegate_; | 111 return delegate_; |
114 } | 112 } |
115 | 113 |
116 void WindowState::SetDelegate(scoped_ptr<WindowStateDelegate> delegate) { | 114 void WindowState::SetDelegate(scoped_ptr<WindowStateDelegate> delegate) { |
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
425 } | 423 } |
426 return settings; | 424 return settings; |
427 } | 425 } |
428 | 426 |
429 const WindowState* GetWindowState(const aura::Window* window) { | 427 const WindowState* GetWindowState(const aura::Window* window) { |
430 return GetWindowState(const_cast<aura::Window*>(window)); | 428 return GetWindowState(const_cast<aura::Window*>(window)); |
431 } | 429 } |
432 | 430 |
433 } // namespace wm | 431 } // namespace wm |
434 } // namespace ash | 432 } // namespace ash |
OLD | NEW |