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

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

Issue 10332304: Don't depend on MessageLoopProxy in remoting protocol code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « remoting/protocol/protobuf_video_writer.h ('k') | remoting/protocol/video_reader.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/protobuf_video_writer.h" 5 #include "remoting/protocol/protobuf_video_writer.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "net/socket/stream_socket.h" 8 #include "net/socket/stream_socket.h"
9 #include "remoting/base/constants.h" 9 #include "remoting/base/constants.h"
10 #include "remoting/proto/video.pb.h" 10 #include "remoting/proto/video.pb.h"
11 #include "remoting/protocol/session.h" 11 #include "remoting/protocol/session.h"
12 #include "remoting/protocol/util.h" 12 #include "remoting/protocol/util.h"
13 13
14 namespace remoting { 14 namespace remoting {
15 namespace protocol { 15 namespace protocol {
16 16
17 ProtobufVideoWriter::ProtobufVideoWriter(base::MessageLoopProxy* message_loop) 17 ProtobufVideoWriter::ProtobufVideoWriter()
18 : session_(NULL) { 18 : session_(NULL) {
19 } 19 }
20 20
21 ProtobufVideoWriter::~ProtobufVideoWriter() { 21 ProtobufVideoWriter::~ProtobufVideoWriter() {
22 Close(); 22 Close();
23 } 23 }
24 24
25 void ProtobufVideoWriter::Init(protocol::Session* session, 25 void ProtobufVideoWriter::Init(protocol::Session* session,
26 const InitializedCallback& callback) { 26 const InitializedCallback& callback) {
27 session_ = session; 27 session_ = session;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 const base::Closure& done) { 64 const base::Closure& done) {
65 buffered_writer_.Write(SerializeAndFrameMessage(*packet), done); 65 buffered_writer_.Write(SerializeAndFrameMessage(*packet), done);
66 } 66 }
67 67
68 int ProtobufVideoWriter::GetPendingPackets() { 68 int ProtobufVideoWriter::GetPendingPackets() {
69 return buffered_writer_.GetBufferChunks(); 69 return buffered_writer_.GetBufferChunks();
70 } 70 }
71 71
72 } // namespace protocol 72 } // namespace protocol
73 } // namespace remoting 73 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/protobuf_video_writer.h ('k') | remoting/protocol/video_reader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698