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

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

Issue 7796026: Pass SessionConfig by reference instead of pointer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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
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 for a video stream reader. RtpVideoReader 5 // VideoReader is a generic interface for a video stream reader. RtpVideoReader
6 // and ProtobufVideoReader implement this interface for RTP and protobuf video 6 // and ProtobufVideoReader implement this interface for RTP and protobuf video
7 // streams. VideoReader is used by ConnectionToHost to read video stream. 7 // streams. VideoReader is used by ConnectionToHost to read 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_
(...skipping 10 matching lines...) Expand all
21 class ChromotocolConnection; 21 class ChromotocolConnection;
22 22
23 namespace protocol { 23 namespace protocol {
24 24
25 class Session; 25 class Session;
26 class SessionConfig; 26 class SessionConfig;
27 27
28 class VideoReader { 28 class VideoReader {
29 public: 29 public:
30 static VideoReader* Create(base::MessageLoopProxy* message_loop, 30 static VideoReader* Create(base::MessageLoopProxy* message_loop,
31 const SessionConfig* config); 31 const SessionConfig& config);
32 32
33 // The callback is called when initialization is finished. The 33 // The callback is called when initialization is finished. The
34 // parameter is set to true on success. 34 // parameter is set to true on success.
35 typedef base::Callback<void(bool)> InitializedCallback; 35 typedef base::Callback<void(bool)> InitializedCallback;
36 36
37 virtual ~VideoReader(); 37 virtual ~VideoReader();
38 38
39 // Initializies the reader. Doesn't take ownership of either |connection| 39 // Initializies the reader. Doesn't take ownership of either |connection|
40 // or |video_stub|. 40 // or |video_stub|.
41 virtual void Init(Session* session, 41 virtual void Init(Session* session,
42 VideoStub* video_stub, 42 VideoStub* video_stub,
43 const InitializedCallback& callback) = 0; 43 const InitializedCallback& callback) = 0;
44 44
45 protected: 45 protected:
46 VideoReader() { } 46 VideoReader() { }
47 47
48 private: 48 private:
49 DISALLOW_COPY_AND_ASSIGN(VideoReader); 49 DISALLOW_COPY_AND_ASSIGN(VideoReader);
50 }; 50 };
51 51
52 } // namespace protocol 52 } // namespace protocol
53 } // namespace remoting 53 } // namespace remoting
54 54
55 #endif // REMOTING_PROTOCOL_VIDEO_READER_H_ 55 #endif // REMOTING_PROTOCOL_VIDEO_READER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698