Roll ANGLE bc75f36:ef9d63e
[chromium-blink-merge.git] / content / renderer / media / crypto / pepper_cdm_wrapper.h
blob13ec9e989df9170454c3e583d224a3b5b77dad43
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 CONTENT_RENDERER_MEDIA_CRYPTO_PEPPER_CDM_WRAPPER_H_
6 #define CONTENT_RENDERER_MEDIA_CRYPTO_PEPPER_CDM_WRAPPER_H_
8 #if !defined(ENABLE_PEPPER_CDMS)
9 #error This file should only be included when ENABLE_PEPPER_CDMS is defined
10 #endif
12 #include <string>
14 #include "base/callback.h"
16 class GURL;
18 namespace content {
19 class ContentDecryptorDelegate;
21 // PepperCdmWrapper provides access to the Pepper CDM instance.
22 class PepperCdmWrapper {
23 public:
24 virtual ~PepperCdmWrapper() {}
26 // Returns the ContentDecryptorDelegate* associated with this plugin.
27 virtual ContentDecryptorDelegate* GetCdmDelegate() = 0;
29 protected:
30 PepperCdmWrapper() {}
32 private:
33 DISALLOW_COPY_AND_ASSIGN(PepperCdmWrapper);
36 // Callback used to create a PepperCdmWrapper. This may return null if the
37 // Pepper CDM can not be created.
38 typedef base::Callback<scoped_ptr<PepperCdmWrapper>(
39 const std::string& pluginType,
40 const GURL& security_origin)> CreatePepperCdmCB;
42 } // namespace content
44 #endif // CONTENT_RENDERER_MEDIA_CRYPTO_PEPPER_CDM_WRAPPER_H_