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

Side by Side Diff: remoting/client/rectangle_update_decoder.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 #ifndef REMOTING_CLIENT_RECTANGLE_UPDATE_DECODER_H 5 #ifndef REMOTING_CLIENT_RECTANGLE_UPDATE_DECODER_H
6 #define REMOTING_CLIENT_RECTANGLE_UPDATE_DECODER_H 6 #define REMOTING_CLIENT_RECTANGLE_UPDATE_DECODER_H
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/task.h" 9 #include "base/task.h"
10 #include "media/base/video_frame.h" 10 #include "media/base/video_frame.h"
(...skipping 16 matching lines...) Expand all
27 // TODO(ajwong): Re-examine this API, especially with regards to how error 27 // TODO(ajwong): Re-examine this API, especially with regards to how error
28 // conditions on each step are reported. Should they be CHECKs? Logs? Other? 28 // conditions on each step are reported. Should they be CHECKs? Logs? Other?
29 // TODO(sergeyu): Rename this class. 29 // TODO(sergeyu): Rename this class.
30 class RectangleUpdateDecoder : 30 class RectangleUpdateDecoder :
31 public base::RefCountedThreadSafe<RectangleUpdateDecoder> { 31 public base::RefCountedThreadSafe<RectangleUpdateDecoder> {
32 public: 32 public:
33 RectangleUpdateDecoder(MessageLoop* message_loop, 33 RectangleUpdateDecoder(MessageLoop* message_loop,
34 FrameConsumer* consumer); 34 FrameConsumer* consumer);
35 35
36 // Initializes decoder with the infromation from the protocol config. 36 // Initializes decoder with the infromation from the protocol config.
37 void Initialize(const protocol::SessionConfig* config); 37 void Initialize(const protocol::SessionConfig& config);
38 38
39 // Decodes the contents of |packet| calling OnPartialFrameOutput() in the 39 // Decodes the contents of |packet| calling OnPartialFrameOutput() in the
40 // regsitered as data is avaialable. DecodePacket may keep a reference to 40 // regsitered as data is avaialable. DecodePacket may keep a reference to
41 // |packet| so the |packet| must remain alive and valid until |done| is 41 // |packet| so the |packet| must remain alive and valid until |done| is
42 // executed. 42 // executed.
43 // 43 //
44 // TODO(ajwong): Should packet be a const pointer to make the lifetime 44 // TODO(ajwong): Should packet be a const pointer to make the lifetime
45 // more clear? 45 // more clear?
46 void DecodePacket(const VideoPacket* packet, Task* done); 46 void DecodePacket(const VideoPacket* packet, Task* done);
47 47
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 97
98 // True if |consumer_| is currently using the frame. 98 // True if |consumer_| is currently using the frame.
99 bool frame_is_consuming_; 99 bool frame_is_consuming_;
100 }; 100 };
101 101
102 } // namespace remoting 102 } // namespace remoting
103 103
104 DISABLE_RUNNABLE_METHOD_REFCOUNT(remoting::RectangleUpdateDecoder); 104 DISABLE_RUNNABLE_METHOD_REFCOUNT(remoting::RectangleUpdateDecoder);
105 105
106 #endif // REMOTING_CLIENT_RECTANGLE_UPDATE_DECODER_H 106 #endif // REMOTING_CLIENT_RECTANGLE_UPDATE_DECODER_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698