Chromium Code Reviews| OLD | NEW |
|---|---|
| 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_PLUGINS_PPAPI_CONTENT_DECRYPTOR_DELEGATE_H_ | 5 #ifndef WEBKIT_PLUGINS_PPAPI_CONTENT_DECRYPTOR_DELEGATE_H_ |
| 6 #define WEBKIT_PLUGINS_PPAPI_CONTENT_DECRYPTOR_DELEGATE_H_ | 6 #define WEBKIT_PLUGINS_PPAPI_CONTENT_DECRYPTOR_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "media/base/decryptor.h" | 13 #include "media/base/decryptor.h" |
| 14 #include "ppapi/c/private/pp_content_decryptor.h" | 14 #include "ppapi/c/private/pp_content_decryptor.h" |
| 15 #include "ppapi/c/private/ppp_content_decryptor_private.h" | 15 #include "ppapi/c/private/ppp_content_decryptor_private.h" |
| 16 #include "ppapi/shared_impl/scoped_pp_resource.h" | 16 #include "ppapi/shared_impl/scoped_pp_resource.h" |
| 17 #include "ui/gfx/rect.h" | |
| 18 #include "ui/gfx/size.h" | |
|
ddorwin
2012/12/01 04:44:41
We shouldn't need two includes for a single type.
xhwang
2012/12/01 05:38:43
Done.
| |
| 17 #include "webkit/plugins/webkit_plugins_export.h" | 19 #include "webkit/plugins/webkit_plugins_export.h" |
| 18 | 20 |
| 19 namespace media { | 21 namespace media { |
| 20 class AudioDecoderConfig; | 22 class AudioDecoderConfig; |
| 21 class DecoderBuffer; | 23 class DecoderBuffer; |
| 22 class DecryptorClient; | 24 class DecryptorClient; |
| 23 class VideoDecoderConfig; | 25 class VideoDecoderConfig; |
| 24 } | 26 } |
| 25 | 27 |
| 26 namespace webkit { | 28 namespace webkit { |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 108 // Returns true upon success and false if any error happened. | 110 // Returns true upon success and false if any error happened. |
| 109 bool MakeMediaBufferResource(media::Decryptor::StreamType stream_type, | 111 bool MakeMediaBufferResource(media::Decryptor::StreamType stream_type, |
| 110 const uint8* data, int size, | 112 const uint8* data, int size, |
| 111 ::ppapi::ScopedPPResource* resource); | 113 ::ppapi::ScopedPPResource* resource); |
| 112 | 114 |
| 113 const PP_Instance pp_instance_; | 115 const PP_Instance pp_instance_; |
| 114 const PPP_ContentDecryptor_Private* const plugin_decryption_interface_; | 116 const PPP_ContentDecryptor_Private* const plugin_decryption_interface_; |
| 115 | 117 |
| 116 media::DecryptorClient* decryptor_client_; | 118 media::DecryptorClient* decryptor_client_; |
| 117 | 119 |
| 120 gfx::Size natural_size_; | |
| 121 | |
| 118 // Request ID for tracking pending content decryption callbacks. | 122 // Request ID for tracking pending content decryption callbacks. |
| 119 // Note that zero indicates an invalid request ID. | 123 // Note that zero indicates an invalid request ID. |
| 120 // TODO(xhwang): Add completion callbacks for Reset/Stop and remove the use | 124 // TODO(xhwang): Add completion callbacks for Reset/Stop and remove the use |
| 121 // of request IDs. | 125 // of request IDs. |
| 122 uint32_t next_decryption_request_id_; | 126 uint32_t next_decryption_request_id_; |
| 123 | 127 |
| 124 uint32_t pending_audio_decrypt_request_id_; | 128 uint32_t pending_audio_decrypt_request_id_; |
| 125 media::Decryptor::DecryptCB pending_audio_decrypt_cb_; | 129 media::Decryptor::DecryptCB pending_audio_decrypt_cb_; |
| 126 | 130 |
| 127 uint32_t pending_video_decrypt_request_id_; | 131 uint32_t pending_video_decrypt_request_id_; |
| (...skipping 18 matching lines...) Expand all Loading... | |
| 146 ::ppapi::ScopedPPResource video_input_resource_; | 150 ::ppapi::ScopedPPResource video_input_resource_; |
| 147 int video_input_resource_size_; | 151 int video_input_resource_size_; |
| 148 | 152 |
| 149 DISALLOW_COPY_AND_ASSIGN(ContentDecryptorDelegate); | 153 DISALLOW_COPY_AND_ASSIGN(ContentDecryptorDelegate); |
| 150 }; | 154 }; |
| 151 | 155 |
| 152 } // namespace ppapi | 156 } // namespace ppapi |
| 153 } // namespace webkit | 157 } // namespace webkit |
| 154 | 158 |
| 155 #endif // WEBKIT_PLUGINS_PPAPI_CONTENT_DECRYPTOR_DELEGATE_H_ | 159 #endif // WEBKIT_PLUGINS_PPAPI_CONTENT_DECRYPTOR_DELEGATE_H_ |
| OLD | NEW |