• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2015 The Chromium Embedded Framework Authors.
2 // Portions copyright 2014 The Chromium Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
5 
6 #ifndef CEF_LIBCEF_COMMON_ALLOY_ALLOY_CONTENT_CLIENT_H_
7 #define CEF_LIBCEF_COMMON_ALLOY_ALLOY_CONTENT_CLIENT_H_
8 #pragma once
9 
10 #include "base/compiler_specific.h"
11 #include "content/public/common/content_client.h"
12 #include "content/public/common/pepper_plugin_info.h"
13 
14 class AlloyContentClient : public content::ContentClient {
15  public:
16   AlloyContentClient();
17   ~AlloyContentClient() override;
18 
19   // content::ContentClient overrides.
20   void AddPepperPlugins(
21       std::vector<content::PepperPluginInfo>* plugins) override;
22   void AddContentDecryptionModules(
23       std::vector<content::CdmInfo>* cdms,
24       std::vector<media::CdmHostFilePath>* cdm_host_file_paths) override;
25   void AddAdditionalSchemes(Schemes* schemes) override;
26   std::u16string GetLocalizedString(int message_id) override;
27   std::u16string GetLocalizedString(int message_id,
28                                     const std::u16string& replacement) override;
29   base::StringPiece GetDataResource(
30       int resource_id,
31       ui::ResourceScaleFactor scale_factor) override;
32   base::RefCountedMemory* GetDataResourceBytes(int resource_id) override;
33   gfx::Image& GetNativeImageNamed(int resource_id) override;
34 
35   static void SetPDFEntryFunctions(
36       content::PepperPluginInfo::GetInterfaceFunc get_interface,
37       content::PepperPluginInfo::PPP_InitializeModuleFunc initialize_module,
38       content::PepperPluginInfo::PPP_ShutdownModuleFunc shutdown_module);
39 };
40 
41 #endif  // CEF_LIBCEF_COMMON_ALLOY_ALLOY_CONTENT_CLIENT_H_
42