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

@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=0fbd582ed5d0231550840ebf3eed2e488ac546d4$
// $hash=3e4eb9ed3a0cb28ae0459a50f20c8405c7722437$
//
#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_BROWSER_VIEW_CAPI_H_
@ -65,6 +65,17 @@ typedef struct _cef_browser_view_t {
struct _cef_browser_t*(CEF_CALLBACK* get_browser)(
struct _cef_browser_view_t* self);
///
// Returns the Chrome toolbar associated with this BrowserView. Only supported
// when using the Chrome runtime. The cef_browser_view_delegate_t::
// get_chrome_toolbar_type() function must return a value other than
// CEF_CTT_NONE and the toolbar will not be available until after this
// BrowserView is added to a cef_window_t and
// cef_view_delegate_t::on_window_changed() has been called.
///
struct _cef_view_t*(CEF_CALLBACK* get_chrome_toolbar)(
struct _cef_browser_view_t* self);
///
// Sets whether accelerators registered with cef_window_t::SetAccelerator are
// triggered before or after the event is sent to the cef_browser_t. If

View File

@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=37bbfadf761b3a1996276885d593d27d3fed5f8d$
// $hash=220a126af3682f716f10b9019e8d1461702aa7c9$
//
#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_BROWSER_VIEW_DELEGATE_CAPI_H_
@ -112,6 +112,14 @@ typedef struct _cef_browser_view_delegate_t {
struct _cef_browser_view_t* browser_view,
struct _cef_browser_view_t* popup_browser_view,
int is_devtools);
///
// Returns the Chrome toolbar type that will be available via
// cef_browser_view_t::get_chrome_toolbar(). See that function for related
// documentation.
///
cef_chrome_toolbar_type_t(CEF_CALLBACK* get_chrome_toolbar_type)(
struct _cef_browser_view_delegate_t* self);
} cef_browser_view_delegate_t;
#ifdef __cplusplus

View File

@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=8bd92dd03af4f5cf8c359c45a2d6d013565c2ead$
// $hash=a060cb3c53317d758e7f6b4a275288cd08f086e7$
//
#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_VIEW_DELEGATE_CAPI_H_
@ -114,6 +114,13 @@ typedef struct _cef_view_delegate_t {
int added,
struct _cef_view_t* child);
///
// Called when |view| is added or removed from the cef_window_t.
///
void(CEF_CALLBACK* on_window_changed)(struct _cef_view_delegate_t* self,
struct _cef_view_t* view,
int added);
///
// Called when |view| gains focus.
///