| 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/shelf.h" | 5 #include "ash/shelf/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 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 } | 317 } |
| 318 | 318 |
| 319 ShelfLockingManager* Shelf::GetShelfLockingManagerForTesting() { | 319 ShelfLockingManager* Shelf::GetShelfLockingManagerForTesting() { |
| 320 return &shelf_locking_manager_; | 320 return &shelf_locking_manager_; |
| 321 } | 321 } |
| 322 | 322 |
| 323 ShelfView* Shelf::GetShelfViewForTesting() { | 323 ShelfView* Shelf::GetShelfViewForTesting() { |
| 324 return shelf_widget_->shelf_view_for_testing(); | 324 return shelf_widget_->shelf_view_for_testing(); |
| 325 } | 325 } |
| 326 | 326 |
| 327 void Shelf::OnAppListIsActive(bool is_active) { |
| 328 shelf_layout_manager()->OnAppListIsActive(is_active); |
| 329 } |
| 330 |
| 327 void Shelf::WillDeleteShelfLayoutManager() { | 331 void Shelf::WillDeleteShelfLayoutManager() { |
| 328 if (Shell::GetAshConfig() == Config::MASH) { | 332 if (Shell::GetAshConfig() == Config::MASH) { |
| 329 // TODO(sky): this should be removed once Shell is used everywhere. | 333 // TODO(sky): this should be removed once Shell is used everywhere. |
| 330 ShutdownShelfWidget(); | 334 ShutdownShelfWidget(); |
| 331 } | 335 } |
| 332 | 336 |
| 333 // Clear event handlers that might forward events to the destroyed instance. | 337 // Clear event handlers that might forward events to the destroyed instance. |
| 334 auto_hide_event_handler_.reset(); | 338 auto_hide_event_handler_.reset(); |
| 335 bezel_event_handler_.reset(); | 339 bezel_event_handler_.reset(); |
| 336 | 340 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 358 | 362 |
| 359 void Shelf::OnBackgroundUpdated(ShelfBackgroundType background_type, | 363 void Shelf::OnBackgroundUpdated(ShelfBackgroundType background_type, |
| 360 AnimationChangeType change_type) { | 364 AnimationChangeType change_type) { |
| 361 if (background_type == GetBackgroundType()) | 365 if (background_type == GetBackgroundType()) |
| 362 return; | 366 return; |
| 363 for (auto& observer : observers_) | 367 for (auto& observer : observers_) |
| 364 observer.OnBackgroundTypeChanged(background_type, change_type); | 368 observer.OnBackgroundTypeChanged(background_type, change_type); |
| 365 } | 369 } |
| 366 | 370 |
| 367 } // namespace ash | 371 } // namespace ash |
| OLD | NEW |