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"
17 class ContentDecryptorDelegate;
19 // PepperCdmWrapper provides access to the Pepper CDM instance.
20 class PepperCdmWrapper {
22 virtual ~PepperCdmWrapper() {}
24 // Returns the ContentDecryptorDelegate* associated with this plugin.
25 virtual ContentDecryptorDelegate* GetCdmDelegate() = 0;
31 DISALLOW_COPY_AND_ASSIGN(PepperCdmWrapper);
34 // Callback used to create a PepperCdmWrapper. This may return null if the
35 // Pepper CDM can not be created.
36 typedef base::Callback<scoped_ptr<PepperCdmWrapper>(
37 const std::string& pluginType)> CreatePepperCdmCB;
39 } // namespace content
41 #endif // CONTENT_RENDERER_MEDIA_CRYPTO_PEPPER_CDM_WRAPPER_H_