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

Unified Diff: content/renderer/media/android/media_info_loader.h

Issue 408873004: Fix for cross-origin video check for webgl on android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix clang warnings Created 6 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
Index: content/renderer/media/android/media_info_loader.h
diff --git a/content/renderer/media/android/media_info_loader.h b/content/renderer/media/android/media_info_loader.h
index d87b67c30edcb9c0f643bab92091783a2617f578..caefc9d16729ce220e5f866407e8451b7655042c 100644
--- a/content/renderer/media/android/media_info_loader.h
+++ b/content/renderer/media/android/media_info_loader.h
@@ -14,6 +14,7 @@
#include "content/renderer/media/active_loader.h"
#include "third_party/WebKit/public/platform/WebMediaPlayer.h"
#include "third_party/WebKit/public/platform/WebURLLoaderClient.h"
+#include "third_party/WebKit/public/web/WebDocument.h"
#include "url/gurl.h"
namespace blink {
@@ -44,11 +45,16 @@ class CONTENT_EXPORT MediaInfoLoader : private blink::WebURLLoaderClient {
kOk,
};
+ // Callback when MediaInfoLoader finishes loading the url. Args: whether URL
+ // is successfully loaded, the final URL destination following all the
+ // redirect, the first party URL for the final destination, and whether
+ // credentials needs to be sent to the final destination.
+ typedef base::Callback<void(Status, const GURL&, const GURL&, bool)> ReadyCB;
+
// Start loading information about the given media URL.
// |url| - URL for the media resource to be loaded.
// |cors_mode| - HTML media element's crossorigin attribute.
// |ready_cb| - Called when media info has finished or failed loading.
- typedef base::Callback<void(Status)> ReadyCB;
MediaInfoLoader(
const GURL& url,
blink::WebMediaPlayer::CORSMode cors_mode,
@@ -66,10 +72,6 @@ class CONTENT_EXPORT MediaInfoLoader : private blink::WebURLLoaderClient {
// Only valid to call after the loader becomes ready.
bool DidPassCORSAccessCheck() const;
- void set_single_origin(bool single_origin) {
- single_origin_ = single_origin;
- }
-
private:
friend class MediaInfoLoaderTest;
@@ -115,6 +117,8 @@ class CONTENT_EXPORT MediaInfoLoader : private blink::WebURLLoaderClient {
bool loader_failed_;
GURL url_;
+ GURL first_party_url_;
+ bool allow_stored_credentials_;
blink::WebMediaPlayer::CORSMode cors_mode_;
bool single_origin_;

Powered by Google App Engine
This is Rietveld 408576698