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/immersive_fullscreen_controller.h" | 5 #include "ash/wm/immersive_fullscreen_controller.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "ash/common/ash_constants.h" | 9 #include "ash/common/ash_constants.h" |
10 #include "ash/common/wm/immersive/wm_immersive_fullscreen_controller_delegate.h" | 10 #include "ash/common/wm/immersive/wm_immersive_fullscreen_controller_delegate.h" |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 void ImmersiveFullscreenController::SetEnabled(WindowType window_type, | 264 void ImmersiveFullscreenController::SetEnabled(WindowType window_type, |
265 bool enabled) { | 265 bool enabled) { |
266 if (enabled_ == enabled) | 266 if (enabled_ == enabled) |
267 return; | 267 return; |
268 enabled_ = enabled; | 268 enabled_ = enabled; |
269 | 269 |
270 EnableWindowObservers(enabled_); | 270 EnableWindowObservers(enabled_); |
271 | 271 |
272 ash::wm::WindowState* window_state = wm::GetWindowState(native_window_); | 272 ash::wm::WindowState* window_state = wm::GetWindowState(native_window_); |
273 // Auto hide the shelf in immersive fullscreen instead of hiding it. | 273 // Auto hide the shelf in immersive fullscreen instead of hiding it. |
274 window_state->set_shelf_mode_in_fullscreen( | 274 window_state->set_hide_shelf_when_fullscreen(!enabled); |
275 enabled ? ash::wm::WindowState::SHELF_AUTO_HIDE_VISIBLE | |
276 : ash::wm::WindowState::SHELF_HIDDEN); | |
277 | 275 |
278 // Update the window's immersive mode state for the window manager. | 276 // Update the window's immersive mode state for the window manager. |
279 window_state->set_in_immersive_fullscreen(enabled); | 277 window_state->set_in_immersive_fullscreen(enabled); |
280 | 278 |
281 Shell::GetInstance()->UpdateShelfVisibility(); | 279 Shell::GetInstance()->UpdateShelfVisibility(); |
282 | 280 |
283 if (enabled_) { | 281 if (enabled_) { |
284 // Animate enabling immersive mode by sliding out the top-of-window views. | 282 // Animate enabling immersive mode by sliding out the top-of-window views. |
285 // No animation occurs if a lock is holding the top-of-window views open. | 283 // No animation occurs if a lock is holding the top-of-window views open. |
286 | 284 |
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
920 ::wm::GetTransientChildren(native_window_); | 918 ::wm::GetTransientChildren(native_window_); |
921 for (size_t i = 0; i < transient_children.size(); ++i) { | 919 for (size_t i = 0; i < transient_children.size(); ++i) { |
922 aura::Window* transient_child = transient_children[i]; | 920 aura::Window* transient_child = transient_children[i]; |
923 views::View* anchor_view = GetAnchorView(transient_child); | 921 views::View* anchor_view = GetAnchorView(transient_child); |
924 if (anchor_view && top_container_->Contains(anchor_view)) | 922 if (anchor_view && top_container_->Contains(anchor_view)) |
925 bubble_observer_->StartObserving(transient_child); | 923 bubble_observer_->StartObserving(transient_child); |
926 } | 924 } |
927 } | 925 } |
928 | 926 |
929 } // namespace ash | 927 } // namespace ash |
OLD | NEW |