2014-10-31 18:17:05 +00:00
|
|
|
// Copyright (c) 2014 GitHub, Inc.
|
2014-08-27 12:48:49 +00:00
|
|
|
// Use of this source code is governed by the MIT license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
2021-11-22 07:34:31 +00:00
|
|
|
#ifndef ELECTRON_SHELL_APP_ELECTRON_CONTENT_CLIENT_H_
|
|
|
|
#define ELECTRON_SHELL_APP_ELECTRON_CONTENT_CLIENT_H_
|
2014-08-27 12:48:49 +00:00
|
|
|
|
2014-08-27 13:16:45 +00:00
|
|
|
#include <vector>
|
|
|
|
|
2019-08-24 01:14:23 +00:00
|
|
|
#include "base/files/file_path.h"
|
2018-10-22 17:04:23 +00:00
|
|
|
#include "content/public/common/content_client.h"
|
2014-08-27 12:48:49 +00:00
|
|
|
|
|
|
|
namespace electron {
|
|
|
|
|
2018-10-22 17:04:23 +00:00
|
|
|
class ElectronContentClient : public content::ContentClient {
|
2014-08-27 12:48:49 +00:00
|
|
|
public:
|
|
|
|
ElectronContentClient();
|
2018-04-17 23:03:51 +00:00
|
|
|
~ElectronContentClient() override;
|
2014-08-27 12:48:49 +00:00
|
|
|
|
2021-11-03 11:41:45 +00:00
|
|
|
// disable copy
|
|
|
|
ElectronContentClient(const ElectronContentClient&) = delete;
|
|
|
|
ElectronContentClient& operator=(const ElectronContentClient&) = delete;
|
|
|
|
|
2014-08-27 12:48:49 +00:00
|
|
|
protected:
|
|
|
|
// content::ContentClient:
|
2021-03-16 16:18:45 +00:00
|
|
|
std::u16string GetLocalizedString(int message_id) override;
|
2021-08-11 21:04:56 +00:00
|
|
|
base::StringPiece GetDataResource(int resource_id,
|
|
|
|
ui::ResourceScaleFactor) override;
|
2019-07-03 01:22:09 +00:00
|
|
|
gfx::Image& GetNativeImageNamed(int resource_id) override;
|
|
|
|
base::RefCountedMemory* GetDataResourceBytes(int resource_id) override;
|
2017-04-04 04:50:44 +00:00
|
|
|
void AddAdditionalSchemes(Schemes* schemes) override;
|
2015-04-28 15:45:58 +00:00
|
|
|
void AddPepperPlugins(
|
|
|
|
std::vector<content::PepperPluginInfo>* plugins) override;
|
2018-04-12 15:20:00 +00:00
|
|
|
void AddContentDecryptionModules(
|
|
|
|
std::vector<content::CdmInfo>* cdms,
|
|
|
|
std::vector<media::CdmHostFilePath>* cdm_host_file_paths) override;
|
2014-08-27 12:48:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace electron
|
|
|
|
|
2021-11-22 07:34:31 +00:00
|
|
|
#endif // ELECTRON_SHELL_APP_ELECTRON_CONTENT_CLIENT_H_
|