mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-01-05 22:48:06 +01:00
e9bf3cdb98
This change adds basic Chrome runtime implementations for CefBrowserContext and CefBrowserPlatformDelegate. A Chrome browser window with default frame and styling can now be created using CefBrowserHost::CreateBrowser and some CefClient callbacks will be triggered via the WebContentsObserver implementation in CefBrowserHostImpl. Any additional browser windows created via the Chrome UI will be unmanaged by CEF. The application message loop will block until all browser windows have been closed by the user.
32 lines
996 B
C++
32 lines
996 B
C++
// Copyright 2020 The Chromium Embedded Framework 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_BROWSER_CHROME_CHROME_BROWSER_CONTEXT_H_
|
|
#define CEF_LIBCEF_BROWSER_CHROME_CHROME_BROWSER_CONTEXT_H_
|
|
#pragma once
|
|
|
|
#include "libcef/browser/browser_context.h"
|
|
|
|
// See CefBrowserContext documentation for usage. Only accessed on the UI thread
|
|
// unless otherwise indicated.
|
|
class ChromeBrowserContext : public CefBrowserContext {
|
|
public:
|
|
explicit ChromeBrowserContext(const CefRequestContextSettings& settings);
|
|
|
|
// CefBrowserContext overrides.
|
|
content::BrowserContext* AsBrowserContext() override;
|
|
Profile* AsProfile() override;
|
|
void Initialize() override;
|
|
void Shutdown() override;
|
|
|
|
private:
|
|
~ChromeBrowserContext() override;
|
|
|
|
Profile* profile_ = nullptr;
|
|
|
|
DISALLOW_COPY_AND_ASSIGN(ChromeBrowserContext);
|
|
};
|
|
|
|
#endif // CEF_LIBCEF_BROWSER_CHROME_CHROME_BROWSER_CONTEXT_H_
|