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

Side by Side Diff: content/renderer/media/crypto/ppapi_decryptor.h

Issue 193303002: WeakPtr destruction order cleanup: media edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 6 years, 9 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_MEDIA_CRYPTO_PPAPI_DECRYPTOR_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_CRYPTO_PPAPI_DECRYPTOR_H_
6 #define CONTENT_RENDERER_MEDIA_CRYPTO_PPAPI_DECRYPTOR_H_ 6 #define CONTENT_RENDERER_MEDIA_CRYPTO_PPAPI_DECRYPTOR_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 media::MediaKeys::KeyError error_code, 97 media::MediaKeys::KeyError error_code,
98 uint32 system_code); 98 uint32 system_code);
99 99
100 // Callback to notify that a fatal error happened in |plugin_cdm_delegate_|. 100 // Callback to notify that a fatal error happened in |plugin_cdm_delegate_|.
101 // The error is terminal and |plugin_cdm_delegate_| should not be used after 101 // The error is terminal and |plugin_cdm_delegate_| should not be used after
102 // this call. 102 // this call.
103 void OnFatalPluginError(); 103 void OnFatalPluginError();
104 104
105 ContentDecryptorDelegate* CdmDelegate(); 105 ContentDecryptorDelegate* CdmDelegate();
106 106
107 base::WeakPtr<PpapiDecryptor> weak_this_;
108
109 // Hold a reference of the Pepper CDM wrapper to make sure the plugin lives 107 // Hold a reference of the Pepper CDM wrapper to make sure the plugin lives
110 // as long as needed. 108 // as long as needed.
111 scoped_ptr<PepperCdmWrapper> pepper_cdm_wrapper_; 109 scoped_ptr<PepperCdmWrapper> pepper_cdm_wrapper_;
112 110
113 // Callbacks for firing session events. 111 // Callbacks for firing session events.
114 media::SessionCreatedCB session_created_cb_; 112 media::SessionCreatedCB session_created_cb_;
115 media::SessionMessageCB session_message_cb_; 113 media::SessionMessageCB session_message_cb_;
116 media::SessionReadyCB session_ready_cb_; 114 media::SessionReadyCB session_ready_cb_;
117 media::SessionClosedCB session_closed_cb_; 115 media::SessionClosedCB session_closed_cb_;
118 media::SessionErrorCB session_error_cb_; 116 media::SessionErrorCB session_error_cb_;
119 117
120 scoped_refptr<base::MessageLoopProxy> render_loop_proxy_; 118 scoped_refptr<base::MessageLoopProxy> render_loop_proxy_;
121 119
122 DecoderInitCB audio_decoder_init_cb_; 120 DecoderInitCB audio_decoder_init_cb_;
123 DecoderInitCB video_decoder_init_cb_; 121 DecoderInitCB video_decoder_init_cb_;
124 NewKeyCB new_audio_key_cb_; 122 NewKeyCB new_audio_key_cb_;
125 NewKeyCB new_video_key_cb_; 123 NewKeyCB new_video_key_cb_;
126 124
125 // NOTE: Weak pointers must be invalidated before all other member variables.
127 base::WeakPtrFactory<PpapiDecryptor> weak_ptr_factory_; 126 base::WeakPtrFactory<PpapiDecryptor> weak_ptr_factory_;
128 127
129 DISALLOW_COPY_AND_ASSIGN(PpapiDecryptor); 128 DISALLOW_COPY_AND_ASSIGN(PpapiDecryptor);
130 }; 129 };
131 130
132 } // namespace content 131 } // namespace content
133 132
134 #endif // CONTENT_RENDERER_MEDIA_CRYPTO_PPAPI_DECRYPTOR_H_ 133 #endif // CONTENT_RENDERER_MEDIA_CRYPTO_PPAPI_DECRYPTOR_H_
OLDNEW
« no previous file with comments | « content/renderer/media/cdm_session_adapter.h ('k') | content/renderer/media/crypto/ppapi_decryptor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698