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

Side by Side Diff: chromecast/browser/media/cast_browser_cdm_factory.h

Issue 1814263002: [chromecast] Start deprecating MediaMessageLoop. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 4 years, 9 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 CHROMECAST_BROWSER_MEDIA_CAST_BROWSER_CDM_FACTORY_H_ 5 #ifndef CHROMECAST_BROWSER_MEDIA_CAST_BROWSER_CDM_FACTORY_H_
6 #define CHROMECAST_BROWSER_MEDIA_CAST_BROWSER_CDM_FACTORY_H_ 6 #define CHROMECAST_BROWSER_MEDIA_CAST_BROWSER_CDM_FACTORY_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/single_thread_task_runner.h"
9 #include "chromecast/media/base/key_systems_common.h" 10 #include "chromecast/media/base/key_systems_common.h"
10 #include "media/base/cdm_factory.h" 11 #include "media/base/cdm_factory.h"
11 #include "media/base/media_keys.h" 12 #include "media/base/media_keys.h"
12 13
14 namespace base {
15 class SingleThreadTaskRunner;
halliwell 2016/03/18 18:31:42 nit, don't need to both forward-declare and includ
alokp 2016/03/18 18:47:35 oops
16 } // namespace base
17
13 namespace chromecast { 18 namespace chromecast {
14 namespace media { 19 namespace media {
15 20
16 class BrowserCdmCast; 21 class BrowserCdmCast;
17 22
18 class CastBrowserCdmFactory : public ::media::CdmFactory { 23 class CastBrowserCdmFactory : public ::media::CdmFactory {
19 public: 24 public:
20 CastBrowserCdmFactory() {} 25 // CDM factory will use |task_runner| to initialize the CDM.
21 ~CastBrowserCdmFactory() override {}; 26 CastBrowserCdmFactory(
halliwell 2016/03/18 18:31:42 nit: explicit
alokp 2016/03/18 18:47:35 Done.
27 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner);
28 ~CastBrowserCdmFactory() override;
22 29
23 // ::media::CdmFactory implementation: 30 // ::media::CdmFactory implementation:
24 void Create( 31 void Create(
25 const std::string& key_system, 32 const std::string& key_system,
26 const GURL& security_origin, 33 const GURL& security_origin,
27 const ::media::CdmConfig& cdm_config, 34 const ::media::CdmConfig& cdm_config,
28 const ::media::SessionMessageCB& session_message_cb, 35 const ::media::SessionMessageCB& session_message_cb,
29 const ::media::SessionClosedCB& session_closed_cb, 36 const ::media::SessionClosedCB& session_closed_cb,
30 const ::media::LegacySessionErrorCB& legacy_session_error_cb, 37 const ::media::LegacySessionErrorCB& legacy_session_error_cb,
31 const ::media::SessionKeysChangeCB& session_keys_change_cb, 38 const ::media::SessionKeysChangeCB& session_keys_change_cb,
32 const ::media::SessionExpirationUpdateCB& session_expiration_update_cb, 39 const ::media::SessionExpirationUpdateCB& session_expiration_update_cb,
33 const ::media::CdmCreatedCB& cdm_created_cb) override; 40 const ::media::CdmCreatedCB& cdm_created_cb) override;
34 41
35 // Provides a platform-specific BrowserCdm instance. 42 // Provides a platform-specific BrowserCdm instance.
36 virtual scoped_refptr<BrowserCdmCast> CreatePlatformBrowserCdm( 43 virtual scoped_refptr<BrowserCdmCast> CreatePlatformBrowserCdm(
37 const CastKeySystem& cast_key_system); 44 const CastKeySystem& cast_key_system);
38 45
39 private: 46 private:
47 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
40 DISALLOW_COPY_AND_ASSIGN(CastBrowserCdmFactory); 48 DISALLOW_COPY_AND_ASSIGN(CastBrowserCdmFactory);
41 }; 49 };
42 50
43 } // namespace media 51 } // namespace media
44 } // namespace chromecast 52 } // namespace chromecast
45 53
46 #endif // CHROMECAST_BROWSER_MEDIA_CAST_BROWSER_CDM_FACTORY_H_ 54 #endif // CHROMECAST_BROWSER_MEDIA_CAST_BROWSER_CDM_FACTORY_H_
OLDNEW
« no previous file with comments | « chromecast/browser/cast_content_browser_client.cc ('k') | chromecast/browser/media/cast_browser_cdm_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698