chrome: Add callback for already running app relaunch (fixes #3609)

Adds a new CefBrowserProcessHandler::OnAlreadyRunningAppRelaunch
callback for when an already running app is relaunched with the
same CefSettings.root_cache_path.

Client apps should check the CefInitialize() return value for early
exit of the relaunch source process.
This commit is contained in:
Marshall Greenblatt
2023-11-28 20:33:44 -05:00
parent d6af79e7a6
commit a25f89f9e4
45 changed files with 553 additions and 178 deletions

View File

@@ -22,13 +22,16 @@ class RootWindowViews : public RootWindow,
public ClientHandler::Delegate,
public ViewsWindow::Delegate {
public:
// Constructor may be called on any thread.
RootWindowViews();
// Constructor may be called on any thread. |parent_window| will be
// non-nullptr for popup browsers with a RootWindow parent (called on the UI
// thread only).
explicit RootWindowViews(RootWindowViews* parent_window);
~RootWindowViews();
void SetTitlebarHeight(const std::optional<float>& height);
// RootWindow methods:
bool IsViewsHosted() const override { return true; }
void Init(RootWindow::Delegate* delegate,
std::unique_ptr<RootWindowConfig> config,
const CefBrowserSettings& settings) override;