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/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 936 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
947 else | 947 else |
948 target_bounds->status_bounds_in_shelf.set_x( | 948 target_bounds->status_bounds_in_shelf.set_x( |
949 target_bounds->shelf_bounds_in_root.width() - | 949 target_bounds->shelf_bounds_in_root.width() - |
950 kShelfSize); | 950 kShelfSize); |
951 } | 951 } |
952 } | 952 } |
953 | 953 |
954 void ShelfLayoutManager::UpdateShelfBackground( | 954 void ShelfLayoutManager::UpdateShelfBackground( |
955 BackgroundAnimatorChangeType type) { | 955 BackgroundAnimatorChangeType type) { |
956 const ShelfBackgroundType background_type(GetShelfBackgroundType()); | 956 const ShelfBackgroundType background_type(GetShelfBackgroundType()); |
957 shelf_widget_->SetPaintsBackground(background_type, type); | 957 // TODO(bruthig): Remove. |
| 958 // shelf_widget_->SetPaintsBackground(background_type, type); |
958 FOR_EACH_OBSERVER(ShelfLayoutManagerObserver, observers_, | 959 FOR_EACH_OBSERVER(ShelfLayoutManagerObserver, observers_, |
959 OnBackgroundUpdated(background_type, type)); | 960 OnBackgroundUpdated(background_type, type)); |
960 } | 961 } |
961 | 962 |
962 ShelfBackgroundType ShelfLayoutManager::GetShelfBackgroundType() const { | 963 ShelfBackgroundType ShelfLayoutManager::GetShelfBackgroundType() const { |
963 if (state_.visibility_state != SHELF_AUTO_HIDE && | 964 if (state_.visibility_state != SHELF_AUTO_HIDE && |
964 state_.window_state == wm::WORKSPACE_WINDOW_STATE_MAXIMIZED) { | 965 state_.window_state == wm::WORKSPACE_WINDOW_STATE_MAXIMIZED) { |
965 return SHELF_BACKGROUND_MAXIMIZED; | 966 return SHELF_BACKGROUND_MAXIMIZED; |
966 } | 967 } |
967 | 968 |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1191 UpdateBoundsAndOpacity(target_bounds, true, NULL); | 1192 UpdateBoundsAndOpacity(target_bounds, true, NULL); |
1192 UpdateVisibilityState(); | 1193 UpdateVisibilityState(); |
1193 } | 1194 } |
1194 | 1195 |
1195 void ShelfLayoutManager::UpdateShelfVisibilityAfterLoginUIChange() { | 1196 void ShelfLayoutManager::UpdateShelfVisibilityAfterLoginUIChange() { |
1196 UpdateVisibilityState(); | 1197 UpdateVisibilityState(); |
1197 LayoutShelf(); | 1198 LayoutShelf(); |
1198 } | 1199 } |
1199 | 1200 |
1200 } // namespace ash | 1201 } // namespace ash |
OLD | NEW |