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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "chrome/browser/android/chrome_media_client_android.h" 5 #include "chrome/browser/android/chrome_media_client_android.h"
6 #include "chrome/browser/profiles/profile.h"
7 #include "chrome/browser/profiles/profile_manager.h"
8
9 #include "content/public/browser/android/cdm_provision_fetcher.h"
10
11 #include "media/base/provision_fetcher.h"
6 12
7 ChromeMediaClientAndroid::ChromeMediaClientAndroid() { 13 ChromeMediaClientAndroid::ChromeMediaClientAndroid() {
8 } 14 }
9 15
10 ChromeMediaClientAndroid::~ChromeMediaClientAndroid() { 16 ChromeMediaClientAndroid::~ChromeMediaClientAndroid() {
11 } 17 }
12 18
19 scoped_ptr<media::ProvisionFetcher>
20 ChromeMediaClientAndroid::CreateDefaultFetcher() const {
21 // Use URL context for the active user profile.
22 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
23 net::URLRequestContextGetter* context = profile->GetRequestContext();
24
25 return content::CDMProvisionFetcher::CreateWithURLContext(context);
26 }
27
13 media::MediaDrmBridgeDelegate* 28 media::MediaDrmBridgeDelegate*
14 ChromeMediaClientAndroid::GetMediaDrmBridgeDelegate( 29 ChromeMediaClientAndroid::GetMediaDrmBridgeDelegate(
15 const std::vector<uint8_t>& scheme_uuid) { 30 const std::vector<uint8_t>& scheme_uuid) {
16 if (scheme_uuid == widevine_delegate_.GetUUID()) 31 if (scheme_uuid == widevine_delegate_.GetUUID())
17 return &widevine_delegate_; 32 return &widevine_delegate_;
18 return nullptr; 33 return nullptr;
19 } 34 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698