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
|
|
|
|
2024-07-29 13:37:35 +00:00
|
|
|
#include <string_view>
|
2014-08-27 13:16:45 +00:00
|
|
|
#include <vector>
|
|
|
|
|
2018-10-22 17:04:23 +00:00
|
|
|
#include "content/public/common/content_client.h"
|
2014-08-27 12:48:49 +00:00
|
|
|
|
2019-06-19 21:23:04 +00:00
|
|
|
namespace electron {
|
2014-08-27 12:48:49 +00:00
|
|
|
|
2020-02-04 20:19:40 +00:00
|
|
|
class ElectronContentClient : public content::ContentClient {
|
2014-08-27 12:48:49 +00:00
|
|
|
public:
|
2020-02-04 20:19:40 +00:00
|
|
|
ElectronContentClient();
|
|
|
|
~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;
|
2024-07-29 13:37:35 +00:00
|
|
|
std::string_view 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;
|
2022-09-07 07:46:37 +00:00
|
|
|
void AddPlugins(std::vector<content::ContentPluginInfo>* 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
|
|
|
};
|
|
|
|
|
2019-06-19 21:23:04 +00:00
|
|
|
} // namespace electron
|
2014-08-27 12:48:49 +00:00
|
|
|
|
2021-11-22 07:34:31 +00:00
|
|
|
#endif // ELECTRON_SHELL_APP_ELECTRON_CONTENT_CLIENT_H_
|