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

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

Issue 1864213002: Convert //remoting to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac IWYU Created 4 years, 8 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
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_WEBRTC_CONNECTION_TO_HOST_H_ 5 #ifndef REMOTING_PROTOCOL_WEBRTC_CONNECTION_TO_HOST_H_
6 #define REMOTING_PROTOCOL_WEBRTC_CONNECTION_TO_HOST_H_ 6 #define REMOTING_PROTOCOL_WEBRTC_CONNECTION_TO_HOST_H_
7 7
8 #include <memory>
8 #include <string> 9 #include <string>
9 10
10 #include "base/macros.h" 11 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "remoting/protocol/channel_dispatcher_base.h" 12 #include "remoting/protocol/channel_dispatcher_base.h"
13 #include "remoting/protocol/clipboard_filter.h" 13 #include "remoting/protocol/clipboard_filter.h"
14 #include "remoting/protocol/connection_to_host.h" 14 #include "remoting/protocol/connection_to_host.h"
15 #include "remoting/protocol/errors.h" 15 #include "remoting/protocol/errors.h"
16 #include "remoting/protocol/input_filter.h" 16 #include "remoting/protocol/input_filter.h"
17 #include "remoting/protocol/session.h" 17 #include "remoting/protocol/session.h"
18 #include "remoting/protocol/webrtc_transport.h" 18 #include "remoting/protocol/webrtc_transport.h"
19 19
20 namespace remoting { 20 namespace remoting {
21 namespace protocol { 21 namespace protocol {
22 22
23 class ClientControlDispatcher; 23 class ClientControlDispatcher;
24 class ClientEventDispatcher; 24 class ClientEventDispatcher;
25 class SessionConfig; 25 class SessionConfig;
26 class WebrtcVideoRendererAdapter; 26 class WebrtcVideoRendererAdapter;
27 27
28 class WebrtcConnectionToHost : public ConnectionToHost, 28 class WebrtcConnectionToHost : public ConnectionToHost,
29 public Session::EventHandler, 29 public Session::EventHandler,
30 public WebrtcTransport::EventHandler, 30 public WebrtcTransport::EventHandler,
31 public ChannelDispatcherBase::EventHandler { 31 public ChannelDispatcherBase::EventHandler {
32 public: 32 public:
33 WebrtcConnectionToHost(); 33 WebrtcConnectionToHost();
34 ~WebrtcConnectionToHost() override; 34 ~WebrtcConnectionToHost() override;
35 35
36 // ConnectionToHost interface. 36 // ConnectionToHost interface.
37 void set_client_stub(ClientStub* client_stub) override; 37 void set_client_stub(ClientStub* client_stub) override;
38 void set_clipboard_stub(ClipboardStub* clipboard_stub) override; 38 void set_clipboard_stub(ClipboardStub* clipboard_stub) override;
39 void set_video_renderer(VideoRenderer* video_renderer) override; 39 void set_video_renderer(VideoRenderer* video_renderer) override;
40 void set_audio_stub(AudioStub* audio_stub) override; 40 void set_audio_stub(AudioStub* audio_stub) override;
41 void Connect(scoped_ptr<Session> session, 41 void Connect(std::unique_ptr<Session> session,
42 scoped_refptr<TransportContext> transport_context, 42 scoped_refptr<TransportContext> transport_context,
43 HostEventCallback* event_callback) override; 43 HostEventCallback* event_callback) override;
44 const SessionConfig& config() override; 44 const SessionConfig& config() override;
45 ClipboardStub* clipboard_forwarder() override; 45 ClipboardStub* clipboard_forwarder() override;
46 HostStub* host_stub() override; 46 HostStub* host_stub() override;
47 InputStub* input_stub() override; 47 InputStub* input_stub() override;
48 State state() const override; 48 State state() const override;
49 49
50 private: 50 private:
51 // Session::EventHandler interface. 51 // Session::EventHandler interface.
(...skipping 17 matching lines...) Expand all
69 69
70 void SetState(State state, ErrorCode error); 70 void SetState(State state, ErrorCode error);
71 71
72 HostEventCallback* event_callback_ = nullptr; 72 HostEventCallback* event_callback_ = nullptr;
73 73
74 // Stub for incoming messages. 74 // Stub for incoming messages.
75 ClientStub* client_stub_ = nullptr; 75 ClientStub* client_stub_ = nullptr;
76 VideoRenderer* video_renderer_ = nullptr; 76 VideoRenderer* video_renderer_ = nullptr;
77 ClipboardStub* clipboard_stub_ = nullptr; 77 ClipboardStub* clipboard_stub_ = nullptr;
78 78
79 scoped_ptr<Session> session_; 79 std::unique_ptr<Session> session_;
80 scoped_ptr<WebrtcTransport> transport_; 80 std::unique_ptr<WebrtcTransport> transport_;
81 81
82 scoped_ptr<ClientControlDispatcher> control_dispatcher_; 82 std::unique_ptr<ClientControlDispatcher> control_dispatcher_;
83 scoped_ptr<ClientEventDispatcher> event_dispatcher_; 83 std::unique_ptr<ClientEventDispatcher> event_dispatcher_;
84 ClipboardFilter clipboard_forwarder_; 84 ClipboardFilter clipboard_forwarder_;
85 InputFilter event_forwarder_; 85 InputFilter event_forwarder_;
86 86
87 scoped_ptr<WebrtcVideoRendererAdapter> video_adapter_; 87 std::unique_ptr<WebrtcVideoRendererAdapter> video_adapter_;
88 88
89 // Internal state of the connection. 89 // Internal state of the connection.
90 State state_ = INITIALIZING; 90 State state_ = INITIALIZING;
91 ErrorCode error_ = OK; 91 ErrorCode error_ = OK;
92 92
93 private: 93 private:
94 DISALLOW_COPY_AND_ASSIGN(WebrtcConnectionToHost); 94 DISALLOW_COPY_AND_ASSIGN(WebrtcConnectionToHost);
95 }; 95 };
96 96
97 } // namespace protocol 97 } // namespace protocol
98 } // namespace remoting 98 } // namespace remoting
99 99
100 #endif // REMOTING_PROTOCOL_WEBRTC_CONNECTION_TO_HOST_H_ 100 #endif // REMOTING_PROTOCOL_WEBRTC_CONNECTION_TO_HOST_H_
OLDNEW
« no previous file with comments | « remoting/protocol/webrtc_connection_to_client.cc ('k') | remoting/protocol/webrtc_connection_to_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698