mirror of
https://github.com/electron/electron.git
synced 2026-02-19 03:14:51 -05:00
* chore: bump chromium in DEPS to 146.0.7643.0 Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> * chore: bump chromium in DEPS to 146.0.7645.0 Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> * chore: update patches Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * 7402162: Refactor app shims to call ContentMain Refs https://chromium-review.googlesource.com/c/chromium/src/+/7402162 Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * 7454282: Add master key management for HTTP Cache Encryption Refs https://chromium-review.googlesource.com/c/chromium/src/+/7454282 Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * 7490440: Reland "Delete unused base::Contains()" Refs https://chromium-review.googlesource.com/c/chromium/src/+/7490440 Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * chore: update patches Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * 7414864: Pass CSSParserLocalContext down to CSSMathExpressionNodeParser Refs https://chromium-review.googlesource.com/c/chromium/src/+/7414864 Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * 7460969: Move child_process_id.h to common Refs https://chromium-review.googlesource.com/c/chromium/src/+/7460969 Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * 7474608: [api] Remove deprecated v8::PropertyCallbackInfo<T>::This() Refs https://chromium-review.googlesource.com/c/v8/v8/+/7474608 Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * 7461067: [Viz] Rename kPreferGpuMemoryBuffer Refs https://chromium-review.googlesource.com/c/chromium/src/+/7461067 Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * 7487174: Remove GLHelper Refs https://chromium-review.googlesource.com/c/chromium/src/+/7487174 Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * 7457538: Set timeout from multi source page context fetcher Refs https://chromium-review.googlesource.com/c/chromium/src/+/7457538 Co-authored-by: David Sanders <dsanders11@ucsbalum.com> --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
78 lines
2.6 KiB
C++
78 lines
2.6 KiB
C++
// Copyright (c) 2013 GitHub, Inc.
|
|
// Use of this source code is governed by the MIT license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#ifndef ELECTRON_SHELL_APP_ELECTRON_MAIN_DELEGATE_H_
|
|
#define ELECTRON_SHELL_APP_ELECTRON_MAIN_DELEGATE_H_
|
|
|
|
#include <memory>
|
|
#include <string>
|
|
#include <string_view>
|
|
|
|
#include "content/public/app/content_main_delegate.h"
|
|
|
|
namespace content {
|
|
class Client;
|
|
}
|
|
|
|
namespace tracing {
|
|
class TracingSamplerProfiler;
|
|
}
|
|
|
|
namespace electron {
|
|
|
|
std::string LoadResourceBundle(const std::string& locale);
|
|
|
|
class ElectronMainDelegate : public content::ContentMainDelegate {
|
|
public:
|
|
static const char* const kNonWildcardDomainNonPortSchemes[];
|
|
static const size_t kNonWildcardDomainNonPortSchemesSize;
|
|
ElectronMainDelegate();
|
|
~ElectronMainDelegate() override;
|
|
|
|
// disable copy
|
|
ElectronMainDelegate(const ElectronMainDelegate&) = delete;
|
|
ElectronMainDelegate& operator=(const ElectronMainDelegate&) = delete;
|
|
|
|
#if BUILDFLAG(IS_MAC)
|
|
void OverrideChildProcessPath();
|
|
void OverrideFrameworkBundlePath();
|
|
void SetUpBundleOverrides();
|
|
#endif
|
|
|
|
protected:
|
|
// content::ContentMainDelegate:
|
|
std::string_view GetBrowserV8SnapshotFilename() override;
|
|
std::optional<int> BasicStartupComplete() override;
|
|
void PreSandboxStartup() override;
|
|
void SandboxInitialized(const std::string& process_type) override;
|
|
std::optional<int> PreBrowserMain() override;
|
|
content::ContentClient* CreateContentClient() override;
|
|
content::ContentBrowserClient* CreateContentBrowserClient() override;
|
|
content::ContentGpuClient* CreateContentGpuClient() override;
|
|
content::ContentRendererClient* CreateContentRendererClient() override;
|
|
content::ContentUtilityClient* CreateContentUtilityClient() override;
|
|
std::variant<int, content::MainFunctionParams> RunProcess(
|
|
const std::string& process_type,
|
|
content::MainFunctionParams main_function_params) override;
|
|
bool ShouldCreateFeatureList(InvokedIn invoked_in) override;
|
|
bool ShouldInitializeMojo(InvokedIn invoked_in) override;
|
|
bool ShouldLoadV8Snapshot(const std::string& process_type) override;
|
|
bool ShouldLockSchemeRegistry() override;
|
|
#if BUILDFLAG(IS_LINUX)
|
|
void ZygoteForked() override;
|
|
#endif
|
|
|
|
private:
|
|
std::unique_ptr<content::ContentBrowserClient> browser_client_;
|
|
std::unique_ptr<content::ContentClient> content_client_;
|
|
std::unique_ptr<content::ContentGpuClient> gpu_client_;
|
|
std::unique_ptr<content::ContentRendererClient> renderer_client_;
|
|
std::unique_ptr<content::ContentUtilityClient> utility_client_;
|
|
std::unique_ptr<tracing::TracingSamplerProfiler> tracing_sampler_profiler_;
|
|
};
|
|
|
|
} // namespace electron
|
|
|
|
#endif // ELECTRON_SHELL_APP_ELECTRON_MAIN_DELEGATE_H_
|