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

Side by Side Diff: content/renderer/media/webmediaplayer_impl.cc

Issue 23064011: Consolidate scheme checks into an easy GURL method (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 4 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/renderer/media/webmediaplayer_impl.h" 5 #include "content/renderer/media/webmediaplayer_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 main_loop_, 293 main_loop_,
294 frame_, 294 frame_,
295 media_log_.get(), 295 media_log_.get(),
296 base::Bind(&WebMediaPlayerImpl::NotifyDownloading, AsWeakPtr()))); 296 base::Bind(&WebMediaPlayerImpl::NotifyDownloading, AsWeakPtr())));
297 data_source_->Initialize( 297 data_source_->Initialize(
298 url, static_cast<BufferedResourceLoader::CORSMode>(cors_mode), 298 url, static_cast<BufferedResourceLoader::CORSMode>(cors_mode),
299 base::Bind( 299 base::Bind(
300 &WebMediaPlayerImpl::DataSourceInitialized, 300 &WebMediaPlayerImpl::DataSourceInitialized,
301 AsWeakPtr(), gurl)); 301 AsWeakPtr(), gurl));
302 302
303 is_local_source_ = !gurl.SchemeIs("http") && !gurl.SchemeIs("https"); 303 is_local_source_ = !gurl.SchemeIsHTTPOrHTTPS();
304 } 304 }
305 305
306 void WebMediaPlayerImpl::play() { 306 void WebMediaPlayerImpl::play() {
307 DCHECK(main_loop_->BelongsToCurrentThread()); 307 DCHECK(main_loop_->BelongsToCurrentThread());
308 308
309 paused_ = false; 309 paused_ = false;
310 pipeline_->SetPlaybackRate(playback_rate_); 310 pipeline_->SetPlaybackRate(playback_rate_);
311 311
312 media_log_->AddEvent(media_log_->CreateEvent(media::MediaLogEvent::PLAY)); 312 media_log_->AddEvent(media_log_->CreateEvent(media::MediaLogEvent::PLAY));
313 313
(...skipping 929 matching lines...) Expand 10 before | Expand all | Expand 10 after
1243 1243
1244 if (pending_repaint_) 1244 if (pending_repaint_)
1245 return; 1245 return;
1246 1246
1247 pending_repaint_ = true; 1247 pending_repaint_ = true;
1248 main_loop_->PostTask(FROM_HERE, base::Bind( 1248 main_loop_->PostTask(FROM_HERE, base::Bind(
1249 &WebMediaPlayerImpl::Repaint, AsWeakPtr())); 1249 &WebMediaPlayerImpl::Repaint, AsWeakPtr()));
1250 } 1250 }
1251 1251
1252 } // namespace content 1252 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/resource_dispatcher_host_impl.cc ('k') | content/renderer/npapi/webplugin_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698