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