2020-07-06 20:14:57 +02:00
|
|
|
// Copyright 2017 The Chromium Embedded Framework Authors. Portions copyright
|
|
|
|
// 2011 The Chromium Authors. All rights reserved. Use of this source code is
|
|
|
|
// governed by a BSD-style license that can be found in the LICENSE file.
|
|
|
|
|
|
|
|
#ifndef CEF_LIBCEF_COMMON_RESOURCE_UTIL_H_
|
|
|
|
#define CEF_LIBCEF_COMMON_RESOURCE_UTIL_H_
|
|
|
|
#pragma once
|
|
|
|
|
2024-04-30 17:45:07 +02:00
|
|
|
#include "cef/include/cef_base.h"
|
2024-04-30 03:09:17 +02:00
|
|
|
#include "cef/libcef/features/features.h"
|
|
|
|
|
|
|
|
#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
|
2021-09-20 11:06:23 +02:00
|
|
|
#include "ui/base/resource/resource_scale_factor.h"
|
2024-04-30 03:09:17 +02:00
|
|
|
#endif
|
2020-07-06 20:14:57 +02:00
|
|
|
|
|
|
|
namespace base {
|
|
|
|
class CommandLine;
|
2024-04-30 03:09:17 +02:00
|
|
|
#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
|
2020-07-06 20:14:57 +02:00
|
|
|
class FilePath;
|
2024-04-30 03:09:17 +02:00
|
|
|
#endif
|
2020-07-06 20:14:57 +02:00
|
|
|
} // namespace base
|
|
|
|
|
|
|
|
namespace resource_util {
|
|
|
|
|
2024-04-30 03:09:17 +02:00
|
|
|
#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
|
2020-07-06 20:14:57 +02:00
|
|
|
// Returns the default path for the debug.log file.
|
|
|
|
base::FilePath GetDefaultLogFilePath();
|
|
|
|
|
|
|
|
// Called from MainDelegate::PreSandboxStartup.
|
|
|
|
void OverrideDefaultDownloadDir();
|
|
|
|
|
|
|
|
// Returns true if |scale_factor| is supported by this platform.
|
2021-08-20 01:40:49 +02:00
|
|
|
bool IsScaleFactorSupported(ui::ResourceScaleFactor scale_factor);
|
2024-04-30 03:09:17 +02:00
|
|
|
#endif // BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
|
|
|
|
|
2024-05-02 20:29:09 +02:00
|
|
|
// Returns the directory that contains resource files (*.bin, *.dat, *.pak,
|
|
|
|
// etc).
|
|
|
|
base::FilePath GetResourcesDir();
|
|
|
|
|
2024-04-30 03:09:17 +02:00
|
|
|
void OverrideUserDataDir(CefSettings* settings,
|
|
|
|
const base::CommandLine* command_line);
|
2020-07-06 20:14:57 +02:00
|
|
|
|
2022-01-24 18:58:02 +01:00
|
|
|
#if BUILDFLAG(IS_LINUX)
|
2020-07-06 20:14:57 +02:00
|
|
|
// Look for binary files (*.bin, *.dat, *.pak, chrome-sandbox, libGLESv2.so,
|
|
|
|
// libEGL.so, locales/*.pak, swiftshader/*.so) next to libcef instead of the exe
|
|
|
|
// on Linux. This is already the default on Windows.
|
|
|
|
void OverrideAssetPath();
|
|
|
|
#endif
|
|
|
|
|
|
|
|
} // namespace resource_util
|
|
|
|
|
|
|
|
#endif // CEF_LIBCEF_COMMON_RESOURCE_UTIL_H_
|