OLD | NEW |
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_BASE_CDM_PROMISE_H_ | 5 #ifndef MEDIA_BASE_CDM_PROMISE_H_ |
6 #define MEDIA_BASE_CDM_PROMISE_H_ | 6 #define MEDIA_BASE_CDM_PROMISE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 // TODO(xhwang): Remove this include after http://crbug.com/656706 is fixed. |
| 15 #include "media/base/content_decryption_module.h" |
14 #include "media/base/media_export.h" | 16 #include "media/base/media_export.h" |
15 #include "media/base/media_keys.h" | |
16 | 17 |
17 namespace media { | 18 namespace media { |
18 | 19 |
19 // Interface for promises being resolved/rejected in response to various | 20 // Interface for promises being resolved/rejected in response to various |
20 // session actions. These may be called synchronously or asynchronously. | 21 // session actions. These may be called synchronously or asynchronously. |
21 // The promise must be resolved or rejected exactly once. It is expected that | 22 // The promise must be resolved or rejected exactly once. It is expected that |
22 // the caller free the promise once it is resolved/rejected. | 23 // the caller free the promise once it is resolved/rejected. |
23 | 24 |
24 // These classes are almost generic, except for the parameters to reject(). If | 25 // These classes are almost generic, except for the parameters to reject(). If |
25 // a generic class for promises is available, this could be changed to use the | 26 // a generic class for promises is available, this could be changed to use the |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 private: | 137 private: |
137 // Keep track of whether the promise has been resolved or rejected yet. | 138 // Keep track of whether the promise has been resolved or rejected yet. |
138 bool is_settled_; | 139 bool is_settled_; |
139 | 140 |
140 DISALLOW_COPY_AND_ASSIGN(CdmPromiseTemplate); | 141 DISALLOW_COPY_AND_ASSIGN(CdmPromiseTemplate); |
141 }; | 142 }; |
142 | 143 |
143 } // namespace media | 144 } // namespace media |
144 | 145 |
145 #endif // MEDIA_BASE_CDM_PROMISE_H_ | 146 #endif // MEDIA_BASE_CDM_PROMISE_H_ |
OLD | NEW |