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

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

Issue 2080083002: Revert of Deletes mojo::Callback (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « media/mojo/services/mojo_cdm_promise.h ('k') | media/mojo/services/mojo_cdm_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 mojo::InterfaceRequest<mojom::ContentDecryptionModule> request); 48 mojo::InterfaceRequest<mojom::ContentDecryptionModule> request);
49 49
50 ~MojoCdmService() final; 50 ~MojoCdmService() final;
51 51
52 // mojom::ContentDecryptionModule implementation. 52 // mojom::ContentDecryptionModule implementation.
53 void SetClient(mojom::ContentDecryptionModuleClientPtr client) final; 53 void SetClient(mojom::ContentDecryptionModuleClientPtr client) final;
54 void Initialize(const mojo::String& key_system, 54 void Initialize(const mojo::String& key_system,
55 const mojo::String& security_origin, 55 const mojo::String& security_origin,
56 mojom::CdmConfigPtr cdm_config, 56 mojom::CdmConfigPtr cdm_config,
57 const InitializeCallback& callback) final; 57 const InitializeCallback& callback) final;
58 void SetServerCertificate(mojo::Array<uint8_t> certificate_data, 58 void SetServerCertificate(
59 const SetServerCertificateCallback& callback) final; 59 mojo::Array<uint8_t> certificate_data,
60 const mojo::Callback<void(mojom::CdmPromiseResultPtr)>& callback) final;
60 void CreateSessionAndGenerateRequest( 61 void CreateSessionAndGenerateRequest(
61 mojom::ContentDecryptionModule::SessionType session_type, 62 mojom::ContentDecryptionModule::SessionType session_type,
62 mojom::ContentDecryptionModule::InitDataType init_data_type, 63 mojom::ContentDecryptionModule::InitDataType init_data_type,
63 mojo::Array<uint8_t> init_data, 64 mojo::Array<uint8_t> init_data,
64 const CreateSessionAndGenerateRequestCallback& callback) final; 65 const mojo::Callback<void(mojom::CdmPromiseResultPtr, mojo::String)>&
66 callback) final;
65 void LoadSession(mojom::ContentDecryptionModule::SessionType session_type, 67 void LoadSession(mojom::ContentDecryptionModule::SessionType session_type,
66 const mojo::String& session_id, 68 const mojo::String& session_id,
67 const LoadSessionCallback& callback) final; 69 const mojo::Callback<void(mojom::CdmPromiseResultPtr,
68 void UpdateSession(const mojo::String& session_id, 70 mojo::String)>& callback) final;
69 mojo::Array<uint8_t> response, 71 void UpdateSession(
70 const UpdateSessionCallback& callback) final; 72 const mojo::String& session_id,
71 void CloseSession(const mojo::String& session_id, 73 mojo::Array<uint8_t> response,
72 const CloseSessionCallback& callback) final; 74 const mojo::Callback<void(mojom::CdmPromiseResultPtr)>& callback) final;
73 void RemoveSession(const mojo::String& session_id, 75 void CloseSession(
74 const RemoveSessionCallback& callback) final; 76 const mojo::String& session_id,
77 const mojo::Callback<void(mojom::CdmPromiseResultPtr)>& callback) final;
78 void RemoveSession(
79 const mojo::String& session_id,
80 const mojo::Callback<void(mojom::CdmPromiseResultPtr)>& callback) final;
75 81
76 // Get CDM to be used by the media pipeline. 82 // Get CDM to be used by the media pipeline.
77 scoped_refptr<MediaKeys> GetCdm(); 83 scoped_refptr<MediaKeys> GetCdm();
78 84
79 private: 85 private:
80 // Callback for CdmFactory::Create(). 86 // Callback for CdmFactory::Create().
81 void OnCdmCreated(const InitializeCallback& callback, 87 void OnCdmCreated(const InitializeCallback& callback,
82 const scoped_refptr<MediaKeys>& cdm, 88 const scoped_refptr<MediaKeys>& cdm,
83 const std::string& error_message); 89 const std::string& error_message);
84 90
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 127
122 base::WeakPtr<MojoCdmService> weak_this_; 128 base::WeakPtr<MojoCdmService> weak_this_;
123 base::WeakPtrFactory<MojoCdmService> weak_factory_; 129 base::WeakPtrFactory<MojoCdmService> weak_factory_;
124 130
125 DISALLOW_COPY_AND_ASSIGN(MojoCdmService); 131 DISALLOW_COPY_AND_ASSIGN(MojoCdmService);
126 }; 132 };
127 133
128 } // namespace media 134 } // namespace media
129 135
130 #endif // MEDIA_MOJO_SERVICES_MOJO_CDM_SERVICE_H_ 136 #endif // MEDIA_MOJO_SERVICES_MOJO_CDM_SERVICE_H_
OLDNEW
« no previous file with comments | « media/mojo/services/mojo_cdm_promise.h ('k') | media/mojo/services/mojo_cdm_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698