forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathambient_view_delegate_impl.cc
39 lines (29 loc) · 1.21 KB
/
ambient_view_delegate_impl.cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Copyright 2020 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/ambient/ambient_view_delegate_impl.h"
#include "ash/ambient/ambient_controller.h"
#include "ash/ambient/model/ambient_backend_model.h"
#include "base/bind.h"
#include "base/threading/sequenced_task_runner_handle.h"
namespace ash {
AmbientViewDelegateImpl::AmbientViewDelegateImpl(
AmbientController* ambient_controller)
: ambient_controller_(ambient_controller) {}
AmbientViewDelegateImpl::~AmbientViewDelegateImpl() = default;
void AmbientViewDelegateImpl::AddObserver(
AmbientViewDelegateObserver* observer) {
view_delegate_observers_.AddObserver(observer);
}
void AmbientViewDelegateImpl::RemoveObserver(
AmbientViewDelegateObserver* observer) {
view_delegate_observers_.RemoveObserver(observer);
}
AmbientBackendModel* AmbientViewDelegateImpl::GetAmbientBackendModel() {
return ambient_controller_->GetAmbientBackendModel();
}
void AmbientViewDelegateImpl::OnPhotoTransitionAnimationCompleted() {
for (auto& observer : view_delegate_observers_)
observer.OnPhotoTransitionAnimationCompleted();
}
} // namespace ash