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

Side by Side Diff: webkit/media/simple_data_source.cc

Issue 8936014: Removing DataSource from Filter hierarchy (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moved preload into a separate file. Created 9 years 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 #include "webkit/media/simple_data_source.h" 5 #include "webkit/media/simple_data_source.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/process_util.h" 9 #include "base/process_util.h"
10 #include "media/base/filter_host.h"
11 #include "media/base/media_log.h" 10 #include "media/base/media_log.h"
12 #include "net/base/data_url.h" 11 #include "net/base/data_url.h"
13 #include "net/base/load_flags.h" 12 #include "net/base/load_flags.h"
14 #include "net/http/http_request_headers.h" 13 #include "net/http/http_request_headers.h"
15 #include "net/url_request/url_request_status.h" 14 #include "net/url_request/url_request_status.h"
16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h"
17 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebKitPlatfo rmSupport.h" 16 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebKitPlatfo rmSupport.h"
18 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" 17 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLLoaderOptions.h " 18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLLoaderOptions.h "
20 #include "webkit/media/web_data_source_factory.h" 19 #include "webkit/media/web_data_source_factory.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 state_(UNINITIALIZED), 51 state_(UNINITIALIZED),
53 keep_test_loader_(false) { 52 keep_test_loader_(false) {
54 DCHECK(render_loop); 53 DCHECK(render_loop);
55 } 54 }
56 55
57 SimpleDataSource::~SimpleDataSource() { 56 SimpleDataSource::~SimpleDataSource() {
58 base::AutoLock auto_lock(lock_); 57 base::AutoLock auto_lock(lock_);
59 DCHECK(state_ == UNINITIALIZED || state_ == STOPPED); 58 DCHECK(state_ == UNINITIALIZED || state_ == STOPPED);
60 } 59 }
61 60
62 void SimpleDataSource::set_host(media::FilterHost* host) { 61 void SimpleDataSource::set_host(media::DataSourceHost* host) {
63 DataSource::set_host(host); 62 DataSource::set_host(host);
64 63
65 base::AutoLock auto_lock(lock_); 64 base::AutoLock auto_lock(lock_);
66 if (state_ == INITIALIZED) { 65 if (state_ == INITIALIZED) {
67 UpdateHostState(); 66 UpdateHostState();
68 } 67 }
69 } 68 }
70 69
71 void SimpleDataSource::Stop(const base::Closure& callback) { 70 void SimpleDataSource::Stop(const base::Closure& callback) {
72 base::AutoLock auto_lock(lock_); 71 base::AutoLock auto_lock(lock_);
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 } 348 }
350 349
351 void SimpleDataSource::UpdateHostState() { 350 void SimpleDataSource::UpdateHostState() {
352 if (host()) { 351 if (host()) {
353 host()->SetTotalBytes(size_); 352 host()->SetTotalBytes(size_);
354 host()->SetBufferedBytes(size_); 353 host()->SetBufferedBytes(size_);
355 } 354 }
356 } 355 }
357 356
358 } // namespace webkit_media 357 } // namespace webkit_media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698