#include "extensions/shell/common/shell_content_client.h"
#include <string_view>
#include "base/strings/utf_string_conversions.h"
#include "components/nacl/common/buildflags.h"
#include "extensions/common/constants.h"
#include "extensions/shell/common/version.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
#if BUILDFLAG(ENABLE_NACL)
#include "base/base_paths.h"
#include "base/files/file_path.h"
#include "base/path_service.h"
#include "components/nacl/common/nacl_constants.h"
#include "components/nacl/renderer/plugin/ppapi_entrypoints.h"
#include "content/public/common/content_plugin_info.h"
#include "ppapi/shared_impl/ppapi_permissions.h"
#endif
namespace extensions {
namespace {
#if BUILDFLAG(ENABLE_NACL)
bool GetNaClPluginPath(base::FilePath* path) {
base::FilePath module;
if (!base::PathService::Get(base::DIR_MODULE, &module))
return false;
*path = module.Append(nacl::kInternalNaClPluginFileName);
return true;
}
#endif
}
ShellContentClient::ShellContentClient() { … }
ShellContentClient::~ShellContentClient() { … }
void ShellContentClient::AddPlugins(
std::vector<content::ContentPluginInfo>* plugins) { … }
void ShellContentClient::AddAdditionalSchemes(Schemes* schemes) { … }
std::u16string ShellContentClient::GetLocalizedString(int message_id) { … }
std::string_view ShellContentClient::GetDataResource(
int resource_id,
ui::ResourceScaleFactor scale_factor) { … }
base::RefCountedMemory* ShellContentClient::GetDataResourceBytes(
int resource_id) { … }
gfx::Image& ShellContentClient::GetNativeImageNamed(int resource_id) { … }
}