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 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
262 } | 262 } |
263 | 263 |
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 LOG(ERROR) << "SetEnabled:" << enabled; | |
reveman
2016/08/15 17:28:01
debug code?
oshima
2016/08/15 17:34:34
Uploading new CL was stuck in the comment input :(
| |
273 | |
272 ash::wm::WindowState* window_state = wm::GetWindowState(native_window_); | 274 ash::wm::WindowState* window_state = wm::GetWindowState(native_window_); |
273 // Auto hide the shelf in immersive fullscreen instead of hiding it. | 275 // Auto hide the shelf in immersive fullscreen instead of hiding it. |
274 window_state->set_hide_shelf_when_fullscreen(!enabled); | 276 // window_state->_shelf_when_fullscreen(!enabled); |
reveman
2016/08/15 17:28:01
debug code?
| |
277 | |
278 window_state->set_shelf_mode_in_fullscreen( | |
279 ash::wm::WindowState::SHELF_AUTO_HIDE_VISIBLE); | |
275 | 280 |
276 // Update the window's immersive mode state for the window manager. | 281 // Update the window's immersive mode state for the window manager. |
277 window_state->set_in_immersive_fullscreen(enabled); | 282 window_state->set_in_immersive_fullscreen(enabled); |
278 | 283 |
279 Shell::GetInstance()->UpdateShelfVisibility(); | 284 Shell::GetInstance()->UpdateShelfVisibility(); |
280 | 285 |
281 if (enabled_) { | 286 if (enabled_) { |
282 // Animate enabling immersive mode by sliding out the top-of-window views. | 287 // Animate enabling immersive mode by sliding out the top-of-window views. |
283 // No animation occurs if a lock is holding the top-of-window views open. | 288 // No animation occurs if a lock is holding the top-of-window views open. |
284 | 289 |
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
918 ::wm::GetTransientChildren(native_window_); | 923 ::wm::GetTransientChildren(native_window_); |
919 for (size_t i = 0; i < transient_children.size(); ++i) { | 924 for (size_t i = 0; i < transient_children.size(); ++i) { |
920 aura::Window* transient_child = transient_children[i]; | 925 aura::Window* transient_child = transient_children[i]; |
921 views::View* anchor_view = GetAnchorView(transient_child); | 926 views::View* anchor_view = GetAnchorView(transient_child); |
922 if (anchor_view && top_container_->Contains(anchor_view)) | 927 if (anchor_view && top_container_->Contains(anchor_view)) |
923 bubble_observer_->StartObserving(transient_child); | 928 bubble_observer_->StartObserving(transient_child); |
924 } | 929 } |
925 } | 930 } |
926 | 931 |
927 } // namespace ash | 932 } // namespace ash |
OLD | NEW |