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

Side by Side Diff: media/blink/webcontentdecryptionmodulesession_impl.h

Issue 2484873002: EME: Make sure sessions are closed before they are destroyed (Closed)
Patch Set: update spec comment Created 4 years, 1 month 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 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 Client* client_; 71 Client* client_;
72 72
73 // Session ID is the app visible ID for this session generated by the CDM. 73 // Session ID is the app visible ID for this session generated by the CDM.
74 // This value is not set until the CDM resolves the initializeNewSession() 74 // This value is not set until the CDM resolves the initializeNewSession()
75 // promise. 75 // promise.
76 std::string session_id_; 76 std::string session_id_;
77 77
78 // Don't pass more than 1 close() event to blink:: 78 // Don't pass more than 1 close() event to blink::
79 // TODO(jrummell): Remove this once blink tests handle close() promise and 79 // TODO(jrummell): Remove this once blink tests handle close() promise and
80 // closed() event. 80 // closed() event.
81 bool is_closed_; 81 bool is_closed_;
xhwang 2016/11/11 18:52:46 It seems possible that is_closed_ is true but has_
jrummell 2016/11/11 21:14:23 Done.
82 82
83 // Keep track of whether close() has been called on this session.
84 bool has_close_been_called_;
85
83 base::ThreadChecker thread_checker_; 86 base::ThreadChecker thread_checker_;
84 // Since promises will live until they are fired, use a weak reference when 87 // Since promises will live until they are fired, use a weak reference when
85 // creating a promise in case this class disappears before the promise 88 // creating a promise in case this class disappears before the promise
86 // actually fires. 89 // actually fires.
87 base::WeakPtrFactory<WebContentDecryptionModuleSessionImpl> weak_ptr_factory_; 90 base::WeakPtrFactory<WebContentDecryptionModuleSessionImpl> weak_ptr_factory_;
88 91
89 DISALLOW_COPY_AND_ASSIGN(WebContentDecryptionModuleSessionImpl); 92 DISALLOW_COPY_AND_ASSIGN(WebContentDecryptionModuleSessionImpl);
90 }; 93 };
91 94
92 } // namespace media 95 } // namespace media
93 96
94 #endif // MEDIA_BLINK_WEBCONTENTDECRYPTIONMODULESESSION_IMPL_H_ 97 #endif // MEDIA_BLINK_WEBCONTENTDECRYPTIONMODULESESSION_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698