Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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, |
| 135 : cdm_factory_(cdm_factory.Pass()) { | 136 MediaPermission* media_permission) |
| 137 : cdm_factory_(cdm_factory.Pass()), media_permission_(media_permission) { | |
| 138 if (!media_permission_) { | |
|
xhwang
2015/01/26 21:49:06
Need this to suppress a unused memeber variable wa
ddorwin
2015/01/26 23:33:46
Why not just an unused parameter macro? Or do you
xhwang
2015/01/27 00:01:58
I remember we had that macro before, but I can't f
ddorwin
2015/01/27 00:09:03
Perhaps we just remove parameters (this is a membe
xhwang
2015/01/27 00:34:05
Done.
However, when
| |
| 139 DVLOG(2) << "Null |media_permission_|."; | |
| 140 } | |
|
ddorwin
2015/01/26 23:33:46
TODO: Do something with the new pointer?
xhwang
2015/01/27 00:01:58
Done.
| |
| 136 } | 141 } |
| 137 | 142 |
| 138 WebEncryptedMediaClientImpl::~WebEncryptedMediaClientImpl() { | 143 WebEncryptedMediaClientImpl::~WebEncryptedMediaClientImpl() { |
| 139 } | 144 } |
| 140 | 145 |
| 141 void WebEncryptedMediaClientImpl::requestMediaKeySystemAccess( | 146 void WebEncryptedMediaClientImpl::requestMediaKeySystemAccess( |
| 142 blink::WebEncryptedMediaRequest request) { | 147 blink::WebEncryptedMediaRequest request) { |
| 143 // TODO(jrummell): This should be asynchronous. | 148 // TODO(jrummell): This should be asynchronous. |
| 144 | 149 |
| 145 // Continued from requestMediaKeySystemAccess(), step 7, from | 150 // Continued from requestMediaKeySystemAccess(), step 7, from |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 187 return; | 192 return; |
| 188 } | 193 } |
| 189 } | 194 } |
| 190 | 195 |
| 191 // 7.4 Reject promise with a new DOMException whose name is NotSupportedError. | 196 // 7.4 Reject promise with a new DOMException whose name is NotSupportedError. |
| 192 request.requestNotSupported( | 197 request.requestNotSupported( |
| 193 "None of the requested configurations were supported."); | 198 "None of the requested configurations were supported."); |
| 194 } | 199 } |
| 195 | 200 |
| 196 } // namespace media | 201 } // namespace media |
| OLD | NEW |