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

Side by Side Diff: remoting/protocol/host_video_dispatcher.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
« no previous file with comments | « remoting/protocol/host_video_dispatcher.h ('k') | remoting/protocol/http_ice_config_request.h » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/host_video_dispatcher.h" 5 #include "remoting/protocol/host_video_dispatcher.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "net/socket/stream_socket.h" 10 #include "net/socket/stream_socket.h"
11 #include "remoting/base/compound_buffer.h" 11 #include "remoting/base/compound_buffer.h"
12 #include "remoting/base/constants.h" 12 #include "remoting/base/constants.h"
13 #include "remoting/proto/video.pb.h" 13 #include "remoting/proto/video.pb.h"
14 #include "remoting/protocol/message_pipe.h" 14 #include "remoting/protocol/message_pipe.h"
15 #include "remoting/protocol/message_serialization.h" 15 #include "remoting/protocol/message_serialization.h"
16 #include "remoting/protocol/video_feedback_stub.h" 16 #include "remoting/protocol/video_feedback_stub.h"
17 17
18 namespace remoting { 18 namespace remoting {
19 namespace protocol { 19 namespace protocol {
20 20
21 HostVideoDispatcher::HostVideoDispatcher() 21 HostVideoDispatcher::HostVideoDispatcher()
22 : ChannelDispatcherBase(kVideoChannelName) {} 22 : ChannelDispatcherBase(kVideoChannelName) {}
23 HostVideoDispatcher::~HostVideoDispatcher() {} 23 HostVideoDispatcher::~HostVideoDispatcher() {}
24 24
25 void HostVideoDispatcher::ProcessVideoPacket(scoped_ptr<VideoPacket> packet, 25 void HostVideoDispatcher::ProcessVideoPacket(
26 const base::Closure& done) { 26 std::unique_ptr<VideoPacket> packet,
27 const base::Closure& done) {
27 message_pipe()->Send(packet.get(), done); 28 message_pipe()->Send(packet.get(), done);
28 } 29 }
29 30
30 void HostVideoDispatcher::OnIncomingMessage( 31 void HostVideoDispatcher::OnIncomingMessage(
31 scoped_ptr<CompoundBuffer> message) { 32 std::unique_ptr<CompoundBuffer> message) {
32 scoped_ptr<VideoAck> ack = ParseMessage<VideoAck>(message.get()); 33 std::unique_ptr<VideoAck> ack = ParseMessage<VideoAck>(message.get());
33 if (!ack) 34 if (!ack)
34 return; 35 return;
35 if (video_feedback_stub_) 36 if (video_feedback_stub_)
36 video_feedback_stub_->ProcessVideoAck(std::move(ack)); 37 video_feedback_stub_->ProcessVideoAck(std::move(ack));
37 } 38 }
38 39
39 } // namespace protocol 40 } // namespace protocol
40 } // namespace remoting 41 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/host_video_dispatcher.h ('k') | remoting/protocol/http_ice_config_request.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698