BookmarkManager: Fix 'new folder text field size changes on clicking it' issue.
[chromium-blink-merge.git] / media / base / browser_cdm_factory.h
blob2ccf1b4108a439da9d9e7aaaf78284d0b1f9fff8
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
3 // found in the LICENSE file.
5 #ifndef MEDIA_BASE_BROWSER_CDM_FACTORY_H_
6 #define MEDIA_BASE_BROWSER_CDM_FACTORY_H_
8 #include <string>
10 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "media/base/browser_cdm.h"
13 #include "media/base/media_export.h"
15 namespace media {
17 class MEDIA_EXPORT BrowserCdmFactory {
18 public:
19 BrowserCdmFactory() {}
20 virtual ~BrowserCdmFactory() {}
22 virtual scoped_ptr<BrowserCdm> CreateBrowserCdm(
23 const std::string& key_system,
24 bool use_hw_secure_codecs,
25 const SessionMessageCB& session_message_cb,
26 const SessionClosedCB& session_closed_cb,
27 const LegacySessionErrorCB& legacy_session_error_cb,
28 const SessionKeysChangeCB& session_keys_change_cb,
29 const SessionExpirationUpdateCB& session_expiration_update_cb) = 0;
31 private:
32 DISALLOW_COPY_AND_ASSIGN(BrowserCdmFactory);
35 // Provides a factory for creating BrowserCdm instances. There is only one
36 // BrowserCdmFactory per process.
37 void SetBrowserCdmFactory(BrowserCdmFactory* factory);
39 // Creates a BrowserCdm for |key_system|. Returns NULL if the CDM cannot be
40 // created.
41 // |use_hw_secure_codecs| indicates that the CDM should be configured to use
42 // hardware-secure codecs (for platforms that support it).
43 // TODO(xhwang): Add ifdef for IPC based CDM.
44 scoped_ptr<BrowserCdm> MEDIA_EXPORT
45 CreateBrowserCdm(const std::string& key_system,
46 bool use_hw_secure_codecs,
47 const SessionMessageCB& session_message_cb,
48 const SessionClosedCB& session_closed_cb,
49 const LegacySessionErrorCB& legacy_session_error_cb,
50 const SessionKeysChangeCB& session_keys_change_cb,
51 const SessionExpirationUpdateCB& session_expiration_update_cb);
53 } // namespace media
55 #endif // MEDIA_BASE_BROWSER_CDM_FACTORY_H_