| Index: content/renderer/pepper/content_decryptor_delegate.h
|
| diff --git a/content/renderer/pepper/content_decryptor_delegate.h b/content/renderer/pepper/content_decryptor_delegate.h
|
| index 4e5a4bd5661c4644305e2e7d96313dfec42de425..d3fdc532ef398c7bf3b0986e4b736cb11dfa38db 100644
|
| --- a/content/renderer/pepper/content_decryptor_delegate.h
|
| +++ b/content/renderer/pepper/content_decryptor_delegate.h
|
| @@ -49,6 +49,8 @@ class ContentDecryptorDelegate {
|
| const media::SessionClosedCB& session_closed_cb,
|
| const media::SessionErrorCB& session_error_cb);
|
|
|
| + void InstanceCrashed();
|
| +
|
| // Provides access to PPP_ContentDecryptor_Private.
|
| bool CreateSession(uint32 session_id,
|
| const std::string& type,
|
| @@ -109,8 +111,11 @@ class ContentDecryptorDelegate {
|
| class TrackableCallback {
|
| public:
|
| TrackableCallback() : id_(0u) {}
|
| - // TODO(xhwang): Check that no callback is pending in dtor.
|
| - ~TrackableCallback() {};
|
| + ~TrackableCallback() {
|
| + // Callbacks must be satisfied.
|
| + DCHECK_EQ(id_, 0u);
|
| + DCHECK(is_null());
|
| + };
|
|
|
| bool Matches(uint32_t id) const { return id == id_; }
|
|
|
| @@ -162,6 +167,8 @@ class ContentDecryptorDelegate {
|
| media::SampleFormat sample_format,
|
| media::Decryptor::AudioBuffers* frames);
|
|
|
| + void CancelAllPendingCallbacks();
|
| +
|
| const PP_Instance pp_instance_;
|
| const PPP_ContentDecryptor_Private* const plugin_decryption_interface_;
|
|
|
| @@ -203,6 +210,9 @@ class ContentDecryptorDelegate {
|
| base::WeakPtr<ContentDecryptorDelegate> weak_this_;
|
| base::WeakPtrFactory<ContentDecryptorDelegate> weak_ptr_factory_;
|
|
|
| + // State of the current instance. Set to false if the plugin instance crashed.
|
| + bool is_valid_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(ContentDecryptorDelegate);
|
| };
|
|
|
|
|