blob: f558769cc919d8e819872171ba6b233e70e3c1df (
plain)
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
74
75
76
77
78
|
// Copyright (c) 2012 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 "remoting/protocol/protocol_mock_objects.h"
namespace remoting {
namespace protocol {
MockConnectionToClient::MockConnectionToClient(
Session* session,
HostStub* host_stub)
: ConnectionToClient(session) {
set_host_stub(host_stub);
}
MockConnectionToClient::~MockConnectionToClient() {}
MockConnectionToClientEventHandler::MockConnectionToClientEventHandler() {}
MockConnectionToClientEventHandler::~MockConnectionToClientEventHandler() {}
MockClipboardStub::MockClipboardStub() {}
MockClipboardStub::~MockClipboardStub() {}
MockInputStub::MockInputStub() {}
MockInputStub::~MockInputStub() {}
MockHostStub::MockHostStub() {}
MockHostStub::~MockHostStub() {}
MockClientStub::MockClientStub() {}
MockClientStub::~MockClientStub() {}
MockVideoStub::MockVideoStub() {}
MockVideoStub::~MockVideoStub() {}
MockSession::MockSession() {}
MockSession::~MockSession() {}
MockSessionManager::MockSessionManager() {}
MockSessionManager::~MockSessionManager() {}
MockPairingRegistryDelegate::MockPairingRegistryDelegate() {
}
MockPairingRegistryDelegate::~MockPairingRegistryDelegate() {
}
void MockPairingRegistryDelegate::Save(
const std::string& pairings_json,
const PairingRegistry::SaveCallback& callback) {
pairings_json_ = pairings_json;
if (!callback.is_null()) {
callback.Run(true);
}
}
void MockPairingRegistryDelegate::Load(
const PairingRegistry::LoadCallback& callback) {
load_callback_ = base::Bind(base::Bind(callback), pairings_json_);
}
void MockPairingRegistryDelegate::RunCallback() {
DCHECK(!load_callback_.is_null());
load_callback_.Run();
load_callback_.Reset();
}
} // namespace protocol
} // namespace remoting
|