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

Side by Side Diff: webkit/media/android/webmediaplayer_android.cc

Issue 10543007: Add CORS-awareness to HTML5 media elements. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 6 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/android/webmediaplayer_android.h" 5 #include "webkit/media/android/webmediaplayer_android.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 } 92 }
93 93
94 manager_->UnregisterMediaPlayer(player_id_); 94 manager_->UnregisterMediaPlayer(player_id_);
95 } 95 }
96 96
97 void WebMediaPlayerAndroid::InitIncognito(bool incognito_mode) { 97 void WebMediaPlayerAndroid::InitIncognito(bool incognito_mode) {
98 incognito_mode_ = incognito_mode; 98 incognito_mode_ = incognito_mode;
99 } 99 }
100 100
101 void WebMediaPlayerAndroid::load(const WebURL& url) { 101 void WebMediaPlayerAndroid::load(const WebURL& url) {
102 load(url, false, "");
103 }
104
105 void WebMediaPlayerAndroid::load(const WebURL& url,
106 bool has_cross_origin_attr,
107 const WebKit::WebString& cross_origin_attr) {
108 if (has_cross_origin_attr)
109 NOTIMPLEMENTED() << "No CORS support";
110
102 url_ = url; 111 url_ = url;
103 112
104 UpdateNetworkState(WebMediaPlayer::NetworkStateLoading); 113 UpdateNetworkState(WebMediaPlayer::NetworkStateLoading);
105 UpdateReadyState(WebMediaPlayer::ReadyStateHaveNothing); 114 UpdateReadyState(WebMediaPlayer::ReadyStateHaveNothing);
106 115
107 // Calling InitializeMediaPlayer() will cause android mediaplayer to start 116 // Calling InitializeMediaPlayer() will cause android mediaplayer to start
108 // buffering and decoding the data. On mobile devices, this costs a lot of 117 // buffering and decoding the data. On mobile devices, this costs a lot of
109 // data usage and could even introduce performance issues. So we don't 118 // data usage and could even introduce performance issues. So we don't
110 // initialize the player unless it is a local file. We will start loading 119 // initialize the player unless it is a local file. We will start loading
111 // the media only when play/seek/fullsceen button is clicked. 120 // the media only when play/seek/fullsceen button is clicked.
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 } 571 }
563 572
564 // This gets called both on compositor and main thread. 573 // This gets called both on compositor and main thread.
565 void WebMediaPlayerAndroid::setStreamTextureClient( 574 void WebMediaPlayerAndroid::setStreamTextureClient(
566 WebKit::WebStreamTextureClient* client) { 575 WebKit::WebStreamTextureClient* client) {
567 if (stream_texture_proxy_.get()) 576 if (stream_texture_proxy_.get())
568 stream_texture_proxy_->SetClient(client); 577 stream_texture_proxy_->SetClient(client);
569 } 578 }
570 579
571 } // namespace webkit_media 580 } // namespace webkit_media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698