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 CONTENT_RENDERER_PEPPER_CONTENT_DECRYPTOR_DELEGATE_H_ | 5 #ifndef CONTENT_RENDERER_PEPPER_CONTENT_DECRYPTOR_DELEGATE_H_ |
| 6 #define CONTENT_RENDERER_PEPPER_CONTENT_DECRYPTOR_DELEGATE_H_ | 6 #define CONTENT_RENDERER_PEPPER_CONTENT_DECRYPTOR_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <queue> | 8 #include <queue> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 30 matching lines...) Expand all Loading... | |
| 41 | 41 |
| 42 void Initialize(const std::string& key_system); | 42 void Initialize(const std::string& key_system); |
| 43 | 43 |
| 44 void SetSessionEventCallbacks( | 44 void SetSessionEventCallbacks( |
| 45 const media::SessionCreatedCB& session_created_cb, | 45 const media::SessionCreatedCB& session_created_cb, |
| 46 const media::SessionMessageCB& session_message_cb, | 46 const media::SessionMessageCB& session_message_cb, |
| 47 const media::SessionReadyCB& session_ready_cb, | 47 const media::SessionReadyCB& session_ready_cb, |
| 48 const media::SessionClosedCB& session_closed_cb, | 48 const media::SessionClosedCB& session_closed_cb, |
| 49 const media::SessionErrorCB& session_error_cb); | 49 const media::SessionErrorCB& session_error_cb); |
| 50 | 50 |
| 51 void InstanceCrashed(); | |
| 52 | |
| 51 // Provides access to PPP_ContentDecryptor_Private. | 53 // Provides access to PPP_ContentDecryptor_Private. |
| 52 bool CreateSession(uint32 session_id, | 54 bool CreateSession(uint32 session_id, |
| 53 const std::string& type, | 55 const std::string& type, |
| 54 const uint8* init_data, | 56 const uint8* init_data, |
| 55 int init_data_length); | 57 int init_data_length); |
| 56 bool UpdateSession(uint32 session_id, | 58 bool UpdateSession(uint32 session_id, |
| 57 const uint8* response, | 59 const uint8* response, |
| 58 int response_length); | 60 int response_length); |
| 59 bool ReleaseSession(uint32 session_id); | 61 bool ReleaseSession(uint32 session_id); |
| 60 bool Decrypt(media::Decryptor::StreamType stream_type, | 62 bool Decrypt(media::Decryptor::StreamType stream_type, |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 178 | 180 |
| 179 std::queue<uint32_t> free_buffers_; | 181 std::queue<uint32_t> free_buffers_; |
| 180 | 182 |
| 181 // Keep track of audio parameters. | 183 // Keep track of audio parameters. |
| 182 int audio_samples_per_second_; | 184 int audio_samples_per_second_; |
| 183 int audio_channel_count_; | 185 int audio_channel_count_; |
| 184 | 186 |
| 185 base::WeakPtr<ContentDecryptorDelegate> weak_this_; | 187 base::WeakPtr<ContentDecryptorDelegate> weak_this_; |
| 186 base::WeakPtrFactory<ContentDecryptorDelegate> weak_ptr_factory_; | 188 base::WeakPtrFactory<ContentDecryptorDelegate> weak_ptr_factory_; |
| 187 | 189 |
| 190 bool is_instance_crashed_; | |
|
xhwang
2013/12/28 01:00:28
I am debating on this. Probably when the plugin is
ddorwin
2014/01/07 19:28:48
You can't simply destroy this object without infor
xhwang
2014/01/07 20:48:34
Thanks for the comments. In summary, notifying Ppa
ddorwin
2014/01/07 23:59:01
Agreed and done.
| |
| 191 | |
| 188 DISALLOW_COPY_AND_ASSIGN(ContentDecryptorDelegate); | 192 DISALLOW_COPY_AND_ASSIGN(ContentDecryptorDelegate); |
| 189 }; | 193 }; |
| 190 | 194 |
| 191 } // namespace content | 195 } // namespace content |
| 192 | 196 |
| 193 #endif // CONTENT_RENDERER_PEPPER_CONTENT_DECRYPTOR_DELEGATE_H_ | 197 #endif // CONTENT_RENDERER_PEPPER_CONTENT_DECRYPTOR_DELEGATE_H_ |
| OLD | NEW |