chrome: Support usage of the Chrome toolbar from Views (see issue #2969)

This commit is contained in:
Marshall Greenblatt
2021-04-11 16:10:11 -04:00
parent 9c82785077
commit a4603c6f1a
55 changed files with 1057 additions and 156 deletions

View File

@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=d69aae0b968db9610e29d956d629f1789eca922d$
// $hash=312985bb5cc971d1fe9d77af1f985f6a544e9db5$
//
#include "libcef_dll/cpptoc/views/browser_view_cpptoc.h"
@ -102,6 +102,24 @@ browser_view_get_browser(struct _cef_browser_view_t* self) {
return CefBrowserCppToC::Wrap(_retval);
}
struct _cef_view_t* CEF_CALLBACK
browser_view_get_chrome_toolbar(struct _cef_browser_view_t* self) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefRefPtr<CefView> _retval =
CefBrowserViewCppToC::Get(self)->GetChromeToolbar();
// Return type: refptr_same
return CefViewCppToC::Wrap(_retval);
}
void CEF_CALLBACK
browser_view_set_prefer_accelerators(struct _cef_browser_view_t* self,
int prefer_accelerators) {
@ -1075,6 +1093,7 @@ int CEF_CALLBACK browser_view_convert_point_from_view(struct _cef_view_t* self,
CefBrowserViewCppToC::CefBrowserViewCppToC() {
GetStruct()->get_browser = browser_view_get_browser;
GetStruct()->get_chrome_toolbar = browser_view_get_chrome_toolbar;
GetStruct()->set_prefer_accelerators = browser_view_set_prefer_accelerators;
GetStruct()->base.as_browser_view = browser_view_as_browser_view;
GetStruct()->base.as_button = browser_view_as_button;