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

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

Issue 2815303006: Convert MediaLog from being ref counted to owned by WebMediaPlayer. (Closed)
Patch Set: Rebase. Created 3 years, 8 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_BLINK_WEBENCRYPTEDMEDIACLIENT_IMPL_H_ 5 #ifndef MEDIA_BLINK_WEBENCRYPTEDMEDIACLIENT_IMPL_H_
6 #define MEDIA_BLINK_WEBENCRYPTEDMEDIACLIENT_IMPL_H_ 6 #define MEDIA_BLINK_WEBENCRYPTEDMEDIACLIENT_IMPL_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <unordered_map> 10 #include <unordered_map>
(...skipping 20 matching lines...) Expand all
31 class MediaLog; 31 class MediaLog;
32 class MediaPermission; 32 class MediaPermission;
33 33
34 class MEDIA_BLINK_EXPORT WebEncryptedMediaClientImpl 34 class MEDIA_BLINK_EXPORT WebEncryptedMediaClientImpl
35 : public blink::WebEncryptedMediaClient { 35 : public blink::WebEncryptedMediaClient {
36 public: 36 public:
37 WebEncryptedMediaClientImpl( 37 WebEncryptedMediaClientImpl(
38 base::Callback<bool(void)> are_secure_codecs_supported_cb, 38 base::Callback<bool(void)> are_secure_codecs_supported_cb,
39 CdmFactory* cdm_factory, 39 CdmFactory* cdm_factory,
40 MediaPermission* media_permission, 40 MediaPermission* media_permission,
41 const scoped_refptr<MediaLog>& media_log); 41 MediaLog* media_log);
42 ~WebEncryptedMediaClientImpl() override; 42 ~WebEncryptedMediaClientImpl() override;
43 43
44 // WebEncryptedMediaClient implementation. 44 // WebEncryptedMediaClient implementation.
45 void RequestMediaKeySystemAccess( 45 void RequestMediaKeySystemAccess(
46 blink::WebEncryptedMediaRequest request) override; 46 blink::WebEncryptedMediaRequest request) override;
47 47
48 // Create the CDM for |key_system| and |security_origin|. The caller owns 48 // Create the CDM for |key_system| and |security_origin|. The caller owns
49 // the created cdm (passed back using |result|). 49 // the created cdm (passed back using |result|).
50 void CreateCdm( 50 void CreateCdm(
51 const blink::WebString& key_system, 51 const blink::WebString& key_system,
(...skipping 22 matching lines...) Expand all
74 // Gets the Reporter for |key_system|. If it doesn't already exist, 74 // Gets the Reporter for |key_system|. If it doesn't already exist,
75 // create one. 75 // create one.
76 Reporter* GetReporter(const blink::WebString& key_system); 76 Reporter* GetReporter(const blink::WebString& key_system);
77 77
78 // Reporter singletons. 78 // Reporter singletons.
79 std::unordered_map<std::string, std::unique_ptr<Reporter>> reporters_; 79 std::unordered_map<std::string, std::unique_ptr<Reporter>> reporters_;
80 80
81 base::Callback<bool(void)> are_secure_codecs_supported_cb_; 81 base::Callback<bool(void)> are_secure_codecs_supported_cb_;
82 CdmFactory* cdm_factory_; 82 CdmFactory* cdm_factory_;
83 KeySystemConfigSelector key_system_config_selector_; 83 KeySystemConfigSelector key_system_config_selector_;
84 scoped_refptr<MediaLog> media_log_; 84 MediaLog* media_log_;
85 base::WeakPtrFactory<WebEncryptedMediaClientImpl> weak_factory_; 85 base::WeakPtrFactory<WebEncryptedMediaClientImpl> weak_factory_;
86 }; 86 };
87 87
88 } // namespace media 88 } // namespace media
89 89
90 #endif // MEDIA_BLINK_WEBENCRYPTEDMEDIACLIENT_IMPL_H_ 90 #endif // MEDIA_BLINK_WEBENCRYPTEDMEDIACLIENT_IMPL_H_
OLDNEW
« no previous file with comments | « media/blink/webaudiosourceprovider_impl_unittest.cc ('k') | media/blink/webencryptedmediaclient_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698