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

Side by Side Diff: ash/shelf/shelf_layout_manager.cc

Issue 198413003: Enable immersive fullscreen on Windows Ash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/shelf/shelf_layout_manager.h" 5 #include "ash/shelf/shelf_layout_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <cstring> 9 #include <cstring>
10 #include <string> 10 #include <string>
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 } 386 }
387 387
388 void ShelfLayoutManager::RemoveObserver(ShelfLayoutManagerObserver* observer) { 388 void ShelfLayoutManager::RemoveObserver(ShelfLayoutManagerObserver* observer) {
389 observers_.RemoveObserver(observer); 389 observers_.RemoveObserver(observer);
390 } 390 }
391 391
392 //////////////////////////////////////////////////////////////////////////////// 392 ////////////////////////////////////////////////////////////////////////////////
393 // ShelfLayoutManager, Gesture functions: 393 // ShelfLayoutManager, Gesture functions:
394 394
395 void ShelfLayoutManager::OnGestureEdgeSwipe(const ui::GestureEvent& gesture) { 395 void ShelfLayoutManager::OnGestureEdgeSwipe(const ui::GestureEvent& gesture) {
396 // Edge swipe should exit fullscreen, show the tray, and disable auto-hide. 396 // Edge swipe should display the shelf.
397 397 gesture_drag_auto_hide_state_ = SHELF_AUTO_HIDE_SHOWN;
398 if (workspace_controller_->GetWindowState() == 398 gesture_drag_status_ = GESTURE_DRAG_COMPLETE_IN_PROGRESS;
pkotwicz 2014/03/13 18:08:45 Shouldn't we be calling SetAutoHideBehavior() or U
zturner 2014/03/13 19:28:09 Unfortunately this class and the logic is a little
pkotwicz 2014/03/13 19:52:48 Is it possible for a user to do an edge swipe whil
399 WORKSPACE_WINDOW_STATE_FULL_SCREEN) { 399 SetState(SHELF_AUTO_HIDE);
pkotwicz 2014/03/13 18:08:45 Do we still want this behavior when ash::wm::Windo
zturner 2014/03/13 19:28:09 Good point, I'll make this fix.
400 accelerators::ToggleFullscreen(); 400 gesture_drag_status_ = GESTURE_DRAG_NONE;
401 }
402
403 ShelfVisibilityState visibility = CalculateShelfVisibility();
404 if (visibility == SHELF_AUTO_HIDE &&
405 CalculateAutoHideState(visibility) == SHELF_AUTO_HIDE_HIDDEN) {
406 SetState(SHELF_VISIBLE);
407 SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_NEVER);
408 }
409 } 401 }
410 402
411 void ShelfLayoutManager::StartGestureDrag(const ui::GestureEvent& gesture) { 403 void ShelfLayoutManager::StartGestureDrag(const ui::GestureEvent& gesture) {
412 gesture_drag_status_ = GESTURE_DRAG_IN_PROGRESS; 404 gesture_drag_status_ = GESTURE_DRAG_IN_PROGRESS;
413 gesture_drag_amount_ = 0.f; 405 gesture_drag_amount_ = 0.f;
414 gesture_drag_auto_hide_state_ = visibility_state() == SHELF_AUTO_HIDE ? 406 gesture_drag_auto_hide_state_ = visibility_state() == SHELF_AUTO_HIDE ?
415 auto_hide_state() : SHELF_AUTO_HIDE_SHOWN; 407 auto_hide_state() : SHELF_AUTO_HIDE_SHOWN;
416 UpdateShelfBackground(BACKGROUND_CHANGE_ANIMATE); 408 UpdateShelfBackground(BACKGROUND_CHANGE_ANIMATE);
417 } 409 }
418 410
(...skipping 737 matching lines...) Expand 10 before | Expand all | Expand 10 after
1156 SHELF_HIDDEN); 1148 SHELF_HIDDEN);
1157 TargetBounds target_bounds; 1149 TargetBounds target_bounds;
1158 CalculateTargetBounds(state_, &target_bounds); 1150 CalculateTargetBounds(state_, &target_bounds);
1159 UpdateBoundsAndOpacity(target_bounds, true, NULL); 1151 UpdateBoundsAndOpacity(target_bounds, true, NULL);
1160 UpdateVisibilityState(); 1152 UpdateVisibilityState();
1161 } 1153 }
1162 } 1154 }
1163 1155
1164 } // namespace internal 1156 } // namespace internal
1165 } // namespace ash 1157 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/shelf/shelf_layout_manager_unittest.cc » ('j') | ash/wm/immersive_fullscreen_controller.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698