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

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

Issue 1375663003: Verify EME calls made on same thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 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
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_
OLDNEW
« no previous file with comments | « media/base/cdm_promise_adapter.cc ('k') | media/blink/webcontentdecryptionmodulesession_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698