2020-06-28 20:29:44 +02:00
|
|
|
// Copyright 2020 The Chromium Embedded Framework Authors.
|
|
|
|
// Portions copyright 2012 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_ALLOY_ALLOY_MAIN_RUNNER_DELEGATE_
|
|
|
|
#define CEF_LIBCEF_COMMON_ALLOY_ALLOY_MAIN_RUNNER_DELEGATE_
|
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
#include "include/cef_base.h"
|
|
|
|
#include "libcef/common/main_runner_delegate.h"
|
|
|
|
#include "libcef/common/main_runner_handler.h"
|
|
|
|
|
|
|
|
class AlloyMainDelegate;
|
|
|
|
|
|
|
|
class AlloyMainRunnerDelegate : public CefMainRunnerDelegate {
|
|
|
|
public:
|
|
|
|
// |runner| and |settings| will be non-nullptr for the main process only, and
|
|
|
|
// will outlive this object.
|
|
|
|
AlloyMainRunnerDelegate(CefMainRunnerHandler* runner,
|
|
|
|
CefSettings* settings,
|
|
|
|
CefRefPtr<CefApp> application);
|
2021-12-06 21:40:25 +01:00
|
|
|
|
|
|
|
AlloyMainRunnerDelegate(const AlloyMainRunnerDelegate&) = delete;
|
|
|
|
AlloyMainRunnerDelegate& operator=(const AlloyMainRunnerDelegate&) = delete;
|
|
|
|
|
2020-06-28 20:29:44 +02:00
|
|
|
~AlloyMainRunnerDelegate() override;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
// CefMainRunnerDelegate overrides.
|
|
|
|
content::ContentMainDelegate* GetContentMainDelegate() override;
|
|
|
|
void BeforeMainThreadInitialize(const CefMainArgs& args) override;
|
2023-04-04 20:00:13 +02:00
|
|
|
void BeforeMainThreadRun(bool multi_threaded_message_loop) override;
|
2020-06-28 20:29:44 +02:00
|
|
|
void AfterUIThreadInitialize() override;
|
2023-12-11 21:36:56 +01:00
|
|
|
void BeforeUIThreadShutdown() override;
|
2020-06-28 20:29:44 +02:00
|
|
|
void AfterUIThreadShutdown() override;
|
|
|
|
void BeforeMainThreadShutdown() override;
|
|
|
|
void AfterMainThreadShutdown() override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
std::unique_ptr<AlloyMainDelegate> main_delegate_;
|
|
|
|
|
|
|
|
CefMainRunnerHandler* const runner_;
|
|
|
|
CefSettings* const settings_;
|
|
|
|
CefRefPtr<CefApp> application_;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CEF_LIBCEF_COMMON_ALLOY_ALLOY_MAIN_RUNNER_DELEGATE_
|