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

Unified Diff: webkit/media/buffered_resource_loader.h

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 side-by-side diff with in-line comments
Download patch
Index: webkit/media/buffered_resource_loader.h
diff --git a/webkit/media/buffered_resource_loader.h b/webkit/media/buffered_resource_loader.h
index 83a2f5d34d7292abdc9cf4e0e997cb6db17fcf74..a5056e9e124a4bd46ee3321b5f8efcc5a4a2ea76 100644
--- a/webkit/media/buffered_resource_loader.h
+++ b/webkit/media/buffered_resource_loader.h
@@ -65,7 +65,11 @@ class BufferedResourceLoader : public WebKit::WebURLLoaderClient {
kCacheMiss,
};
+ // Keep in sync with WebMediaPlayer::CrossOriginAttribute.
+ enum CrossOriginAttribute { kUnspecified, kAnonymous, kUseCredentials };
scherkus (not reviewing) 2012/06/06 00:44:36 are you following abarth's suggestion re: CORSMode
+
// |url| - URL for the resource to be loaded.
+ // |cross_origin_attribute| - HTML media element's crossorigin attribute.
// |first_byte_position| - First byte to start loading from,
// |kPositionNotSpecified| for not specified.
// |last_byte_position| - Last byte to be loaded,
@@ -73,13 +77,15 @@ class BufferedResourceLoader : public WebKit::WebURLLoaderClient {
// |strategy| is the initial loading strategy to use.
// |bitrate| is the bitrate of the media, 0 if unknown.
// |playback_rate| is the current playback rate of the media.
- BufferedResourceLoader(const GURL& url,
- int64 first_byte_position,
- int64 last_byte_position,
- DeferStrategy strategy,
- int bitrate,
- float playback_rate,
- media::MediaLog* media_log);
+ BufferedResourceLoader(
+ const GURL& url,
+ CrossOriginAttribute cross_origin_attr,
+ int64 first_byte_position,
+ int64 last_byte_position,
+ DeferStrategy strategy,
+ int bitrate,
+ float playback_rate,
+ media::MediaLog* media_log);
virtual ~BufferedResourceLoader();
// Start the resource loading with the specified URL and range.
@@ -284,6 +290,7 @@ class BufferedResourceLoader : public WebKit::WebURLLoaderClient {
size_t saved_forward_capacity_;
GURL url_;
+ CrossOriginAttribute cross_origin_attribute_;
const int64 first_byte_position_;
const int64 last_byte_position_;
bool single_origin_;

Powered by Google App Engine
This is Rietveld 408576698