mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
chrome: Add Views API integration (see issue #2969)
The Chrome browser can now be hosted in a Views-based application on Windows and Linux. To launch a fully-featured Chrome window using cefsimple: $ cefsimple --enable-chrome-runtime To launch a minimally-styled Views-hosted window using cefsimple: $ cefsimple --enable-chrome-runtime --use-views To launch a fully-styled Views-hosted window using cefclient: $ cefclient --enable-chrome-runtime --use-views Views unit tests also now pass with the Chrome runtime enabled: $ ceftests --gtest_filter=Views* --enable-chrome-runtime Known issues: - Popup browsers cannot be intercepted and reparented.
This commit is contained in:
@@ -19,14 +19,11 @@
|
||||
|
||||
class CefBrowserHostBase;
|
||||
|
||||
class CefBrowserViewImpl : public CefViewImpl<CefBrowserViewView,
|
||||
CefBrowserView,
|
||||
CefBrowserViewDelegate>,
|
||||
public CefBrowserViewView::Delegate {
|
||||
class CefBrowserViewImpl
|
||||
: public CefViewImpl<views::View, CefBrowserView, CefBrowserViewDelegate>,
|
||||
public CefBrowserViewView::Delegate {
|
||||
public:
|
||||
typedef CefViewImpl<CefBrowserViewView,
|
||||
CefBrowserView,
|
||||
CefBrowserViewDelegate>
|
||||
typedef CefViewImpl<views::View, CefBrowserView, CefBrowserViewDelegate>
|
||||
ParentClass;
|
||||
|
||||
// Create a new CefBrowserView instance. |delegate| may be nullptr.
|
||||
@@ -73,6 +70,9 @@ class CefBrowserViewImpl : public CefViewImpl<CefBrowserViewView,
|
||||
void OnBrowserViewAdded() override;
|
||||
void OnBoundsChanged() override;
|
||||
|
||||
// Return the WebView representation of this object.
|
||||
views::WebView* web_view() const;
|
||||
|
||||
private:
|
||||
// Create a new implementation object.
|
||||
// Always call Initialize() after creation.
|
||||
@@ -89,7 +89,7 @@ class CefBrowserViewImpl : public CefViewImpl<CefBrowserViewView,
|
||||
void SetDefaults(const CefBrowserSettings& settings);
|
||||
|
||||
// CefViewImpl methods:
|
||||
CefBrowserViewView* CreateRootView() override;
|
||||
views::View* CreateRootView() override;
|
||||
void InitializeRootView() override;
|
||||
|
||||
// Logic extracted from UnhandledKeyboardEventHandler::HandleKeyboardEvent for
|
||||
|
Reference in New Issue
Block a user