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

Unified Diff: chrome/browser/android/chrome_media_client_android.cc

Issue 1427183002: Move MediaDrmBridge provision communication to native side. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: For on-demand provisioning the fetcher is created in content/ and depends on the renderer. Created 5 years, 1 month 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: chrome/browser/android/chrome_media_client_android.cc
diff --git a/chrome/browser/android/chrome_media_client_android.cc b/chrome/browser/android/chrome_media_client_android.cc
index 1f8a542673db9591240e17a3290c6042992a827b..6b24500482c742f34cf9515c2f2a2d169bf4244a 100644
--- a/chrome/browser/android/chrome_media_client_android.cc
+++ b/chrome/browser/android/chrome_media_client_android.cc
@@ -3,6 +3,12 @@
// found in the LICENSE file.
#include "chrome/browser/android/chrome_media_client_android.h"
+#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/profiles/profile_manager.h"
+
+#include "content/public/browser/android/cdm_provision_fetcher.h"
+
+#include "media/base/provision_fetcher.h"
ChromeMediaClientAndroid::ChromeMediaClientAndroid() {
}
@@ -10,6 +16,15 @@ ChromeMediaClientAndroid::ChromeMediaClientAndroid() {
ChromeMediaClientAndroid::~ChromeMediaClientAndroid() {
}
+scoped_ptr<media::ProvisionFetcher>
+ChromeMediaClientAndroid::CreateDefaultFetcher() const {
+ // Use URL context for the active user profile.
+ Profile* profile = ProfileManager::GetActiveUserProfile();
xhwang 2015/11/06 23:08:18 The call GetActiveUserProfile() is what I am conce
Tima Vaisburd 2015/11/11 03:03:33 Changed to ProfileManager::GetLastusedProfile() (i
+ net::URLRequestContextGetter* context = profile->GetRequestContext();
+
+ return content::CDMProvisionFetcher::CreateWithURLContext(context);
+}
+
media::MediaDrmBridgeDelegate*
ChromeMediaClientAndroid::GetMediaDrmBridgeDelegate(
const std::vector<uint8_t>& scheme_uuid) {

Powered by Google App Engine
This is Rietveld 408576698