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

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

Issue 5527003: Rename MediaFilter and MediaFilterCollection to Filter and FilterCollection, respectively. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src
Patch Set: Missed a few more Created 10 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
« no previous file with comments | « webkit/glue/media/buffered_data_source.h ('k') | webkit/glue/media/simple_data_source.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "base/callback.h" 5 #include "base/callback.h"
6 #include "base/compiler_specific.h" 6 #include "base/compiler_specific.h"
7 #include "base/format_macros.h" 7 #include "base/format_macros.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 "base/stl_util-inl.h" 10 #include "base/stl_util-inl.h"
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 } 644 }
645 645
646 // This method simply returns kTimeoutMilliseconds. The purpose of this 646 // This method simply returns kTimeoutMilliseconds. The purpose of this
647 // method is to be overidded so as to provide a different timeout value 647 // method is to be overidded so as to provide a different timeout value
648 // for testing purpose. 648 // for testing purpose.
649 base::TimeDelta BufferedDataSource::GetTimeoutMilliseconds() { 649 base::TimeDelta BufferedDataSource::GetTimeoutMilliseconds() {
650 return base::TimeDelta::FromMilliseconds(kTimeoutMilliseconds); 650 return base::TimeDelta::FromMilliseconds(kTimeoutMilliseconds);
651 } 651 }
652 652
653 ///////////////////////////////////////////////////////////////////////////// 653 /////////////////////////////////////////////////////////////////////////////
654 // BufferedDataSource, media::MediaFilter implementation 654 // BufferedDataSource, media::Filter implementation
655 void BufferedDataSource::Initialize(const std::string& url, 655 void BufferedDataSource::Initialize(const std::string& url,
656 media::FilterCallback* callback) { 656 media::FilterCallback* callback) {
657 // Saves the url. 657 // Saves the url.
658 url_ = GURL(url); 658 url_ = GURL(url);
659 659
660 if (!IsProtocolSupportedForMedia(url_)) { 660 if (!IsProtocolSupportedForMedia(url_)) {
661 // This method is called on the thread where host() lives so it is safe 661 // This method is called on the thread where host() lives so it is safe
662 // to make this call. 662 // to make this call.
663 host()->SetError(media::PIPELINE_ERROR_NETWORK); 663 host()->SetError(media::PIPELINE_ERROR_NETWORK);
664 callback->Run(); 664 callback->Run();
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
1162 return; 1162 return;
1163 1163
1164 if (network_activity != network_activity_) { 1164 if (network_activity != network_activity_) {
1165 network_activity_ = network_activity; 1165 network_activity_ = network_activity;
1166 host()->SetNetworkActivity(network_activity); 1166 host()->SetNetworkActivity(network_activity);
1167 } 1167 }
1168 host()->SetBufferedBytes(buffered_last_byte_position + 1); 1168 host()->SetBufferedBytes(buffered_last_byte_position + 1);
1169 } 1169 }
1170 1170
1171 } // namespace webkit_glue 1171 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « webkit/glue/media/buffered_data_source.h ('k') | webkit/glue/media/simple_data_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698