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
14 #include "base/callback.h"
19 class ContentDecryptorDelegate;
21 // PepperCdmWrapper provides access to the Pepper CDM instance.
22 class PepperCdmWrapper {
24 virtual ~PepperCdmWrapper() {}
26 // Returns the ContentDecryptorDelegate* associated with this plugin.
27 virtual ContentDecryptorDelegate* GetCdmDelegate() = 0;
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_