OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |