| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef CONTENT_RENDERER_MEDIA_WEBCONTENTDECRYPTIONMODULE_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_WEBCONTENTDECRYPTIONMODULE_IMPL_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_WEBCONTENTDECRYPTIONMODULE_IMPL_H_ | 6 #define CONTENT_RENDERER_MEDIA_WEBCONTENTDECRYPTIONMODULE_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 // CDM ID is associated, such as when Clear Key is used. | 57 // CDM ID is associated, such as when Clear Key is used. |
| 58 int GetCdmId() const; | 58 int GetCdmId() const; |
| 59 #endif // defined(ENABLE_BROWSER_CDMS) | 59 #endif // defined(ENABLE_BROWSER_CDMS) |
| 60 | 60 |
| 61 // blink::WebContentDecryptionModule implementation. | 61 // blink::WebContentDecryptionModule implementation. |
| 62 virtual blink::WebContentDecryptionModuleSession* createSession(); | 62 virtual blink::WebContentDecryptionModuleSession* createSession(); |
| 63 // TODO(jrummell): Remove this method once blink updated. | 63 // TODO(jrummell): Remove this method once blink updated. |
| 64 virtual blink::WebContentDecryptionModuleSession* createSession( | 64 virtual blink::WebContentDecryptionModuleSession* createSession( |
| 65 blink::WebContentDecryptionModuleSession::Client* client); | 65 blink::WebContentDecryptionModuleSession::Client* client); |
| 66 | 66 |
| 67 virtual void setServerCertificate( |
| 68 const uint8* server_certificate, |
| 69 size_t server_certificate_length, |
| 70 blink::WebContentDecryptionModuleResult result); |
| 71 |
| 67 private: | 72 private: |
| 68 // Takes reference to |adapter|. | 73 // Takes reference to |adapter|. |
| 69 WebContentDecryptionModuleImpl(scoped_refptr<CdmSessionAdapter> adapter); | 74 WebContentDecryptionModuleImpl(scoped_refptr<CdmSessionAdapter> adapter); |
| 70 | 75 |
| 71 scoped_refptr<CdmSessionAdapter> adapter_; | 76 scoped_refptr<CdmSessionAdapter> adapter_; |
| 72 | 77 |
| 73 DISALLOW_COPY_AND_ASSIGN(WebContentDecryptionModuleImpl); | 78 DISALLOW_COPY_AND_ASSIGN(WebContentDecryptionModuleImpl); |
| 74 }; | 79 }; |
| 75 | 80 |
| 76 // Allow typecasting from blink type as this is the only implementation. | 81 // Allow typecasting from blink type as this is the only implementation. |
| 77 inline WebContentDecryptionModuleImpl* ToWebContentDecryptionModuleImpl( | 82 inline WebContentDecryptionModuleImpl* ToWebContentDecryptionModuleImpl( |
| 78 blink::WebContentDecryptionModule* cdm) { | 83 blink::WebContentDecryptionModule* cdm) { |
| 79 return static_cast<WebContentDecryptionModuleImpl*>(cdm); | 84 return static_cast<WebContentDecryptionModuleImpl*>(cdm); |
| 80 } | 85 } |
| 81 | 86 |
| 82 } // namespace content | 87 } // namespace content |
| 83 | 88 |
| 84 #endif // CONTENT_RENDERER_MEDIA_WEBCONTENTDECRYPTIONMODULE_IMPL_H_ | 89 #endif // CONTENT_RENDERER_MEDIA_WEBCONTENTDECRYPTIONMODULE_IMPL_H_ |
| OLD | NEW |