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

Side by Side Diff: remoting/host/screen_recorder.h

Issue 9720019: Use scoped_ptr<> to pass ownership in more places. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 8 years, 9 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_HOST_SCREEN_RECORDER_H_ 5 #ifndef REMOTING_HOST_SCREEN_RECORDER_H_
6 #define REMOTING_HOST_SCREEN_RECORDER_H_ 6 #define REMOTING_HOST_SCREEN_RECORDER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 // Hepler method to schedule next capture using the current rate. 118 // Hepler method to schedule next capture using the current rate.
119 void StartCaptureTimer(); 119 void StartCaptureTimer();
120 120
121 void DoCapture(); 121 void DoCapture();
122 void CaptureDoneCallback(scoped_refptr<CaptureData> capture_data); 122 void CaptureDoneCallback(scoped_refptr<CaptureData> capture_data);
123 void DoFinishOneRecording(); 123 void DoFinishOneRecording();
124 void DoInvalidateFullScreen(); 124 void DoInvalidateFullScreen();
125 125
126 // Network thread ----------------------------------------------------------- 126 // Network thread -----------------------------------------------------------
127 127
128 // DoSendVideoPacket takes ownership of the |packet| and is responsible 128 void DoSendVideoPacket(scoped_ptr<VideoPacket> packet);
129 // for deleting it.
130 void DoSendVideoPacket(VideoPacket* packet);
131 129
132 void DoSendInit(scoped_refptr<protocol::ConnectionToClient> connection, 130 void DoSendInit(scoped_refptr<protocol::ConnectionToClient> connection,
133 int width, int height); 131 int width, int height);
134 132
135 // Signal network thread to cease activities. 133 // Signal network thread to cease activities.
136 void DoStopOnNetworkThread(const base::Closure& done_task); 134 void DoStopOnNetworkThread(const base::Closure& done_task);
137 135
138 // Callback for the last packet in one update. Deletes |packet| and 136 // Callback for VideoStub::ProcessVideoPacket().
139 // schedules next screen capture. 137 void VideoPacketSentCallback(scoped_ptr<VideoPacket> packet);
140 void FrameSentCallback(VideoPacket* packet);
141 138
142 // Encoder thread ----------------------------------------------------------- 139 // Encoder thread -----------------------------------------------------------
143 140
144 void DoEncode(scoped_refptr<CaptureData> capture_data); 141 void DoEncode(scoped_refptr<CaptureData> capture_data);
145 142
146 // Perform stop operations on encode thread. 143 // Perform stop operations on encode thread.
147 void DoStopOnEncodeThread(const base::Closure& done_task); 144 void DoStopOnEncodeThread(const base::Closure& done_task);
148 145
149 // EncodedDataAvailableCallback takes ownership of |packet|. 146 void EncodedDataAvailableCallback(scoped_ptr<VideoPacket> packet);
150 void EncodedDataAvailableCallback(VideoPacket* packet);
151 void SendVideoPacket(VideoPacket* packet); 147 void SendVideoPacket(VideoPacket* packet);
152 148
153 // Message loops used by this class. 149 // Message loops used by this class.
154 MessageLoop* capture_loop_; 150 MessageLoop* capture_loop_;
155 MessageLoop* encode_loop_; 151 MessageLoop* encode_loop_;
156 scoped_refptr<base::MessageLoopProxy> network_loop_; 152 scoped_refptr<base::MessageLoopProxy> network_loop_;
157 153
158 // Reference to the capturer. This member is always accessed on the capture 154 // Reference to the capturer. This member is always accessed on the capture
159 // thread. 155 // thread.
160 Capturer* capturer_; 156 Capturer* capturer_;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 197
202 // An object to schedule capturing. 198 // An object to schedule capturing.
203 CaptureScheduler scheduler_; 199 CaptureScheduler scheduler_;
204 200
205 DISALLOW_COPY_AND_ASSIGN(ScreenRecorder); 201 DISALLOW_COPY_AND_ASSIGN(ScreenRecorder);
206 }; 202 };
207 203
208 } // namespace remoting 204 } // namespace remoting
209 205
210 #endif // REMOTING_HOST_SCREEN_RECORDER_H_ 206 #endif // REMOTING_HOST_SCREEN_RECORDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698