Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(335)

Side by Side Diff: remoting/protocol/fake_connection_to_host.h

Issue 1545743002: Move ownership of Transport out of Session. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_not_pass_client
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « remoting/protocol/fake_authenticator.cc ('k') | remoting/protocol/fake_connection_to_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef REMOTING_PROTOCOL_FAKE_CONNECTION_TO_HOST_H_ 5 #ifndef REMOTING_PROTOCOL_FAKE_CONNECTION_TO_HOST_H_
6 #define REMOTING_PROTOCOL_FAKE_CONNECTION_TO_HOST_H_ 6 #define REMOTING_PROTOCOL_FAKE_CONNECTION_TO_HOST_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "remoting/protocol/connection_to_host.h" 11 #include "remoting/protocol/connection_to_host.h"
12 #include "remoting/protocol/protocol_mock_objects.h" 12 #include "remoting/protocol/protocol_mock_objects.h"
13 13
14 namespace remoting { 14 namespace remoting {
15 namespace test { 15 namespace test {
16 16
17 class FakeConnectionToHost : public protocol::ConnectionToHost { 17 class FakeConnectionToHost : public protocol::ConnectionToHost {
18 public: 18 public:
19 FakeConnectionToHost(); 19 FakeConnectionToHost();
20 ~FakeConnectionToHost() override; 20 ~FakeConnectionToHost() override;
21 21
22 // ConnectionToHost interface. 22 // ConnectionToHost interface.
23 void set_client_stub(protocol::ClientStub* client_stub) override; 23 void set_client_stub(protocol::ClientStub* client_stub) override;
24 void set_clipboard_stub(protocol::ClipboardStub* clipboard_stub) override; 24 void set_clipboard_stub(protocol::ClipboardStub* clipboard_stub) override;
25 void set_video_stub(protocol::VideoStub* video_stub) override; 25 void set_video_stub(protocol::VideoStub* video_stub) override;
26 void set_audio_stub(protocol::AudioStub* audio_stub) override; 26 void set_audio_stub(protocol::AudioStub* audio_stub) override;
27 void Connect(scoped_ptr<protocol::Session> session, 27 void Connect(scoped_ptr<protocol::Session> session,
28 scoped_refptr<protocol::TransportContext> transport_context,
28 HostEventCallback* event_callback) override; 29 HostEventCallback* event_callback) override;
29 const protocol::SessionConfig& config() override; 30 const protocol::SessionConfig& config() override;
30 protocol::ClipboardStub* clipboard_forwarder() override; 31 protocol::ClipboardStub* clipboard_forwarder() override;
31 protocol::HostStub* host_stub() override; 32 protocol::HostStub* host_stub() override;
32 protocol::InputStub* input_stub() override; 33 protocol::InputStub* input_stub() override;
33 State state() const override; 34 State state() const override;
34 35
35 // Calls OnConnectionState on the |event_callback_| with the supplied state 36 // Calls OnConnectionState on the |event_callback_| with the supplied state
36 // and error. 37 // and error.
37 void SignalStateChange(protocol::Session::State state, 38 void SignalStateChange(protocol::Session::State state,
(...skipping 14 matching lines...) Expand all
52 testing::NiceMock<protocol::MockInputStub> mock_input_stub_; 53 testing::NiceMock<protocol::MockInputStub> mock_input_stub_;
53 scoped_ptr<protocol::SessionConfig> session_config_; 54 scoped_ptr<protocol::SessionConfig> session_config_;
54 55
55 DISALLOW_COPY_AND_ASSIGN(FakeConnectionToHost); 56 DISALLOW_COPY_AND_ASSIGN(FakeConnectionToHost);
56 }; 57 };
57 58
58 } // namespace test 59 } // namespace test
59 } // namespace remoting 60 } // namespace remoting
60 61
61 #endif // REMOTING_PROTOCOL_FAKE_CONNECTION_TO_HOST_H_ 62 #endif // REMOTING_PROTOCOL_FAKE_CONNECTION_TO_HOST_H_
OLDNEW
« no previous file with comments | « remoting/protocol/fake_authenticator.cc ('k') | remoting/protocol/fake_connection_to_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698