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

Side by Side Diff: webkit/media/crypto/key_systems.h

Issue 10704241: Add PpapiDecryptor which wraps a CDM plugin. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | webkit/media/crypto/key_systems.cc » ('j') | webkit/media/crypto/key_systems.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 WEBKIT_MEDIA_CRYPTO_KEY_SYSTEMS_H_ 5 #ifndef WEBKIT_MEDIA_CRYPTO_KEY_SYSTEMS_H_
6 #define WEBKIT_MEDIA_CRYPTO_KEY_SYSTEMS_H_ 6 #define WEBKIT_MEDIA_CRYPTO_KEY_SYSTEMS_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
ddorwin 2012/07/17 21:31:28 We should really try to avoid this include in this
xhwang 2012/07/18 19:43:17 Done.
12 13
13 namespace WebKit { 14 namespace WebKit {
14 class WebString; 15 class WebString;
15 } 16 }
16 17
17 namespace media { 18 namespace media {
18 class Decryptor; 19 class Decryptor;
19 class DecryptorClient; 20 class DecryptorClient;
20 } 21 }
21 22
22 namespace webkit_media { 23 namespace webkit_media {
23 24
24 // Returns whether |key_sytem| is supported at all. 25 // Returns whether |key_sytem| is supported at all.
25 // Call IsSupportedKeySystemWithMediaMimeType() to determine whether a 26 // Call IsSupportedKeySystemWithMediaMimeType() to determine whether a
26 // |key_system| supports a specific type of media. 27 // |key_system| supports a specific type of media.
27 bool IsSupportedKeySystem(const WebKit::WebString& key_system); 28 bool IsSupportedKeySystem(const WebKit::WebString& key_system);
28 29
29 // Returns whether |key_sytem| supports the specified media type and codec(s). 30 // Returns whether |key_sytem| supports the specified media type and codec(s).
30 bool IsSupportedKeySystemWithMediaMimeType( 31 bool IsSupportedKeySystemWithMediaMimeType(
31 const std::string& mime_type, 32 const std::string& mime_type,
32 const std::vector<std::string>& codecs, 33 const std::vector<std::string>& codecs,
33 const std::string& key_system); 34 const std::string& key_system);
34 35
36 const char* GetPluginName(const std::string& key_system);
ddorwin 2012/07/17 21:31:28 I think it is really PluginMimeType.
xhwang 2012/07/18 19:43:17 Done.
37
35 // Creates and returns a decryptor that corresponds to the |key_system|. 38 // Creates and returns a decryptor that corresponds to the |key_system|.
36 // Returns NULL if the |key_system| is not supported. 39 // Returns NULL if the |key_system| is not supported.
37 scoped_ptr<media::Decryptor> CreateDecryptor(const std::string& key_system, 40 typedef base::Callback<scoped_refptr<webkit::ppapi::PluginInstance>
ddorwin 2012/07/17 21:31:28 Why is there a PI exposed? Seems wrong for this fi
xhwang 2012/07/18 19:43:17 Done.
38 media::DecryptorClient* client); 41 (const std::string&)> CreatePluginCB;
42 scoped_ptr<media::Decryptor> CreateDecryptor(
43 const std::string& key_system,
44 media::DecryptorClient* client,
45 const CreatePluginCB& create_plugin_cb);
39 46
40 } // namespace webkit_media 47 } // namespace webkit_media
41 48
42 #endif // WEBKIT_MEDIA_CRYPTO_KEY_SYSTEMS_H_ 49 #endif // WEBKIT_MEDIA_CRYPTO_KEY_SYSTEMS_H_
OLDNEW
« no previous file with comments | « no previous file | webkit/media/crypto/key_systems.cc » ('j') | webkit/media/crypto/key_systems.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698