mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
cefclient: views: Add overlay BrowserView demo (see #3790)
Adds new `--show-overlay-browser` command-line flag that creates an overlay containing an Alloy-style BrowserView. The main BrowserView may be Chrome- (default) or Alloy-style (add `--use-alloy-style`). This overlay will only be added to standalone (non-popup) windows. Popups triggered via the overlay will receive standard Alloy-style handling in cefclient (e.g. Views-hosted window). Add `--use-default-popup` for default popup handling.
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
#include "tests/cefclient/browser/image_cache.h"
|
||||
#include "tests/cefclient/browser/root_window.h"
|
||||
#include "tests/cefclient/browser/views_menu_bar.h"
|
||||
#include "tests/cefclient/browser/views_overlay_browser.h"
|
||||
#include "tests/cefclient/browser/views_overlay_controls.h"
|
||||
|
||||
namespace client {
|
||||
@@ -280,6 +281,13 @@ class ViewsWindow : public CefBrowserViewDelegate,
|
||||
|
||||
CefRefPtr<ViewsOverlayControls> overlay_controls_;
|
||||
|
||||
// Overlay browser view state.
|
||||
bool with_overlay_browser_ = false;
|
||||
std::string initial_url_;
|
||||
CefBrowserSettings settings_;
|
||||
CefRefPtr<CefRequestContext> request_context_;
|
||||
CefRefPtr<ViewsOverlayBrowser> overlay_browser_;
|
||||
|
||||
std::optional<float> default_titlebar_height_;
|
||||
std::optional<float> override_titlebar_height_;
|
||||
|
||||
|
Reference in New Issue
Block a user