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
40
41
42
43
44
45
46
47
48
49
50
51
52
ash / webui / personalization_app / test / fake_personalization_app_ambient_provider.cc [blame]
// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ash/webui/personalization_app/test/fake_personalization_app_ambient_provider.h"
#include "ash/constants/ash_features.h"
#include "ash/webui/personalization_app/mojom/personalization_app.mojom-forward.h"
#include "content/public/browser/web_ui.h"
namespace ash::personalization_app {
FakePersonalizationAppAmbientProvider::FakePersonalizationAppAmbientProvider(
content::WebUI* web_ui) {}
FakePersonalizationAppAmbientProvider::
~FakePersonalizationAppAmbientProvider() = default;
void FakePersonalizationAppAmbientProvider::BindInterface(
mojo::PendingReceiver<personalization_app::mojom::AmbientProvider>
receiver) {
ambient_receiver_.reset();
ambient_receiver_.Bind(std::move(receiver));
}
void FakePersonalizationAppAmbientProvider::IsAmbientModeEnabled(
IsAmbientModeEnabledCallback callback) {
std::move(callback).Run(std::move(true));
}
void FakePersonalizationAppAmbientProvider::ShouldShowTimeOfDayBanner(
ShouldShowTimeOfDayBannerCallback callback) {
std::move(callback).Run(features::IsTimeOfDayScreenSaverEnabled());
}
void FakePersonalizationAppAmbientProvider::
IsGeolocationEnabledForSystemServices(
IsGeolocationEnabledForSystemServicesCallback callback) {
std::move(callback).Run(geolocation_enabled_for_system);
}
void FakePersonalizationAppAmbientProvider::IsGeolocationUserModifiable(
IsGeolocationUserModifiableCallback callback) {
std::move(callback).Run(is_geolocation_user_modifiable);
}
void FakePersonalizationAppAmbientProvider::
EnableGeolocationForSystemServices() {
geolocation_enabled_for_system = true;
}
} // namespace ash::personalization_app