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

Side by Side Diff: media/blink/webencryptedmediaclient_impl.cc

Issue 871663003: media: Add MediaPermission interface and MediaPermissionDispatcher. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments addressed Created 5 years, 11 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 unified diff | Download patch
« no previous file with comments | « media/blink/webencryptedmediaclient_impl.h ('k') | media/media.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "webencryptedmediaclient_impl.h" 5 #include "webencryptedmediaclient_impl.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "media/base/key_systems.h" 10 #include "media/base/key_systems.h"
11 #include "media/base/media_permission.h"
11 #include "net/base/mime_util.h" 12 #include "net/base/mime_util.h"
12 #include "third_party/WebKit/public/platform/WebEncryptedMediaRequest.h" 13 #include "third_party/WebKit/public/platform/WebEncryptedMediaRequest.h"
13 #include "third_party/WebKit/public/platform/WebMediaKeySystemConfiguration.h" 14 #include "third_party/WebKit/public/platform/WebMediaKeySystemConfiguration.h"
14 #include "third_party/WebKit/public/platform/WebString.h" 15 #include "third_party/WebKit/public/platform/WebString.h"
15 #include "third_party/WebKit/public/platform/WebVector.h" 16 #include "third_party/WebKit/public/platform/WebVector.h"
16 #include "webcontentdecryptionmoduleaccess_impl.h" 17 #include "webcontentdecryptionmoduleaccess_impl.h"
17 18
18 namespace media { 19 namespace media {
19 20
20 static bool IsSupportedContentType( 21 static bool IsSupportedContentType(
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 } 125 }
125 126
126 // TODO(sandersd): Prompt for distinctive identifiers and/or persistent state 127 // TODO(sandersd): Prompt for distinctive identifiers and/or persistent state
127 // if required. Make sure that future checks are silent. 128 // if required. Make sure that future checks are silent.
128 // http://crbug.com/446263. 129 // http://crbug.com/446263.
129 130
130 return true; 131 return true;
131 } 132 }
132 133
133 WebEncryptedMediaClientImpl::WebEncryptedMediaClientImpl( 134 WebEncryptedMediaClientImpl::WebEncryptedMediaClientImpl(
134 scoped_ptr<CdmFactory> cdm_factory) 135 scoped_ptr<CdmFactory> cdm_factory,
136 MediaPermission* /* media_permission */)
135 : cdm_factory_(cdm_factory.Pass()) { 137 : cdm_factory_(cdm_factory.Pass()) {
138 // TODO(sandersd): Use |media_permission| to check for media permissions in
139 // this class.
136 } 140 }
137 141
138 WebEncryptedMediaClientImpl::~WebEncryptedMediaClientImpl() { 142 WebEncryptedMediaClientImpl::~WebEncryptedMediaClientImpl() {
139 } 143 }
140 144
141 void WebEncryptedMediaClientImpl::requestMediaKeySystemAccess( 145 void WebEncryptedMediaClientImpl::requestMediaKeySystemAccess(
142 blink::WebEncryptedMediaRequest request) { 146 blink::WebEncryptedMediaRequest request) {
143 // TODO(jrummell): This should be asynchronous. 147 // TODO(jrummell): This should be asynchronous.
144 148
145 // Continued from requestMediaKeySystemAccess(), step 7, from 149 // Continued from requestMediaKeySystemAccess(), step 7, from
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 return; 191 return;
188 } 192 }
189 } 193 }
190 194
191 // 7.4 Reject promise with a new DOMException whose name is NotSupportedError. 195 // 7.4 Reject promise with a new DOMException whose name is NotSupportedError.
192 request.requestNotSupported( 196 request.requestNotSupported(
193 "None of the requested configurations were supported."); 197 "None of the requested configurations were supported.");
194 } 198 }
195 199
196 } // namespace media 200 } // namespace media
OLDNEW
« no previous file with comments | « media/blink/webencryptedmediaclient_impl.h ('k') | media/media.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698