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
53
54
55
56
ash / webui / personalization_app / test / fake_personalization_app_user_provider.cc [blame]
// Copyright 2021 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_user_provider.h"
#include "ash/public/cpp/personalization_app/user_display_info.h"
#include "ash/webui/personalization_app/mojom/personalization_app.mojom-forward.h"
#include "content/public/browser/web_ui.h"
#include "mojo/public/cpp/base/big_buffer.h"
namespace ash::personalization_app {
FakePersonalizationAppUserProvider::FakePersonalizationAppUserProvider(
content::WebUI* web_ui) {}
FakePersonalizationAppUserProvider::~FakePersonalizationAppUserProvider() =
default;
void FakePersonalizationAppUserProvider::BindInterface(
mojo::PendingReceiver<personalization_app::mojom::UserProvider> receiver) {
user_receiver_.reset();
user_receiver_.Bind(std::move(receiver));
}
void FakePersonalizationAppUserProvider::SetUserImageObserver(
mojo::PendingRemote<ash::personalization_app::mojom::UserImageObserver>
observer) {}
void FakePersonalizationAppUserProvider::GetUserInfo(
GetUserInfoCallback callback) {
// auto user_info_ptr = ash::personalization_app::mojom::UserInfo::New();
// user_info_ptr->email = "fake-email";
// user_info_ptr->name = "Fake Name";
ash::personalization_app::UserDisplayInfo display_info;
display_info.email = "fake-email";
display_info.name = "Fake Name";
std::move(callback).Run(std::move(display_info));
}
void FakePersonalizationAppUserProvider::GetDefaultUserImages(
GetDefaultUserImagesCallback callback) {}
bool FakePersonalizationAppUserProvider::IsCustomizationSelectorsPrefEnabled() {
return true;
}
void FakePersonalizationAppUserProvider::SelectDefaultImage(int index) {}
void FakePersonalizationAppUserProvider::SelectProfileImage() {}
void FakePersonalizationAppUserProvider::SelectCameraImage(
::mojo_base::BigBuffer data) {}
void FakePersonalizationAppUserProvider::SelectImageFromDisk() {}
} // namespace ash::personalization_app