| OLD | NEW |
| 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 MEDIA_BLINK_WEBCONTENTDECRYPTIONMODULESESSION_IMPL_H_ | 5 #ifndef MEDIA_BLINK_WEBCONTENTDECRYPTIONMODULESESSION_IMPL_H_ |
| 6 #define MEDIA_BLINK_WEBCONTENTDECRYPTIONMODULESESSION_IMPL_H_ | 6 #define MEDIA_BLINK_WEBCONTENTDECRYPTIONMODULESESSION_IMPL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 // Keep track of whether the session has been closed or not. The session | 77 // Keep track of whether the session has been closed or not. The session |
| 78 // may be closed as a result of an application calling close(), or the CDM | 78 // may be closed as a result of an application calling close(), or the CDM |
| 79 // may close the session at any point. | 79 // may close the session at any point. |
| 80 // https://w3c.github.io/encrypted-media/#session-closed | 80 // https://w3c.github.io/encrypted-media/#session-closed |
| 81 // |has_close_been_called_| is used to keep track of whether close() has | 81 // |has_close_been_called_| is used to keep track of whether close() has |
| 82 // been called or not. |is_closed_| is used to keep track of whether the | 82 // been called or not. |is_closed_| is used to keep track of whether the |
| 83 // close event has been received or not. | 83 // close event has been received or not. |
| 84 bool has_close_been_called_; | 84 bool has_close_been_called_; |
| 85 bool is_closed_; | 85 bool is_closed_; |
| 86 | 86 |
| 87 // Keep track of whether this is a persistent session or not. |
| 88 bool is_persistent_session_; |
| 89 |
| 87 base::ThreadChecker thread_checker_; | 90 base::ThreadChecker thread_checker_; |
| 88 // Since promises will live until they are fired, use a weak reference when | 91 // Since promises will live until they are fired, use a weak reference when |
| 89 // creating a promise in case this class disappears before the promise | 92 // creating a promise in case this class disappears before the promise |
| 90 // actually fires. | 93 // actually fires. |
| 91 base::WeakPtrFactory<WebContentDecryptionModuleSessionImpl> weak_ptr_factory_; | 94 base::WeakPtrFactory<WebContentDecryptionModuleSessionImpl> weak_ptr_factory_; |
| 92 | 95 |
| 93 DISALLOW_COPY_AND_ASSIGN(WebContentDecryptionModuleSessionImpl); | 96 DISALLOW_COPY_AND_ASSIGN(WebContentDecryptionModuleSessionImpl); |
| 94 }; | 97 }; |
| 95 | 98 |
| 96 } // namespace media | 99 } // namespace media |
| 97 | 100 |
| 98 #endif // MEDIA_BLINK_WEBCONTENTDECRYPTIONMODULESESSION_IMPL_H_ | 101 #endif // MEDIA_BLINK_WEBCONTENTDECRYPTIONMODULESESSION_IMPL_H_ |
| OLD | NEW |