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

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

Issue 855773002: Pass keyschange event to blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase for blink changes Created 5 years, 11 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
(...skipping 13 matching lines...) Expand all
24 class WebContentDecryptionModuleSessionImpl 24 class WebContentDecryptionModuleSessionImpl
25 : public blink::WebContentDecryptionModuleSession { 25 : public blink::WebContentDecryptionModuleSession {
26 public: 26 public:
27 WebContentDecryptionModuleSessionImpl( 27 WebContentDecryptionModuleSessionImpl(
28 const scoped_refptr<CdmSessionAdapter>& adapter); 28 const scoped_refptr<CdmSessionAdapter>& adapter);
29 virtual ~WebContentDecryptionModuleSessionImpl(); 29 virtual ~WebContentDecryptionModuleSessionImpl();
30 30
31 // blink::WebContentDecryptionModuleSession implementation. 31 // blink::WebContentDecryptionModuleSession implementation.
32 virtual void setClientInterface(Client* client); 32 virtual void setClientInterface(Client* client);
33 virtual blink::WebString sessionId() const; 33 virtual blink::WebString sessionId() const;
34
34 // TODO(jrummell): Remove the next 3 methods once blink updated. 35 // TODO(jrummell): Remove the next 3 methods once blink updated.
35 virtual void initializeNewSession(const blink::WebString& mime_type, 36 virtual void initializeNewSession(const blink::WebString& mime_type,
36 const uint8* init_data, 37 const uint8* init_data,
37 size_t init_data_length); 38 size_t init_data_length);
38 virtual void update(const uint8* response, size_t response_length); 39 virtual void update(const uint8* response, size_t response_length);
39 virtual void release(); 40 virtual void release();
40 virtual void initializeNewSession( 41 virtual void initializeNewSession(
41 const blink::WebString& init_data_type, 42 const blink::WebString& init_data_type,
42 const uint8* init_data, 43 const uint8* init_data,
43 size_t init_data_length, 44 size_t init_data_length,
44 const blink::WebString& session_type, 45 const blink::WebString& session_type,
45 blink::WebContentDecryptionModuleResult result); 46 blink::WebContentDecryptionModuleResult result);
46 virtual void load(const blink::WebString& session_id, 47 virtual void load(const blink::WebString& session_id,
47 blink::WebContentDecryptionModuleResult result); 48 blink::WebContentDecryptionModuleResult result);
48 virtual void update(const uint8* response, 49 virtual void update(const uint8* response,
49 size_t response_length, 50 size_t response_length,
50 blink::WebContentDecryptionModuleResult result); 51 blink::WebContentDecryptionModuleResult result);
51 virtual void close(blink::WebContentDecryptionModuleResult result); 52 virtual void close(blink::WebContentDecryptionModuleResult result);
52 virtual void remove(blink::WebContentDecryptionModuleResult result); 53 virtual void remove(blink::WebContentDecryptionModuleResult result);
53 54
54 // TODO(jrummell): Remove the next method once blink updated. 55 // TODO(jrummell): Remove the next method once blink updated.
55 virtual void release(blink::WebContentDecryptionModuleResult result); 56 virtual void release(blink::WebContentDecryptionModuleResult result);
56 57
57 // Callbacks. 58 // Callbacks.
58 void OnSessionMessage(MediaKeys::MessageType message_type, 59 void OnSessionMessage(MediaKeys::MessageType message_type,
59 const std::vector<uint8>& message); 60 const std::vector<uint8>& message);
60 void OnSessionKeysChange(bool has_additional_usable_key); 61 void OnSessionKeysChange(bool has_additional_usable_key,
62 CdmKeysInfo keys_info);
61 void OnSessionExpirationUpdate(const base::Time& new_expiry_time); 63 void OnSessionExpirationUpdate(const base::Time& new_expiry_time);
62 void OnSessionClosed(); 64 void OnSessionClosed();
63 65
64 private: 66 private:
65 // Called when a new session is created. 67 // Called when a new session is created.
66 blink::WebContentDecryptionModuleResult::SessionStatus OnSessionInitialized( 68 blink::WebContentDecryptionModuleResult::SessionStatus OnSessionInitialized(
67 const std::string& web_session_id); 69 const std::string& web_session_id);
68 70
69 scoped_refptr<CdmSessionAdapter> adapter_; 71 scoped_refptr<CdmSessionAdapter> adapter_;
70 72
(...skipping 14 matching lines...) Expand all
85 // creating a promise in case this class disappears before the promise 87 // creating a promise in case this class disappears before the promise
86 // actually fires. 88 // actually fires.
87 base::WeakPtrFactory<WebContentDecryptionModuleSessionImpl> weak_ptr_factory_; 89 base::WeakPtrFactory<WebContentDecryptionModuleSessionImpl> weak_ptr_factory_;
88 90
89 DISALLOW_COPY_AND_ASSIGN(WebContentDecryptionModuleSessionImpl); 91 DISALLOW_COPY_AND_ASSIGN(WebContentDecryptionModuleSessionImpl);
90 }; 92 };
91 93
92 } // namespace media 94 } // namespace media
93 95
94 #endif // MEDIA_BLINK_WEBCONTENTDECRYPTIONMODULESESSION_IMPL_H_ 96 #endif // MEDIA_BLINK_WEBCONTENTDECRYPTIONMODULESESSION_IMPL_H_
OLDNEW
« no previous file with comments | « media/blink/cdm_session_adapter.cc ('k') | media/blink/webcontentdecryptionmodulesession_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698