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

Unified Diff: webkit/media/webmediaplayer_impl.cc

Issue 10825303: Disable 'Save Video As' option for MediaSource and MediaStream URLs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/media/webmediaplayer_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/media/webmediaplayer_impl.cc
diff --git a/webkit/media/webmediaplayer_impl.cc b/webkit/media/webmediaplayer_impl.cc
index 0bac0049e0a7df0ff14b6dca665c5d724c202613..aba3e715eff42f4c43c7bd55868f4d8af053c7e1 100644
--- a/webkit/media/webmediaplayer_impl.cc
+++ b/webkit/media/webmediaplayer_impl.cc
@@ -131,6 +131,7 @@ WebMediaPlayerImpl::WebMediaPlayerImpl(
audio_source_provider_(audio_source_provider),
audio_renderer_sink_(audio_renderer_sink),
is_local_source_(false),
+ supports_save_(true),
decryptor_(proxy_.get(), client, frame) {
media_log_->AddEvent(
media_log_->CreateEvent(media::MediaLogEvent::WEBMEDIAPLAYER_CREATED));
@@ -235,6 +236,7 @@ void WebMediaPlayerImpl::load(const WebKit::WebURL& url, CORSMode cors_mode) {
if (BuildMediaStreamCollection(url, media_stream_client_,
message_loop_factory_.get(),
filter_collection_.get())) {
+ supports_save_ = false;
StartPipeline();
return;
}
@@ -244,6 +246,7 @@ void WebMediaPlayerImpl::load(const WebKit::WebURL& url, CORSMode cors_mode) {
message_loop_factory_.get(),
filter_collection_.get(),
&decryptor_)) {
+ supports_save_ = false;
StartPipeline();
return;
}
@@ -303,7 +306,7 @@ bool WebMediaPlayerImpl::supportsFullscreen() const {
bool WebMediaPlayerImpl::supportsSave() const {
DCHECK_EQ(main_loop_, MessageLoop::current());
- return true;
+ return supports_save_;
}
void WebMediaPlayerImpl::seek(float seconds) {
« no previous file with comments | « webkit/media/webmediaplayer_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698