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

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

Issue 2080513002: Deletes mojo::Callback (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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( 58 void SetServerCertificate(mojo::Array<uint8_t> certificate_data,
59 mojo::Array<uint8_t> certificate_data, 59 const SetServerCertificateCallback& callback) final;
60 const mojo::Callback<void(mojom::CdmPromiseResultPtr)>& callback) final;
61 void CreateSessionAndGenerateRequest( 60 void CreateSessionAndGenerateRequest(
62 mojom::ContentDecryptionModule::SessionType session_type, 61 mojom::ContentDecryptionModule::SessionType session_type,
63 mojom::ContentDecryptionModule::InitDataType init_data_type, 62 mojom::ContentDecryptionModule::InitDataType init_data_type,
64 mojo::Array<uint8_t> init_data, 63 mojo::Array<uint8_t> init_data,
65 const mojo::Callback<void(mojom::CdmPromiseResultPtr, mojo::String)>& 64 const CreateSessionAndGenerateRequestCallback& callback) final;
66 callback) final;
67 void LoadSession(mojom::ContentDecryptionModule::SessionType session_type, 65 void LoadSession(mojom::ContentDecryptionModule::SessionType session_type,
68 const mojo::String& session_id, 66 const mojo::String& session_id,
69 const mojo::Callback<void(mojom::CdmPromiseResultPtr, 67 const LoadSessionCallback& callback) final;
70 mojo::String)>& callback) final; 68 void UpdateSession(const mojo::String& session_id,
71 void UpdateSession( 69 mojo::Array<uint8_t> response,
72 const mojo::String& session_id, 70 const UpdateSessionCallback& callback) final;
73 mojo::Array<uint8_t> response, 71 void CloseSession(const mojo::String& session_id,
74 const mojo::Callback<void(mojom::CdmPromiseResultPtr)>& callback) final; 72 const CloseSessionCallback& callback) final;
75 void CloseSession( 73 void RemoveSession(const mojo::String& session_id,
76 const mojo::String& session_id, 74 const RemoveSessionCallback& callback) final;
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;
81 75
82 // Get CDM to be used by the media pipeline. 76 // Get CDM to be used by the media pipeline.
83 scoped_refptr<MediaKeys> GetCdm(); 77 scoped_refptr<MediaKeys> GetCdm();
84 78
85 private: 79 private:
86 // Callback for CdmFactory::Create(). 80 // Callback for CdmFactory::Create().
87 void OnCdmCreated(const InitializeCallback& callback, 81 void OnCdmCreated(const InitializeCallback& callback,
88 const scoped_refptr<MediaKeys>& cdm, 82 const scoped_refptr<MediaKeys>& cdm,
89 const std::string& error_message); 83 const std::string& error_message);
90 84
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 121
128 base::WeakPtr<MojoCdmService> weak_this_; 122 base::WeakPtr<MojoCdmService> weak_this_;
129 base::WeakPtrFactory<MojoCdmService> weak_factory_; 123 base::WeakPtrFactory<MojoCdmService> weak_factory_;
130 124
131 DISALLOW_COPY_AND_ASSIGN(MojoCdmService); 125 DISALLOW_COPY_AND_ASSIGN(MojoCdmService);
132 }; 126 };
133 127
134 } // namespace media 128 } // namespace media
135 129
136 #endif // MEDIA_MOJO_SERVICES_MOJO_CDM_SERVICE_H_ 130 #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