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

Side by Side Diff: content/renderer/media/webcontentdecryptionmodule_impl.h

Issue 557723003: Implement Chromium side of MediaKeys.isTypeSupported(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add DEP from components/cdm/renderer to content/public/common. Created 6 years, 3 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
OLDNEW
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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 // TODO(jrummell): Figure out lifetimes, as WMPI may still use the decryptor 51 // TODO(jrummell): Figure out lifetimes, as WMPI may still use the decryptor
52 // after WebContentDecryptionModule is freed. http://crbug.com/330324 52 // after WebContentDecryptionModule is freed. http://crbug.com/330324
53 media::Decryptor* GetDecryptor(); 53 media::Decryptor* GetDecryptor();
54 54
55 #if defined(ENABLE_BROWSER_CDMS) 55 #if defined(ENABLE_BROWSER_CDMS)
56 // Returns the CDM ID associated with this object. May be kInvalidCdmId if no 56 // Returns the CDM ID associated with this object. May be kInvalidCdmId if no
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 static blink::WebContentDecryptionModule::SupportsKeySystem
ddorwin 2014/09/13 01:20:47 Are statics supposed to be grouped?
sandersd (OOO until July 31) 2014/09/22 23:45:54 Done.
62 IsKeySystemSupported(const blink::WebString& key_system,
63 const blink::WebString& init_data_type,
64 const blink::WebString& container,
65 const blink::WebString& codecs,
66 const blink::WebString& capability);
67
61 // blink::WebContentDecryptionModule implementation. 68 // blink::WebContentDecryptionModule implementation.
62 virtual blink::WebContentDecryptionModuleSession* createSession(); 69 virtual blink::WebContentDecryptionModuleSession* createSession();
63 // TODO(jrummell): Remove this method once blink updated. 70 // TODO(jrummell): Remove this method once blink updated.
64 virtual blink::WebContentDecryptionModuleSession* createSession( 71 virtual blink::WebContentDecryptionModuleSession* createSession(
65 blink::WebContentDecryptionModuleSession::Client* client); 72 blink::WebContentDecryptionModuleSession::Client* client);
66 73
67 private: 74 private:
68 // Takes reference to |adapter|. 75 // Takes reference to |adapter|.
69 WebContentDecryptionModuleImpl(scoped_refptr<CdmSessionAdapter> adapter); 76 WebContentDecryptionModuleImpl(scoped_refptr<CdmSessionAdapter> adapter);
70 77
71 scoped_refptr<CdmSessionAdapter> adapter_; 78 scoped_refptr<CdmSessionAdapter> adapter_;
72 79
73 DISALLOW_COPY_AND_ASSIGN(WebContentDecryptionModuleImpl); 80 DISALLOW_COPY_AND_ASSIGN(WebContentDecryptionModuleImpl);
74 }; 81 };
75 82
76 // Allow typecasting from blink type as this is the only implementation. 83 // Allow typecasting from blink type as this is the only implementation.
77 inline WebContentDecryptionModuleImpl* ToWebContentDecryptionModuleImpl( 84 inline WebContentDecryptionModuleImpl* ToWebContentDecryptionModuleImpl(
78 blink::WebContentDecryptionModule* cdm) { 85 blink::WebContentDecryptionModule* cdm) {
79 return static_cast<WebContentDecryptionModuleImpl*>(cdm); 86 return static_cast<WebContentDecryptionModuleImpl*>(cdm);
80 } 87 }
81 88
82 } // namespace content 89 } // namespace content
83 90
84 #endif // CONTENT_RENDERER_MEDIA_WEBCONTENTDECRYPTIONMODULE_IMPL_H_ 91 #endif // CONTENT_RENDERER_MEDIA_WEBCONTENTDECRYPTIONMODULE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698