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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
ash / public / cpp / test / test_nearby_share_delegate.cc [blame]
// Copyright 2020 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/public/cpp/test/test_nearby_share_delegate.h"
#include "base/time/time.h"
#include "test_nearby_share_delegate.h"
#include "ui/gfx/vector_icon_types.h"
namespace ash {
namespace {
const gfx::VectorIcon kEmptyIcon;
} // namespace
TestNearbyShareDelegate::TestNearbyShareDelegate() = default;
TestNearbyShareDelegate::~TestNearbyShareDelegate() = default;
bool TestNearbyShareDelegate::IsEnabled() {
return is_enabled_;
}
void TestNearbyShareDelegate::SetEnabled(bool enabled) {
is_enabled_ = enabled;
}
bool TestNearbyShareDelegate::IsPodButtonVisible() {
return is_pod_button_visible_;
}
bool TestNearbyShareDelegate::IsHighVisibilityOn() {
return is_high_visibility_on_;
}
bool TestNearbyShareDelegate::IsEnableHighVisibilityRequestActive() const {
return is_enable_high_visibility_request_active_;
}
base::TimeTicks TestNearbyShareDelegate::HighVisibilityShutoffTime() const {
return high_visibility_shutoff_time_;
}
void TestNearbyShareDelegate::EnableHighVisibility() {
method_calls_.emplace_back(Method::kEnableHighVisibility);
}
void TestNearbyShareDelegate::DisableHighVisibility() {
method_calls_.emplace_back(Method::kDisableHighVisibility);
}
void TestNearbyShareDelegate::ShowNearbyShareSettings() const {}
const gfx::VectorIcon& TestNearbyShareDelegate::GetIcon(bool on_icon) const {
return kEmptyIcon;
}
std::u16string TestNearbyShareDelegate::GetPlaceholderFeatureName() const {
return u"Nearby Share";
}
::nearby_share::mojom::Visibility TestNearbyShareDelegate::GetVisibility()
const {
return visibility_;
}
void TestNearbyShareDelegate::SetVisibility(
::nearby_share::mojom::Visibility visibility) {
visibility_ = visibility;
}
} // namespace ash