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

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

Issue 309793005: Fixing problem with edge swipe exiting immersive mode (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: test removed Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | ash/wm/immersive_fullscreen_controller_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/ash_constants.h" 9 #include "ash/ash_constants.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 } 267 }
268 268
269 void ImmersiveFullscreenController::SetEnabled(WindowType window_type, 269 void ImmersiveFullscreenController::SetEnabled(WindowType window_type,
270 bool enabled) { 270 bool enabled) {
271 if (enabled_ == enabled) 271 if (enabled_ == enabled)
272 return; 272 return;
273 enabled_ = enabled; 273 enabled_ = enabled;
274 274
275 EnableWindowObservers(enabled_); 275 EnableWindowObservers(enabled_);
276 276
277 ash::wm::WindowState* window_state = wm::GetWindowState(native_window_);
277 // Auto hide the shelf in immersive fullscreen instead of hiding it. 278 // Auto hide the shelf in immersive fullscreen instead of hiding it.
278 wm::GetWindowState(native_window_)->set_hide_shelf_when_fullscreen(!enabled); 279 window_state->set_hide_shelf_when_fullscreen(!enabled);
280
281 // Update the window's immersive mode state for the window manager.
282 window_state->set_in_immersive_fullscreen(enabled);
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
285 // Do a reveal to set the initial state for the animation. (And any 290 // Do a reveal to set the initial state for the animation. (And any
286 // required state in case the animation cannot run because of a lock holding 291 // required state in case the animation cannot run because of a lock holding
287 // the top-of-window views open.) 292 // the top-of-window views open.)
288 MaybeStartReveal(ANIMATE_NO); 293 MaybeStartReveal(ANIMATE_NO);
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
943 AsBubbleDelegate(transient_child); 948 AsBubbleDelegate(transient_child);
944 if (bubble_delegate && 949 if (bubble_delegate &&
945 bubble_delegate->GetAnchorView() && 950 bubble_delegate->GetAnchorView() &&
946 top_container_->Contains(bubble_delegate->GetAnchorView())) { 951 top_container_->Contains(bubble_delegate->GetAnchorView())) {
947 bubble_manager_->StartObserving(transient_child); 952 bubble_manager_->StartObserving(transient_child);
948 } 953 }
949 } 954 }
950 } 955 }
951 956
952 } // namespace ash 957 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/wm/immersive_fullscreen_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698