recent_apps_interaction_handler.cc 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // Copyright 2021 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #include "ash/components/phonehub/recent_apps_interaction_handler.h"
  5. #include "ash/components/phonehub/notification.h"
  6. namespace ash {
  7. namespace phonehub {
  8. RecentAppsInteractionHandler::RecentAppsInteractionHandler() = default;
  9. RecentAppsInteractionHandler::~RecentAppsInteractionHandler() = default;
  10. void RecentAppsInteractionHandler::AddRecentAppClickObserver(
  11. RecentAppClickObserver* observer) {
  12. recent_app_click_observer_list_.AddObserver(observer);
  13. }
  14. void RecentAppsInteractionHandler::RemoveRecentAppClickObserver(
  15. RecentAppClickObserver* observer) {
  16. recent_app_click_observer_list_.RemoveObserver(observer);
  17. }
  18. void RecentAppsInteractionHandler::AddObserver(Observer* observer) {
  19. observer_list_.AddObserver(observer);
  20. }
  21. void RecentAppsInteractionHandler::RemoveObserver(Observer* observer) {
  22. observer_list_.RemoveObserver(observer);
  23. }
  24. void RecentAppsInteractionHandler::NotifyRecentAppsViewUiStateUpdated() {
  25. for (auto& observer : observer_list_) {
  26. observer.OnRecentAppsUiStateUpdated();
  27. }
  28. }
  29. } // namespace phonehub
  30. } // namespace ash