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

Side by Side Diff: ash/wm/immersive_fullscreen_controller.cc

Issue 2248773002: Use MD-ash's auto hide behavior for arc++ windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add ash/shell.h bac to merge to m53 Created 4 years, 4 months 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 unified diff | Download patch
OLDNEW
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
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_hide_shelf_when_fullscreen(!enabled); 274 window_state->set_shelf_mode_in_fullscreen(
275 enabled ? ash::wm::WindowState::SHELF_AUTO_HIDE_VISIBLE
276 : ash::wm::WindowState::SHELF_HIDDEN);
275 277
276 // Update the window's immersive mode state for the window manager. 278 // Update the window's immersive mode state for the window manager.
277 window_state->set_in_immersive_fullscreen(enabled); 279 window_state->set_in_immersive_fullscreen(enabled);
278 280
279 Shell::GetInstance()->UpdateShelfVisibility(); 281 Shell::GetInstance()->UpdateShelfVisibility();
280 282
281 if (enabled_) { 283 if (enabled_) {
282 // Animate enabling immersive mode by sliding out the top-of-window views. 284 // 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. 285 // No animation occurs if a lock is holding the top-of-window views open.
284 286
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
918 ::wm::GetTransientChildren(native_window_); 920 ::wm::GetTransientChildren(native_window_);
919 for (size_t i = 0; i < transient_children.size(); ++i) { 921 for (size_t i = 0; i < transient_children.size(); ++i) {
920 aura::Window* transient_child = transient_children[i]; 922 aura::Window* transient_child = transient_children[i];
921 views::View* anchor_view = GetAnchorView(transient_child); 923 views::View* anchor_view = GetAnchorView(transient_child);
922 if (anchor_view && top_container_->Contains(anchor_view)) 924 if (anchor_view && top_container_->Contains(anchor_view))
923 bubble_observer_->StartObserving(transient_child); 925 bubble_observer_->StartObserving(transient_child);
924 } 926 }
925 } 927 }
926 928
927 } // namespace ash 929 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/web_notification/web_notification_tray_unittest.cc ('k') | chrome/browser/chromeos/login/lock/screen_locker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698