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

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

Issue 2909763002: Revert of Rename MaximizeMode to TabletMode (Closed)
Patch Set: Created 3 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
« no previous file with comments | « ash/mus/bridge/shell_port_mash.cc ('k') | ash/shell.h » ('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 (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 <vector> 9 #include <vector>
10 10
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 StopAutoHideTimer(); 523 StopAutoHideTimer();
524 524
525 State old_state = state_; 525 State old_state = state_;
526 state_ = state; 526 state_ = state;
527 527
528 AnimationChangeType change_type = AnimationChangeType::ANIMATE; 528 AnimationChangeType change_type = AnimationChangeType::ANIMATE;
529 bool delay_background_change = false; 529 bool delay_background_change = false;
530 530
531 // Do not animate the background when: 531 // Do not animate the background when:
532 // - Going from a hidden / auto hidden shelf in fullscreen to a visible shelf 532 // - Going from a hidden / auto hidden shelf in fullscreen to a visible shelf
533 // in tablet mode. 533 // in maximized mode.
534 // - Going from an auto hidden shelf in tablet mode to a visible shelf in 534 // - Going from an auto hidden shelf in maximized mode to a visible shelf in
535 // tablet mode. 535 // maximized mode.
536 if (state.visibility_state == SHELF_VISIBLE && 536 if (state.visibility_state == SHELF_VISIBLE &&
537 state.window_state == wm::WORKSPACE_WINDOW_STATE_MAXIMIZED && 537 state.window_state == wm::WORKSPACE_WINDOW_STATE_MAXIMIZED &&
538 old_state.visibility_state != SHELF_VISIBLE) { 538 old_state.visibility_state != SHELF_VISIBLE) {
539 change_type = AnimationChangeType::IMMEDIATE; 539 change_type = AnimationChangeType::IMMEDIATE;
540 } else { 540 } else {
541 // Delay the animation when the shelf was hidden, and has just been made 541 // Delay the animation when the shelf was hidden, and has just been made
542 // visible (e.g. using a gesture-drag). 542 // visible (e.g. using a gesture-drag).
543 if (state.visibility_state == SHELF_VISIBLE && 543 if (state.visibility_state == SHELF_VISIBLE &&
544 old_state.visibility_state == SHELF_AUTO_HIDE && 544 old_state.visibility_state == SHELF_AUTO_HIDE &&
545 old_state.auto_hide_state == SHELF_AUTO_HIDE_HIDDEN) { 545 old_state.auto_hide_state == SHELF_AUTO_HIDE_HIDDEN) {
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
1154 gesture_drag_status_ = GESTURE_DRAG_NONE; 1154 gesture_drag_status_ = GESTURE_DRAG_NONE;
1155 } 1155 }
1156 1156
1157 void ShelfLayoutManager::CancelGestureDrag() { 1157 void ShelfLayoutManager::CancelGestureDrag() {
1158 gesture_drag_status_ = GESTURE_DRAG_CANCEL_IN_PROGRESS; 1158 gesture_drag_status_ = GESTURE_DRAG_CANCEL_IN_PROGRESS;
1159 UpdateVisibilityState(); 1159 UpdateVisibilityState();
1160 gesture_drag_status_ = GESTURE_DRAG_NONE; 1160 gesture_drag_status_ = GESTURE_DRAG_NONE;
1161 } 1161 }
1162 1162
1163 } // namespace ash 1163 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/bridge/shell_port_mash.cc ('k') | ash/shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698