| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/wm_shelf.h" | 5 #include "ash/shelf/wm_shelf.h" |
| 6 | 6 |
| 7 #include "ash/public/cpp/config.h" | 7 #include "ash/public/cpp/config.h" |
| 8 #include "ash/public/cpp/shelf_item_delegate.h" | 8 #include "ash/public/cpp/shelf_item_delegate.h" |
| 9 #include "ash/public/cpp/shell_window_ids.h" | 9 #include "ash/public/cpp/shell_window_ids.h" |
| 10 #include "ash/root_window_controller.h" | 10 #include "ash/root_window_controller.h" |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 } | 212 } |
| 213 | 213 |
| 214 void WmShelf::UpdateAutoHideState() { | 214 void WmShelf::UpdateAutoHideState() { |
| 215 shelf_layout_manager_->UpdateAutoHideState(); | 215 shelf_layout_manager_->UpdateAutoHideState(); |
| 216 } | 216 } |
| 217 | 217 |
| 218 ShelfBackgroundType WmShelf::GetBackgroundType() const { | 218 ShelfBackgroundType WmShelf::GetBackgroundType() const { |
| 219 return shelf_widget_->GetBackgroundType(); | 219 return shelf_widget_->GetBackgroundType(); |
| 220 } | 220 } |
| 221 | 221 |
| 222 void WmShelf::AppListIsActive(bool active) { |
| 223 shelf_layout_manager()->AppListIsActive(active); |
| 224 } |
| 225 |
| 222 void WmShelf::UpdateVisibilityState() { | 226 void WmShelf::UpdateVisibilityState() { |
| 223 if (shelf_layout_manager_) | 227 if (shelf_layout_manager_) |
| 224 shelf_layout_manager_->UpdateVisibilityState(); | 228 shelf_layout_manager_->UpdateVisibilityState(); |
| 225 } | 229 } |
| 226 | 230 |
| 227 ShelfVisibilityState WmShelf::GetVisibilityState() const { | 231 ShelfVisibilityState WmShelf::GetVisibilityState() const { |
| 228 return shelf_layout_manager_ ? shelf_layout_manager_->visibility_state() | 232 return shelf_layout_manager_ ? shelf_layout_manager_->visibility_state() |
| 229 : SHELF_HIDDEN; | 233 : SHELF_HIDDEN; |
| 230 } | 234 } |
| 231 | 235 |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 | 354 |
| 351 void WmShelf::OnAutoHideStateChanged(ShelfAutoHideState new_state) { | 355 void WmShelf::OnAutoHideStateChanged(ShelfAutoHideState new_state) { |
| 352 for (auto& observer : observers_) | 356 for (auto& observer : observers_) |
| 353 observer.OnAutoHideStateChanged(new_state); | 357 observer.OnAutoHideStateChanged(new_state); |
| 354 } | 358 } |
| 355 | 359 |
| 356 void WmShelf::OnBackgroundUpdated(ShelfBackgroundType background_type, | 360 void WmShelf::OnBackgroundUpdated(ShelfBackgroundType background_type, |
| 357 AnimationChangeType change_type) { | 361 AnimationChangeType change_type) { |
| 358 if (background_type == GetBackgroundType()) | 362 if (background_type == GetBackgroundType()) |
| 359 return; | 363 return; |
| 364 |
| 360 for (auto& observer : observers_) | 365 for (auto& observer : observers_) |
| 361 observer.OnBackgroundTypeChanged(background_type, change_type); | 366 observer.OnBackgroundTypeChanged(background_type, change_type); |
| 362 } | 367 } |
| 363 | 368 |
| 364 } // namespace ash | 369 } // namespace ash |
| OLD | NEW |