#include "extensions/shell/app/shell_main_delegate.h"
#include "base/command_line.h"
#include "base/files/file_path.h"
#include "base/logging.h"
#include "base/no_destructor.h"
#include "base/path_service.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "components/nacl/common/buildflags.h"
#include "content/public/browser/browser_main_runner.h"
#include "content/public/common/content_switches.h"
#include "content/shell/common/shell_switches.h"
#include "extensions/common/extension_paths.h"
#include "extensions/shell/browser/default_shell_browser_main_delegate.h"
#include "extensions/shell/browser/shell_content_browser_client.h"
#include "extensions/shell/common/shell_content_client.h"
#include "extensions/shell/renderer/shell_content_renderer_client.h"
#include "ui/base/resource/resource_bundle.h"
#if BUILDFLAG(IS_CHROMEOS)
#include "chromeos/dbus/constants/dbus_paths.h"
#endif
#if BUILDFLAG(IS_CHROMEOS_ASH)
#include "ash/constants/ash_paths.h"
#endif
#if BUILDFLAG(ENABLE_NACL)
#include "components/nacl/common/nacl_switches.h"
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
#include "components/nacl/common/nacl_paths.h"
#endif
#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_ANDROID)
#include "components/nacl/zygote/nacl_fork_delegate_linux.h"
#endif
#endif
#if BUILDFLAG(IS_WIN)
#include "base/base_paths_win.h"
#include "base/process/process_info.h"
#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
#include "base/nix/xdg_util.h"
#elif BUILDFLAG(IS_MAC)
#include "base/base_paths_mac.h"
#endif
namespace {
base::FilePath GetDataPath() { … }
void InitLogging() { … }
base::FilePath GetResourcesPakFilePath() { … }
}
namespace extensions {
ShellMainDelegate::ShellMainDelegate() { … }
ShellMainDelegate::~ShellMainDelegate() { … }
std::optional<int> ShellMainDelegate::BasicStartupComplete() { … }
void ShellMainDelegate::PreSandboxStartup() { … }
content::ContentClient* ShellMainDelegate::CreateContentClient() { … }
content::ContentBrowserClient* ShellMainDelegate::CreateContentBrowserClient() { … }
content::ContentRendererClient*
ShellMainDelegate::CreateContentRendererClient() { … }
void ShellMainDelegate::ProcessExiting(const std::string& process_type) { … }
#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_ANDROID)
void ShellMainDelegate::ZygoteStarting(
std::vector<std::unique_ptr<content::ZygoteForkDelegate>>* delegates) { … }
#endif
bool ShellMainDelegate::ProcessNeedsResourceBundle(
const std::string& process_type) { … }
}