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
ash / system / network / network_detailed_network_view.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/system/network/network_detailed_network_view.h"
#include <memory>
#include "ash/system/network/network_detailed_network_view_impl.h"
#include "ash/system/tray/detailed_view_delegate.h"
namespace ash {
namespace {
NetworkDetailedNetworkView::Factory* g_test_factory = nullptr;
} // namespace
NetworkDetailedNetworkView::Delegate::~Delegate() = default;
NetworkDetailedNetworkView::NetworkDetailedNetworkView(Delegate* delegate)
: delegate_(delegate) {}
std::unique_ptr<NetworkDetailedNetworkView>
NetworkDetailedNetworkView::Factory::Create(
DetailedViewDelegate* detailed_view_delegate,
Delegate* delegate) {
if (g_test_factory)
return g_test_factory->CreateForTesting(delegate); // IN-TEST
return std::make_unique<NetworkDetailedNetworkViewImpl>(
detailed_view_delegate, delegate);
}
void NetworkDetailedNetworkView::Factory::SetFactoryForTesting(
Factory* test_factory) {
g_test_factory = test_factory;
}
int NetworkDetailedNetworkView::GetScrollPosition() {
return 0;
}
} // namespace ash