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

Side by Side Diff: media/mojo/services/mojo_cdm_promise.h

Issue 1729063003: media: Reject pending CDM promise during destruction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments addressed Created 4 years, 10 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 MEDIA_MOJO_SERVICES_MOJO_CDM_PROMISE_H_ 5 #ifndef MEDIA_MOJO_SERVICES_MOJO_CDM_PROMISE_H_
6 #define MEDIA_MOJO_SERVICES_MOJO_CDM_PROMISE_H_ 6 #define MEDIA_MOJO_SERVICES_MOJO_CDM_PROMISE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 15 matching lines...) Expand all
26 MojoCdmPromise(const CallbackType& callback); 26 MojoCdmPromise(const CallbackType& callback);
27 ~MojoCdmPromise() final; 27 ~MojoCdmPromise() final;
28 28
29 // CdmPromiseTemplate<> implementation. 29 // CdmPromiseTemplate<> implementation.
30 void resolve(const T&... result) final; 30 void resolve(const T&... result) final;
31 void reject(MediaKeys::Exception exception, 31 void reject(MediaKeys::Exception exception,
32 uint32_t system_code, 32 uint32_t system_code,
33 const std::string& error_message) final; 33 const std::string& error_message) final;
34 34
35 private: 35 private:
36 using media::CdmPromiseTemplate<T...>::MarkPromiseSettled; 36 using CdmPromiseTemplate<T...>::IsPromiseSettled;
37 using CdmPromiseTemplate<T...>::MarkPromiseSettled;
38 using CdmPromiseTemplate<T...>::RejectPromiseOnDestruction;
37 39
38 CallbackType callback_; 40 CallbackType callback_;
39 }; 41 };
40 42
41 } // namespace media 43 } // namespace media
42 44
43 #endif // MEDIA_MOJO_SERVICES_MOJO_CDM_PROMISE_H_ 45 #endif // MEDIA_MOJO_SERVICES_MOJO_CDM_PROMISE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698