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 <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/callback.h" | 12 #include "base/callback.h" |
13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
| 15 #include "base/threading/thread_checker.h" |
15 #include "media/base/media_keys.h" | 16 #include "media/base/media_keys.h" |
16 #include "third_party/WebKit/public/platform/WebContentDecryptionModuleSession.h
" | 17 #include "third_party/WebKit/public/platform/WebContentDecryptionModuleSession.h
" |
17 #include "third_party/WebKit/public/platform/WebString.h" | 18 #include "third_party/WebKit/public/platform/WebString.h" |
18 | 19 |
19 namespace media { | 20 namespace media { |
20 | 21 |
21 class CdmSessionAdapter; | 22 class CdmSessionAdapter; |
22 class MediaKeys; | 23 class MediaKeys; |
23 | 24 |
24 class WebContentDecryptionModuleSessionImpl | 25 class WebContentDecryptionModuleSessionImpl |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 // Session ID is the app visible ID for this session generated by the CDM. | 68 // Session ID is the app visible ID for this session generated by the CDM. |
68 // This value is not set until the CDM resolves the initializeNewSession() | 69 // This value is not set until the CDM resolves the initializeNewSession() |
69 // promise. | 70 // promise. |
70 std::string session_id_; | 71 std::string session_id_; |
71 | 72 |
72 // Don't pass more than 1 close() event to blink:: | 73 // Don't pass more than 1 close() event to blink:: |
73 // TODO(jrummell): Remove this once blink tests handle close() promise and | 74 // TODO(jrummell): Remove this once blink tests handle close() promise and |
74 // closed() event. | 75 // closed() event. |
75 bool is_closed_; | 76 bool is_closed_; |
76 | 77 |
| 78 base::ThreadChecker thread_checker_; |
77 // Since promises will live until they are fired, use a weak reference when | 79 // Since promises will live until they are fired, use a weak reference when |
78 // creating a promise in case this class disappears before the promise | 80 // creating a promise in case this class disappears before the promise |
79 // actually fires. | 81 // actually fires. |
80 base::WeakPtrFactory<WebContentDecryptionModuleSessionImpl> weak_ptr_factory_; | 82 base::WeakPtrFactory<WebContentDecryptionModuleSessionImpl> weak_ptr_factory_; |
81 | 83 |
82 DISALLOW_COPY_AND_ASSIGN(WebContentDecryptionModuleSessionImpl); | 84 DISALLOW_COPY_AND_ASSIGN(WebContentDecryptionModuleSessionImpl); |
83 }; | 85 }; |
84 | 86 |
85 } // namespace media | 87 } // namespace media |
86 | 88 |
87 #endif // MEDIA_BLINK_WEBCONTENTDECRYPTIONMODULESESSION_IMPL_H_ | 89 #endif // MEDIA_BLINK_WEBCONTENTDECRYPTIONMODULESESSION_IMPL_H_ |
OLD | NEW |