cef/libcef/browser/chrome/chrome_browser_context.h
Marshall Greenblatt e9bf3cdb98 Add initial Chrome runtime support for browser APIs (see issue #2969)
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.
2020-07-04 16:13:30 -04:00

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_