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

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

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.cc ('k') | remoting/protocol/video_reader.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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // VideoReader is a generic interface used by ConnectionToHost to read 5 // VideoReader is a generic interface used by ConnectionToHost to read
6 // video stream. ProtobufVideoReader implements this interface for 6 // video stream. ProtobufVideoReader implements this interface for
7 // protobuf video stream. 7 // protobuf video stream.
8 8
9 #ifndef REMOTING_PROTOCOL_VIDEO_READER_H_ 9 #ifndef REMOTING_PROTOCOL_VIDEO_READER_H_
10 #define REMOTING_PROTOCOL_VIDEO_READER_H_ 10 #define REMOTING_PROTOCOL_VIDEO_READER_H_
11 11
12 #include "base/callback.h" 12 #include "base/callback.h"
13 #include "remoting/protocol/video_stub.h" 13 #include "remoting/protocol/video_stub.h"
14 14
15 namespace base {
16 class MessageLoopProxy;
17 } // namespace base
18
19 namespace remoting { 15 namespace remoting {
20 namespace protocol { 16 namespace protocol {
21 17
22 class Session; 18 class Session;
23 class SessionConfig; 19 class SessionConfig;
24 20
25 class VideoReader { 21 class VideoReader {
26 public: 22 public:
27 static VideoReader* Create(base::MessageLoopProxy* message_loop, 23 static VideoReader* Create(const SessionConfig& config);
28 const SessionConfig& config);
29 24
30 // The callback is called when initialization is finished. The 25 // The callback is called when initialization is finished. The
31 // parameter is set to true on success. 26 // parameter is set to true on success.
32 typedef base::Callback<void(bool)> InitializedCallback; 27 typedef base::Callback<void(bool)> InitializedCallback;
33 28
34 virtual ~VideoReader(); 29 virtual ~VideoReader();
35 30
36 // Initializies the reader. Doesn't take ownership of either |connection| 31 // Initializies the reader. Doesn't take ownership of either |connection|
37 // or |video_stub|. 32 // or |video_stub|.
38 virtual void Init(Session* session, 33 virtual void Init(Session* session,
39 VideoStub* video_stub, 34 VideoStub* video_stub,
40 const InitializedCallback& callback) = 0; 35 const InitializedCallback& callback) = 0;
41 virtual bool is_connected() = 0; 36 virtual bool is_connected() = 0;
42 37
43 protected: 38 protected:
44 VideoReader() { } 39 VideoReader() { }
45 40
46 private: 41 private:
47 DISALLOW_COPY_AND_ASSIGN(VideoReader); 42 DISALLOW_COPY_AND_ASSIGN(VideoReader);
48 }; 43 };
49 44
50 } // namespace protocol 45 } // namespace protocol
51 } // namespace remoting 46 } // namespace remoting
52 47
53 #endif // REMOTING_PROTOCOL_VIDEO_READER_H_ 48 #endif // REMOTING_PROTOCOL_VIDEO_READER_H_
OLDNEW
« no previous file with comments | « remoting/protocol/protobuf_video_writer.cc ('k') | remoting/protocol/video_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698