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

Unified Diff: media/base/android/media_resource_getter.h

Issue 405663002: Support basic authentication for html5 media (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updating crbug Created 6 years, 5 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 | « media/base/android/media_player_bridge.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/android/media_resource_getter.h
diff --git a/media/base/android/media_resource_getter.h b/media/base/android/media_resource_getter.h
index 075f9d01fec3b07c4988813d6da12ce48a8d8fe4..b833aa8189e797c623422f37e4b306207aaec3b8 100644
--- a/media/base/android/media_resource_getter.h
+++ b/media/base/android/media_resource_getter.h
@@ -9,6 +9,7 @@
#include "base/callback.h"
#include "base/files/file_path.h"
+#include "base/strings/string16.h"
#include "base/time/time.h"
#include "media/base/media_export.h"
#include "url/gurl.h"
@@ -19,12 +20,26 @@ namespace media {
// are executed on the caller's thread.
class MEDIA_EXPORT MediaResourceGetter {
public:
+ // Callback to get the cookies. Args: cookies string.
typedef base::Callback<void(const std::string&)> GetCookieCB;
+
+ // Callback to get the platform path. Args: platform path.
typedef base::Callback<void(const std::string&)> GetPlatformPathCB;
+
+ // Callback to get the auth credentials. Args: username and password.
+ typedef base::Callback<void(const base::string16&, const base::string16&)>
+ GetAuthCredentialsCB;
+
+ // Callback to get the media metadata. Args: duration, width, height, and
+ // whether the information is retrieved successfully.
typedef base::Callback<void(base::TimeDelta, int, int, bool)>
ExtractMediaMetadataCB;
virtual ~MediaResourceGetter();
+ // Method for getting the auth credentials for a URL.
+ virtual void GetAuthCredentials(const GURL& url,
+ const GetAuthCredentialsCB& callback) = 0;
+
// Method for getting the cookies for a given URL.
virtual void GetCookies(const GURL& url,
const GURL& first_party_for_cookies,
« no previous file with comments | « media/base/android/media_player_bridge.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698