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

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

Issue 2326703002: Do not show shelf or top chrome hints while in Ash immersive mode (Closed)
Patch Set: address comments Created 4 years, 3 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/common/shelf/shelf_constants.cc ('k') | ash/shelf/shelf_layout_manager_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 (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/common/shelf/shelf_layout_manager.h" 5 #include "ash/common/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 1001 matching lines...) Expand 10 before | Expand all | Expand 10 after
1012 } 1012 }
1013 1013
1014 float ShelfLayoutManager::ComputeTargetOpacity(const State& state) { 1014 float ShelfLayoutManager::ComputeTargetOpacity(const State& state) {
1015 if (gesture_drag_status_ == GESTURE_DRAG_IN_PROGRESS || 1015 if (gesture_drag_status_ == GESTURE_DRAG_IN_PROGRESS ||
1016 state.visibility_state == SHELF_VISIBLE) { 1016 state.visibility_state == SHELF_VISIBLE) {
1017 return 1.0f; 1017 return 1.0f;
1018 } 1018 }
1019 // In Chrome OS Material Design, when shelf is hidden during auto hide state, 1019 // In Chrome OS Material Design, when shelf is hidden during auto hide state,
1020 // target bounds are also hidden. So the window can extend to the edge of 1020 // target bounds are also hidden. So the window can extend to the edge of
1021 // screen. 1021 // screen.
1022 if (ash::MaterialDesignController::IsShelfMaterial() || 1022 if (ash::MaterialDesignController::IsImmersiveModeMaterial() ||
1023 invisible_auto_hide_shelf_) { 1023 invisible_auto_hide_shelf_) {
1024 return (state.visibility_state == SHELF_AUTO_HIDE && 1024 return (state.visibility_state == SHELF_AUTO_HIDE &&
1025 state.auto_hide_state == SHELF_AUTO_HIDE_SHOWN) 1025 state.auto_hide_state == SHELF_AUTO_HIDE_SHOWN)
1026 ? 1.0f 1026 ? 1.0f
1027 : 0.0f; 1027 : 0.0f;
1028 } 1028 }
1029 return (state.visibility_state == SHELF_AUTO_HIDE) ? 1.0f : 0.0f; 1029 return (state.visibility_state == SHELF_AUTO_HIDE) ? 1.0f : 0.0f;
1030 } 1030 }
1031 1031
1032 ash::wm::WindowState::FullscreenShelfMode 1032 ash::wm::WindowState::FullscreenShelfMode
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
1138 gesture_drag_status_ = GESTURE_DRAG_NONE; 1138 gesture_drag_status_ = GESTURE_DRAG_NONE;
1139 } 1139 }
1140 1140
1141 int ShelfLayoutManager::GetShelfInsetsForAutoHide() const { 1141 int ShelfLayoutManager::GetShelfInsetsForAutoHide() const {
1142 if (invisible_auto_hide_shelf_) 1142 if (invisible_auto_hide_shelf_)
1143 return 0; 1143 return 0;
1144 return GetShelfConstant(SHELF_INSETS_FOR_AUTO_HIDE); 1144 return GetShelfConstant(SHELF_INSETS_FOR_AUTO_HIDE);
1145 } 1145 }
1146 1146
1147 } // namespace ash 1147 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/shelf/shelf_constants.cc ('k') | ash/shelf/shelf_layout_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698