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/ppapi_decryptor.h

Issue 10896014: Add a bool return value to media::Decryptor::GenerateKeyRequest(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Resolve comments. Created 8 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 | Annotate | Revision Log
« no previous file with comments | « media/filters/pipeline_integration_test.cc ('k') | webkit/media/crypto/ppapi_decryptor.cc » ('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 (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_PPAPI_DECRYPTOR_H_ 5 #ifndef WEBKIT_MEDIA_CRYPTO_PPAPI_DECRYPTOR_H_
6 #define WEBKIT_MEDIA_CRYPTO_PPAPI_DECRYPTOR_H_ 6 #define WEBKIT_MEDIA_CRYPTO_PPAPI_DECRYPTOR_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 19 matching lines...) Expand all
30 // PluginInstance. 30 // PluginInstance.
31 // This class should always be created on the main renderer thread. 31 // This class should always be created on the main renderer thread.
32 class PpapiDecryptor : public media::Decryptor { 32 class PpapiDecryptor : public media::Decryptor {
33 public: 33 public:
34 PpapiDecryptor( 34 PpapiDecryptor(
35 media::DecryptorClient* client, 35 media::DecryptorClient* client,
36 const scoped_refptr<webkit::ppapi::PluginInstance>& plugin_instance); 36 const scoped_refptr<webkit::ppapi::PluginInstance>& plugin_instance);
37 virtual ~PpapiDecryptor(); 37 virtual ~PpapiDecryptor();
38 38
39 // media::Decryptor implementation. 39 // media::Decryptor implementation.
40 virtual void GenerateKeyRequest(const std::string& key_system, 40 virtual bool GenerateKeyRequest(const std::string& key_system,
41 const uint8* init_data, 41 const uint8* init_data,
42 int init_data_length) OVERRIDE; 42 int init_data_length) OVERRIDE;
43 virtual void AddKey(const std::string& key_system, 43 virtual void AddKey(const std::string& key_system,
44 const uint8* key, 44 const uint8* key,
45 int key_length, 45 int key_length,
46 const uint8* init_data, 46 const uint8* init_data,
47 int init_data_length, 47 int init_data_length,
48 const std::string& session_id) OVERRIDE; 48 const std::string& session_id) OVERRIDE;
49 virtual void CancelKeyRequest(const std::string& key_system, 49 virtual void CancelKeyRequest(const std::string& key_system,
50 const std::string& session_id) OVERRIDE; 50 const std::string& session_id) OVERRIDE;
51 virtual void Decrypt(const scoped_refptr<media::DecoderBuffer>& encrypted, 51 virtual void Decrypt(const scoped_refptr<media::DecoderBuffer>& encrypted,
52 const DecryptCB& decrypt_cb) OVERRIDE; 52 const DecryptCB& decrypt_cb) OVERRIDE;
53 virtual void Stop() OVERRIDE; 53 virtual void Stop() OVERRIDE;
54 54
55 private: 55 private:
56 void ReportFailureToCallPlugin(const std::string& key_system, 56 void ReportFailureToCallPlugin(const std::string& key_system,
57 const std::string& session_id); 57 const std::string& session_id);
58 58
59 media::DecryptorClient* client_; 59 media::DecryptorClient* client_;
60 scoped_refptr<webkit::ppapi::PluginInstance> cdm_plugin_; 60 scoped_refptr<webkit::ppapi::PluginInstance> cdm_plugin_;
61 scoped_refptr<base::MessageLoopProxy> render_loop_proxy_; 61 scoped_refptr<base::MessageLoopProxy> render_loop_proxy_;
62 62
63 DISALLOW_COPY_AND_ASSIGN(PpapiDecryptor); 63 DISALLOW_COPY_AND_ASSIGN(PpapiDecryptor);
64 }; 64 };
65 65
66 } // namespace webkit_media 66 } // namespace webkit_media
67 67
68 #endif // WEBKIT_MEDIA_CRYPTO_PPAPI_DECRYPTOR_H_ 68 #endif // WEBKIT_MEDIA_CRYPTO_PPAPI_DECRYPTOR_H_
OLDNEW
« no previous file with comments | « media/filters/pipeline_integration_test.cc ('k') | webkit/media/crypto/ppapi_decryptor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698