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

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

Issue 1200323003: media: Quit MojoMediaApplication when no service is bound. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 const mojo::String& session_id, 54 const mojo::String& session_id,
55 const mojo::Callback<void(mojo::CdmPromiseResultPtr)>& callback) final; 55 const mojo::Callback<void(mojo::CdmPromiseResultPtr)>& callback) final;
56 void RemoveSession( 56 void RemoveSession(
57 const mojo::String& session_id, 57 const mojo::String& session_id,
58 const mojo::Callback<void(mojo::CdmPromiseResultPtr)>& callback) final; 58 const mojo::Callback<void(mojo::CdmPromiseResultPtr)>& callback) final;
59 void GetDecryptor(mojo::InterfaceRequest<mojo::Decryptor> decryptor) final; 59 void GetDecryptor(mojo::InterfaceRequest<mojo::Decryptor> decryptor) final;
60 60
61 // Get CdmContext to be used by the media pipeline. 61 // Get CdmContext to be used by the media pipeline.
62 CdmContext* GetCdmContext(); 62 CdmContext* GetCdmContext();
63 63
64 void set_connection_error_handler(const base::Closure& error_handler);
65
64 private: 66 private:
65 // Callbacks for firing session events. 67 // Callbacks for firing session events.
66 void OnSessionMessage(const std::string& session_id, 68 void OnSessionMessage(const std::string& session_id,
67 MediaKeys::MessageType message_type, 69 MediaKeys::MessageType message_type,
68 const std::vector<uint8_t>& message, 70 const std::vector<uint8_t>& message,
69 const GURL& legacy_destination_url); 71 const GURL& legacy_destination_url);
70 void OnSessionKeysChange(const std::string& session_id, 72 void OnSessionKeysChange(const std::string& session_id,
71 bool has_additional_usable_key, 73 bool has_additional_usable_key,
72 CdmKeysInfo keys_info); 74 CdmKeysInfo keys_info);
73 void OnSessionExpirationUpdate(const std::string& session_id, 75 void OnSessionExpirationUpdate(const std::string& session_id,
(...skipping 16 matching lines...) Expand all
90 92
91 base::WeakPtr<MojoCdmService> weak_this_; 93 base::WeakPtr<MojoCdmService> weak_this_;
92 base::WeakPtrFactory<MojoCdmService> weak_factory_; 94 base::WeakPtrFactory<MojoCdmService> weak_factory_;
93 95
94 DISALLOW_COPY_AND_ASSIGN(MojoCdmService); 96 DISALLOW_COPY_AND_ASSIGN(MojoCdmService);
95 }; 97 };
96 98
97 } // namespace media 99 } // namespace media
98 100
99 #endif // MEDIA_MOJO_SERVICES_MOJO_CDM_SERVICE_H_ 101 #endif // MEDIA_MOJO_SERVICES_MOJO_CDM_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698