12345678910111213141516171819202122232425262728293031323334353637383940 |
- // Copyright 2021 The Chromium Authors. All rights reserved.
- // Use of this source code is governed by a BSD-style license that can be
- // found in the LICENSE file.
- #include "ash/components/phonehub/recent_apps_interaction_handler.h"
- #include "ash/components/phonehub/notification.h"
- namespace ash {
- namespace phonehub {
- RecentAppsInteractionHandler::RecentAppsInteractionHandler() = default;
- RecentAppsInteractionHandler::~RecentAppsInteractionHandler() = default;
- void RecentAppsInteractionHandler::AddRecentAppClickObserver(
- RecentAppClickObserver* observer) {
- recent_app_click_observer_list_.AddObserver(observer);
- }
- void RecentAppsInteractionHandler::RemoveRecentAppClickObserver(
- RecentAppClickObserver* observer) {
- recent_app_click_observer_list_.RemoveObserver(observer);
- }
- void RecentAppsInteractionHandler::AddObserver(Observer* observer) {
- observer_list_.AddObserver(observer);
- }
- void RecentAppsInteractionHandler::RemoveObserver(Observer* observer) {
- observer_list_.RemoveObserver(observer);
- }
- void RecentAppsInteractionHandler::NotifyRecentAppsViewUiStateUpdated() {
- for (auto& observer : observer_list_) {
- observer.OnRecentAppsUiStateUpdated();
- }
- }
- } // namespace phonehub
- } // namespace ash
|