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

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

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 #include "remoting/protocol/webrtc_connection_to_host.h" 5 #include "remoting/protocol/webrtc_connection_to_host.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "jingle/glue/thread_wrapper.h" 9 #include "jingle/glue/thread_wrapper.h"
10 #include "remoting/protocol/client_control_dispatcher.h" 10 #include "remoting/protocol/client_control_dispatcher.h"
11 #include "remoting/protocol/client_event_dispatcher.h" 11 #include "remoting/protocol/client_event_dispatcher.h"
12 #include "remoting/protocol/client_stub.h" 12 #include "remoting/protocol/client_stub.h"
13 #include "remoting/protocol/clipboard_stub.h" 13 #include "remoting/protocol/clipboard_stub.h"
14 #include "remoting/protocol/transport_context.h" 14 #include "remoting/protocol/transport_context.h"
15 #include "remoting/protocol/video_renderer.h" 15 #include "remoting/protocol/video_renderer.h"
16 #include "remoting/protocol/webrtc_transport.h" 16 #include "remoting/protocol/webrtc_transport.h"
17 #include "remoting/protocol/webrtc_video_renderer_adapter.h" 17 #include "remoting/protocol/webrtc_video_renderer_adapter.h"
18 18
19 namespace remoting { 19 namespace remoting {
20 namespace protocol { 20 namespace protocol {
21 21
22 WebrtcConnectionToHost::WebrtcConnectionToHost() {} 22 WebrtcConnectionToHost::WebrtcConnectionToHost() {}
23 WebrtcConnectionToHost::~WebrtcConnectionToHost() {} 23 WebrtcConnectionToHost::~WebrtcConnectionToHost() {}
24 24
25 void WebrtcConnectionToHost::Connect( 25 void WebrtcConnectionToHost::Connect(
26 scoped_ptr<Session> session, 26 std::unique_ptr<Session> session,
27 scoped_refptr<TransportContext> transport_context, 27 scoped_refptr<TransportContext> transport_context,
28 HostEventCallback* event_callback) { 28 HostEventCallback* event_callback) {
29 DCHECK(client_stub_); 29 DCHECK(client_stub_);
30 DCHECK(clipboard_stub_); 30 DCHECK(clipboard_stub_);
31 31
32 transport_.reset(new WebrtcTransport( 32 transport_.reset(new WebrtcTransport(
33 jingle_glue::JingleThreadWrapper::current(), transport_context, this)); 33 jingle_glue::JingleThreadWrapper::current(), transport_context, this));
34 34
35 session_ = std::move(session); 35 session_ = std::move(session);
36 session_->SetEventHandler(this); 36 session_->SetEventHandler(this);
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 168
169 if (state != state_) { 169 if (state != state_) {
170 state_ = state; 170 state_ = state;
171 error_ = error; 171 error_ = error;
172 event_callback_->OnConnectionState(state_, error_); 172 event_callback_->OnConnectionState(state_, error_);
173 } 173 }
174 } 174 }
175 175
176 } // namespace protocol 176 } // namespace protocol
177 } // namespace remoting 177 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/webrtc_connection_to_host.h ('k') | remoting/protocol/webrtc_data_stream_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698