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

Side by Side Diff: webkit/glue/media/buffered_data_source.h

Issue 6142009: Upating the app, ceee, chrome, ipc, media, and net directories to use the correct lock.h file. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Unified patch updating all references to the new base/synchronization/lock.h Created 9 years, 11 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 WEBKIT_GLUE_MEDIA_BUFFERED_DATA_SOURCE_H_ 5 #ifndef WEBKIT_GLUE_MEDIA_BUFFERED_DATA_SOURCE_H_
6 #define WEBKIT_GLUE_MEDIA_BUFFERED_DATA_SOURCE_H_ 6 #define WEBKIT_GLUE_MEDIA_BUFFERED_DATA_SOURCE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/lock.h"
12 #include "base/scoped_ptr.h" 11 #include "base/scoped_ptr.h"
12 #include "base/synchronization/lock.h"
13 #include "webkit/glue/media/buffered_resource_loader.h" 13 #include "webkit/glue/media/buffered_resource_loader.h"
14 14
15 namespace webkit_glue { 15 namespace webkit_glue {
16 16
17 class BufferedDataSource : public WebDataSource { 17 class BufferedDataSource : public WebDataSource {
18 public: 18 public:
19 BufferedDataSource(MessageLoop* render_loop, 19 BufferedDataSource(MessageLoop* render_loop,
20 WebKit::WebFrame* frame); 20 WebKit::WebFrame* frame);
21 21
22 virtual ~BufferedDataSource(); 22 virtual ~BufferedDataSource();
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 // because we want buffer to be passed into BufferedResourceLoader to be 168 // because we want buffer to be passed into BufferedResourceLoader to be
169 // always non-null. And by initializing this member with a default size we can 169 // always non-null. And by initializing this member with a default size we can
170 // avoid creating zero-sized buffered if the first read has zero size. 170 // avoid creating zero-sized buffered if the first read has zero size.
171 scoped_array<uint8> intermediate_read_buffer_; 171 scoped_array<uint8> intermediate_read_buffer_;
172 int intermediate_read_buffer_size_; 172 int intermediate_read_buffer_size_;
173 173
174 // The message loop of the render thread. 174 // The message loop of the render thread.
175 MessageLoop* render_loop_; 175 MessageLoop* render_loop_;
176 176
177 // Protects |stopped_|. 177 // Protects |stopped_|.
178 Lock lock_; 178 base::Lock lock_;
179 179
180 // Stop signal to suppressing activities. This variable is set on the pipeline 180 // Stop signal to suppressing activities. This variable is set on the pipeline
181 // thread and read from the render thread. 181 // thread and read from the render thread.
182 bool stop_signal_received_; 182 bool stop_signal_received_;
183 183
184 // This variable is set by CleanupTask() that indicates this object is stopped 184 // This variable is set by CleanupTask() that indicates this object is stopped
185 // on the render thread and work should no longer progress. 185 // on the render thread and work should no longer progress.
186 bool stopped_on_render_loop_; 186 bool stopped_on_render_loop_;
187 187
188 // This variable is true when we are in a paused state and false when we 188 // This variable is true when we are in a paused state and false when we
189 // are in a playing state. 189 // are in a playing state.
190 bool media_is_paused_; 190 bool media_is_paused_;
191 191
192 // This timer is to run the WatchDogTask repeatedly. We use a timer instead 192 // This timer is to run the WatchDogTask repeatedly. We use a timer instead
193 // of doing PostDelayedTask() reduce the extra reference held by the message 193 // of doing PostDelayedTask() reduce the extra reference held by the message
194 // loop. The RepeatingTimer does PostDelayedTask() internally, by using it 194 // loop. The RepeatingTimer does PostDelayedTask() internally, by using it
195 // the message loop doesn't hold a reference for the watch dog task. 195 // the message loop doesn't hold a reference for the watch dog task.
196 base::RepeatingTimer<BufferedDataSource> watch_dog_timer_; 196 base::RepeatingTimer<BufferedDataSource> watch_dog_timer_;
197 197
198 // Keeps track of whether we used a Range header in the initialization 198 // Keeps track of whether we used a Range header in the initialization
199 // request. 199 // request.
200 bool using_range_request_; 200 bool using_range_request_;
201 201
202 DISALLOW_COPY_AND_ASSIGN(BufferedDataSource); 202 DISALLOW_COPY_AND_ASSIGN(BufferedDataSource);
203 }; 203 };
204 204
205 } // namespace webkit_glue 205 } // namespace webkit_glue
206 206
207 #endif // WEBKIT_GLUE_MEDIA_BUFFERED_DATA_SOURCE_H_ 207 #endif // WEBKIT_GLUE_MEDIA_BUFFERED_DATA_SOURCE_H_
OLDNEW
« no previous file with comments | « third_party/cacheinvalidation/overrides/google/cacheinvalidation/mutex.h ('k') | webkit/glue/media/buffered_data_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698