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

Side by Side Diff: media/mojo/services/mojo_cdm_service.h

Issue 833963003: Pass key_information on SessionKeysChange message (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_MOJO_SERVICES_MOJO_CDM_SERVICE_H_ 5 #ifndef MEDIA_MOJO_SERVICES_MOJO_CDM_SERVICE_H_
6 #define MEDIA_MOJO_SERVICES_MOJO_CDM_SERVICE_H_ 6 #define MEDIA_MOJO_SERVICES_MOJO_CDM_SERVICE_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 const mojo::Callback<void(mojo::CdmPromiseResultPtr)>& callback) final; 46 const mojo::Callback<void(mojo::CdmPromiseResultPtr)>& callback) final;
47 void GetCdmContext(int32_t cdm_id, 47 void GetCdmContext(int32_t cdm_id,
48 mojo::InterfaceRequest<mojo::Decryptor> decryptor) final; 48 mojo::InterfaceRequest<mojo::Decryptor> decryptor) final;
49 49
50 private: 50 private:
51 // Callbacks for firing session events. 51 // Callbacks for firing session events.
52 void OnSessionMessage(const std::string& session_id, 52 void OnSessionMessage(const std::string& session_id,
53 const std::vector<uint8_t>& message, 53 const std::vector<uint8_t>& message,
54 const GURL& destination_url); 54 const GURL& destination_url);
55 void OnSessionKeysChange(const std::string& session_id, 55 void OnSessionKeysChange(const std::string& session_id,
56 bool has_additional_usable_key); 56 bool has_additional_usable_key,
57 CdmKeysInfo keys_info);
57 void OnSessionExpirationUpdate(const std::string& session_id, 58 void OnSessionExpirationUpdate(const std::string& session_id,
58 const base::Time& new_expiry_time); 59 const base::Time& new_expiry_time);
59 void OnSessionClosed(const std::string& session_id); 60 void OnSessionClosed(const std::string& session_id);
60 void OnSessionError(const std::string& session_id, 61 void OnSessionError(const std::string& session_id,
61 MediaKeys::Exception exception, 62 MediaKeys::Exception exception,
62 uint32_t system_code, 63 uint32_t system_code,
63 const std::string& error_message); 64 const std::string& error_message);
64 65
65 scoped_ptr<MediaKeys> cdm_; 66 scoped_ptr<MediaKeys> cdm_;
66 67
67 base::WeakPtrFactory<MojoCdmService> weak_factory_; 68 base::WeakPtrFactory<MojoCdmService> weak_factory_;
68 base::WeakPtr<MojoCdmService> weak_this_; 69 base::WeakPtr<MojoCdmService> weak_this_;
69 70
70 DISALLOW_COPY_AND_ASSIGN(MojoCdmService); 71 DISALLOW_COPY_AND_ASSIGN(MojoCdmService);
71 }; 72 };
72 73
73 } // namespace media 74 } // namespace media
74 75
75 #endif // MEDIA_MOJO_SERVICES_MOJO_CDM_SERVICE_H_ 76 #endif // MEDIA_MOJO_SERVICES_MOJO_CDM_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698