Compare commits

...

31 Commits

Author SHA1 Message Date
Marshall Greenblatt
c4d96f07fa alloy: Fix ComponentUpdateService shutdown crash with multi-threaded message loop (see issue #3149) 2021-10-19 17:32:12 -04:00
CEF Spotify
38a79951bd Update to Chromium version 94.0.4606.81 2021-10-11 09:41:06 +00:00
Marshall Greenblatt
09ee681fc4 Only disable request handling for HTTP/S schemes (see issue #3110)
The `--disable-request-handling-for-testing` command-line flag would previously
disable handling of all schemes, including custom schemes and internal schemes
such as devtools.
2021-10-05 12:27:40 +03:00
Marshall Greenblatt
5b52963ff1 Return display_name from CefDragData::GetFileNames if available
When dropping from Microsoft 365 Outlook the path will be "temp.tmp"
while display_name contains the original file name.
2021-10-04 15:02:13 +03:00
Alex Maitland
b356923f5c alloy-win: Disable the WinUseBrowserSpellChecker feature (see issue #3055)
Workaround until support for the Windows 10+ spellcheck service is added for
the Alloy runtime.
2021-10-04 13:34:32 +03:00
Andy Tzeng
1d9e261d11 Fix the timing of SetBackgroundColor (fixes issue #2482)
If the background color is set too early it won't be sent to renderer process.
Also force refresh of the background color for newly created popups.
2021-10-04 13:34:32 +03:00
CEF Spotify
0fd0d6f4b5 Update to Chromium version 94.0.4606.71 2021-10-01 08:05:34 +00:00
Marshall Greenblatt
10b22a327d Distribute binaries for SwANGLE support (fixes issue #3176)
Adds SwANGLE libraries that are required for software rendering on Windows
and Linux. Updates README.txt documentation accordingly.
2021-09-30 21:33:07 +03:00
Marshall Greenblatt
0bace85a34 Windows: Update d3dcompiler_47.dll to version 10.0.20348.1
Updated to match the DLL version that currently ships with Chrome.
Binaries from https://chromium.woolyss.com/download/en/.

Chromium will load the bundled version of the DLL by default (see
https://crbug.com/920704#c136).
2021-09-30 21:33:07 +03:00
CEF Spotify
6a963ca044 Update to Chromium version 94.0.4606.61 2021-09-27 07:33:18 +00:00
Marshall Greenblatt
4b61a8c493 Linux: Fix PrintToPDF crash (fixes issue #3178) 2021-09-23 17:04:25 +03:00
Marshall Greenblatt
1ca15ab88b views: Support configuration of initial window show state
Known issues:
- Exiting full-screen mode currently crashes with the Chrome runtime
  (see issue #3182).
2021-09-23 15:04:20 +03:00
Marshall Greenblatt
ffef496b4f Update cef_api_hash.h 2021-09-22 14:19:16 +03:00
Martin Falk
89e9ab5eee Use absolute namespace in cef_logging.h (fixes issue #3185) 2021-09-22 14:13:29 +03:00
Aviv Duek
1c8e13da00 Add two missing resource types to cef_resource_type_t enum 2021-09-22 14:13:23 +03:00
Mathieu Lafon
b156d790e3 osr: Implement InvalidateLocalSurfaceIdOnEviction (fixes issue #2483)
This fixes an empty-rendering issue when the view is shown after being
evicted.
2021-09-22 14:13:16 +03:00
Alex Maitland
f7bea2419e alloy: win: Fix loading of some mouse cursors (fixes issue #3174) 2021-09-22 12:18:26 +03:00
Marshall Greenblatt
2ca342be3a views: cefclient: Add missing <algorithm> include for std::max 2021-09-22 11:15:47 +03:00
Marshall Greenblatt
c543ee7ea9 views: cefclient: Fix VS2019 compile error 2021-09-21 13:29:10 +03:00
CEF Spotify
db9541fd94 Update to Chromium version 94.0.4606.54 2021-09-21 08:02:02 +00:00
Marshall Greenblatt
0c2cc26f2b Don't use NotificationStateLock for GetMainFrame (see issue #2421)
This causes a race related to |notification_state_lock_| assignment when
GetMainFrame is called from multiple threads. GetMainFrame doesn't
trigger any notifications so it shouldn't need that lock. Instead, only
use NotificationStateLock on the UI thread.
2021-09-16 18:37:22 +03:00
Marshall Greenblatt
f065600a2c alloy: Fix FrameHandlerTest failures with BackForwardCache enabled (see issue #2421)
To test:
Run `ceftests --gtest_filter=FrameHandlerTest.OrderSub*
              --enable-features=BackForwardCache`
2021-09-16 18:37:22 +03:00
Marshall Greenblatt
7827ac9545 Fix draggable region update with BackForwardCache enabled (see issue #2421)
When BackForwardCache is enabled and the user navigates the main frame
back/forward a new RFH may be created for an existing main frame GlobalId value
and CefFrameHostImpl (e.g. an object that was previously Detach()ed after main
frame navigation called SetMainFrame, but for which RenderFrameDeleted was not
subsequently called due to insertion in the BackForwardCache). In this case we
can re-attach the new RFH to the existing main frame CefFrameHostImpl in
RenderFrameHostStateChanged and resume processing of messages.

Swapping back/forward to an existing (already loaded) renderer does not trigger
new notifications for draggable regions (e.g. RenderFrameObserver::
DraggableRegionsChanged is not called by default). We therefore explicitly
request an update of draggable regions by sending the DidStopLoading message to
the renderer.

A new |reattached| parameter is added to CefFrameHandler::OnFrameAttached to
support identification of BackForwardCache usage by the client.

To test with unit tests:
Run `ceftests --gtest_filter=DraggableRegionsTest.DraggableRegionsCrossOrigin
              --enable-features=BackForwardCache`

To test manually:
1. Run `cefclient --enable-features=BackForwardCache --use-views
   --url=http://tests/draggable`, note that draggable regions work.
2. Load https://www.google.com via the address bar, note that draggable regions
   are removed.
3. Go back to http://tests/draggable, note that draggable regions work.
4. Go forward to https://www.google.com, note that draggable regions are
   removed.
2021-09-16 18:37:21 +03:00
Marshall Greenblatt
7644125cac alloy: Enable BackForwardCache support (see issue #2421)
BackForwardCache is currently being tested via field trials (see
https://crbug.com/1171298) and can be explicitly disabled using the
`--disable-back-forward-cache` or `--disable-features=BackForwardCache`
command-line flags. The default behavior now matches the Chrome runtime.
2021-09-16 18:37:21 +03:00
Marshall Greenblatt
40dcd29b63 views: Add support for absolute positioned overlay views.
To test:
Run `cefclient.exe --use-views --hide-frame --hide-controls`
Add `--enable-chrome-runtime` for the same behavior using the Chrome location
bar instead of a text field.
2021-09-16 18:37:21 +03:00
CEF Spotify
7eb813e7e7 Update to Chromium version 94.0.4606.50 2021-09-16 12:11:35 +00:00
Shezan Baig
506b164714 Fix download via the PDF extension 2021-09-09 10:52:47 +03:00
Marshall Greenblatt
9059374bf6 Update to Chromium version 94.0.4606.41 2021-09-09 07:44:17 +00:00
CEF Spotify
5c40d9fcee Update to Chromium version 94.0.4606.31 2021-09-02 15:54:57 +00:00
CEF Spotify
24b43360f2 Update to Chromium version 94.0.4606.20 2021-08-30 18:02:07 +00:00
Marshall Greenblatt
ab0fdbc7a3 Update to Chromium version 94.0.4606.12 2021-08-25 19:39:47 -04:00
151 changed files with 4556 additions and 438 deletions

View File

@@ -705,6 +705,7 @@ static_library("libcef_static") {
"libcef/common/file_util_impl.cc",
"libcef/common/frame_util.cc",
"libcef/common/frame_util.h",
"libcef/common/i18n_util_impl.cc",
"libcef/common/json_impl.cc",
"libcef/common/main_runner_delegate.h",
"libcef/common/main_runner_handler.h",
@@ -1055,6 +1056,8 @@ static_library("libcef_static") {
"libcef/browser/chrome/views/chrome_browser_frame.h",
"libcef/browser/chrome/views/chrome_browser_view.cc",
"libcef/browser/chrome/views/chrome_browser_view.h",
"libcef/browser/chrome/views/chrome_views_util.cc",
"libcef/browser/chrome/views/chrome_views_util.h",
"libcef/browser/chrome/views/toolbar_view_impl.cc",
"libcef/browser/chrome/views/toolbar_view_impl.h",
"libcef/browser/chrome/views/toolbar_view_view.cc",
@@ -1096,6 +1099,8 @@ static_library("libcef_static") {
"libcef/browser/views/menu_button_view.h",
"libcef/browser/views/menu_runner_views.cc",
"libcef/browser/views/menu_runner_views.h",
"libcef/browser/views/overlay_view_host.cc",
"libcef/browser/views/overlay_view_host.h",
"libcef/browser/views/panel_impl.h",
"libcef/browser/views/panel_view.h",
"libcef/browser/views/scroll_view_impl.cc",

View File

@@ -7,5 +7,6 @@
# https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
{
'chromium_checkout': 'refs/tags/94.0.4606.0'
'chromium_checkout': 'refs/tags/94.0.4606.81',
'depot_tools_checkout': '64a9f33bdd'
}

View File

@@ -8,7 +8,7 @@
# by hand. See the translator.README.txt file in the tools directory for
# more information.
#
# $hash=f6950d026a9c92fbb58da3fe0cbcf0050c12ecf0$
# $hash=216bf0511bdceca67cdbdcf30f8316db2d00e276$
#
{
@@ -41,6 +41,7 @@
'include/cef_focus_handler.h',
'include/cef_frame.h',
'include/cef_frame_handler.h',
'include/cef_i18n_util.h',
'include/cef_image.h',
'include/cef_jsdialog_handler.h',
'include/cef_keyboard_handler.h',
@@ -101,6 +102,7 @@
'include/views/cef_layout.h',
'include/views/cef_menu_button.h',
'include/views/cef_menu_button_delegate.h',
'include/views/cef_overlay_controller.h',
'include/views/cef_panel.h',
'include/views/cef_panel_delegate.h',
'include/views/cef_scroll_view.h',
@@ -139,6 +141,7 @@
'include/capi/cef_focus_handler_capi.h',
'include/capi/cef_frame_capi.h',
'include/capi/cef_frame_handler_capi.h',
'include/capi/cef_i18n_util_capi.h',
'include/capi/cef_image_capi.h',
'include/capi/cef_jsdialog_handler_capi.h',
'include/capi/cef_keyboard_handler_capi.h',
@@ -199,6 +202,7 @@
'include/capi/views/cef_layout_capi.h',
'include/capi/views/cef_menu_button_capi.h',
'include/capi/views/cef_menu_button_delegate_capi.h',
'include/capi/views/cef_overlay_controller_capi.h',
'include/capi/views/cef_panel_capi.h',
'include/capi/views/cef_panel_delegate_capi.h',
'include/capi/views/cef_scroll_view_capi.h',
@@ -352,6 +356,8 @@
'libcef_dll/cpptoc/navigation_entry_cpptoc.h',
'libcef_dll/ctocpp/navigation_entry_visitor_ctocpp.cc',
'libcef_dll/ctocpp/navigation_entry_visitor_ctocpp.h',
'libcef_dll/cpptoc/views/overlay_controller_cpptoc.cc',
'libcef_dll/cpptoc/views/overlay_controller_cpptoc.h',
'libcef_dll/cpptoc/views/panel_cpptoc.cc',
'libcef_dll/cpptoc/views/panel_cpptoc.h',
'libcef_dll/ctocpp/views/panel_delegate_ctocpp.cc',
@@ -662,6 +668,8 @@
'libcef_dll/ctocpp/navigation_entry_ctocpp.h',
'libcef_dll/cpptoc/navigation_entry_visitor_cpptoc.cc',
'libcef_dll/cpptoc/navigation_entry_visitor_cpptoc.h',
'libcef_dll/ctocpp/views/overlay_controller_ctocpp.cc',
'libcef_dll/ctocpp/views/overlay_controller_ctocpp.h',
'libcef_dll/ctocpp/views/panel_ctocpp.cc',
'libcef_dll/ctocpp/views/panel_ctocpp.h',
'libcef_dll/cpptoc/views/panel_delegate_cpptoc.cc',

View File

@@ -265,6 +265,8 @@
'tests/cefclient/browser/urlrequest_test.h',
'tests/cefclient/browser/views_menu_bar.cc',
'tests/cefclient/browser/views_menu_bar.h',
'tests/cefclient/browser/views_overlay_controls.cc',
'tests/cefclient/browser/views_overlay_controls.h',
'tests/cefclient/browser/views_style.cc',
'tests/cefclient/browser/views_style.h',
'tests/cefclient/browser/views_window.cc',

View File

@@ -222,8 +222,11 @@ if(OS_LINUX)
libcef.so
libEGL.so
libGLESv2.so
libvk_swiftshader.so
libvulkan.so.1
snapshot_blob.bin
v8_context_snapshot.bin
vk_swiftshader_icd.json
swiftshader
)
@@ -470,6 +473,9 @@ if(OS_WINDOWS)
libGLESv2.dll
snapshot_blob.bin
v8_context_snapshot.bin
vk_swiftshader.dll
vk_swiftshader_icd.json
vulkan-1.dll
swiftshader
)

View File

@@ -203,19 +203,19 @@ const LogSeverity LOG_DFATAL = LOG_FATAL;
// by LOG() and LOG_IF, etc. Since these are used all over our code, it's
// better to have compact code for these operations.
#define COMPACT_GOOGLE_LOG_EX_INFO(ClassName, ...) \
cef::logging::ClassName(__FILE__, __LINE__, cef::logging::LOG_INFO, \
::cef::logging::ClassName(__FILE__, __LINE__, ::cef::logging::LOG_INFO, \
##__VA_ARGS__)
#define COMPACT_GOOGLE_LOG_EX_WARNING(ClassName, ...) \
cef::logging::ClassName(__FILE__, __LINE__, cef::logging::LOG_WARNING, \
::cef::logging::ClassName(__FILE__, __LINE__, ::cef::logging::LOG_WARNING, \
##__VA_ARGS__)
#define COMPACT_GOOGLE_LOG_EX_ERROR(ClassName, ...) \
cef::logging::ClassName(__FILE__, __LINE__, cef::logging::LOG_ERROR, \
::cef::logging::ClassName(__FILE__, __LINE__, ::cef::logging::LOG_ERROR, \
##__VA_ARGS__)
#define COMPACT_GOOGLE_LOG_EX_FATAL(ClassName, ...) \
cef::logging::ClassName(__FILE__, __LINE__, cef::logging::LOG_FATAL, \
::cef::logging::ClassName(__FILE__, __LINE__, ::cef::logging::LOG_FATAL, \
##__VA_ARGS__)
#define COMPACT_GOOGLE_LOG_EX_DFATAL(ClassName, ...) \
cef::logging::ClassName(__FILE__, __LINE__, cef::logging::LOG_DFATAL, \
::cef::logging::ClassName(__FILE__, __LINE__, ::cef::logging::LOG_DFATAL, \
##__VA_ARGS__)
#define COMPACT_GOOGLE_LOG_INFO COMPACT_GOOGLE_LOG_EX_INFO(LogMessage)

View File

@@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=503984bf98aa52ff67ce52f26a560bbb1d4439bc$
// $hash=f6be5f7509ee3ccfe16f226470897223cc131014$
//
#ifndef CEF_INCLUDE_CAPI_CEF_FRAME_HANDLER_CAPI_H_
@@ -147,11 +147,14 @@ typedef struct _cef_frame_handler_t {
///
// Called when a frame can begin routing commands to/from the associated
// renderer process. Any commands that were queued have now been dispatched.
// renderer process. |reattached| will be true (1) if the frame was re-
// attached after exiting the BackForwardCache. Any commands that were queued
// have now been dispatched.
///
void(CEF_CALLBACK* on_frame_attached)(struct _cef_frame_handler_t* self,
struct _cef_browser_t* browser,
struct _cef_frame_t* frame);
struct _cef_frame_t* frame,
int reattached);
///
// Called when a frame loses its connection to the renderer process and will

View File

@@ -0,0 +1,58 @@
// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the name Chromium Embedded
// Framework nor the names of its contributors may be used to endorse
// or promote products derived from this software without specific prior
// written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool and should not edited
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=bf890f7b8e8edd423d71ad5a4d5bd43d81f1eb01$
//
#ifndef CEF_INCLUDE_CAPI_CEF_I18N_UTIL_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_I18N_UTIL_CAPI_H_
#pragma once
#include "include/capi/cef_base_capi.h"
#ifdef __cplusplus
extern "C" {
#endif
///
// Returns true (1) if the application text direction is right-to-left.
///
CEF_EXPORT int cef_is_rtl();
#ifdef __cplusplus
}
#endif
#endif // CEF_INCLUDE_CAPI_CEF_I18N_UTIL_CAPI_H_

View File

@@ -0,0 +1,216 @@
// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the name Chromium Embedded
// Framework nor the names of its contributors may be used to endorse
// or promote products derived from this software without specific prior
// written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool and should not edited
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=60a15cb1c2e77544c20a3aafef1db736f07a5fb8$
//
#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_OVERLAY_CONTROLLER_CAPI_H_
#define CEF_INCLUDE_CAPI_VIEWS_CEF_OVERLAY_CONTROLLER_CAPI_H_
#pragma once
#include "include/capi/cef_base_capi.h"
#ifdef __cplusplus
extern "C" {
#endif
struct _cef_view_t;
struct _cef_window_t;
///
// Controller for an overlay that contains a contents View added via
// cef_window_t::AddOverlayView. Methods exposed by this controller should be
// called in preference to functions of the same name exposed by the contents
// View unless otherwise indicated. Methods must be called on the browser
// process UI thread unless otherwise indicated.
///
typedef struct _cef_overlay_controller_t {
///
// Base structure.
///
cef_base_ref_counted_t base;
///
// Returns true (1) if this object is valid.
///
int(CEF_CALLBACK* is_valid)(struct _cef_overlay_controller_t* self);
///
// Returns true (1) if this object is the same as |that| object.
///
int(CEF_CALLBACK* is_same)(struct _cef_overlay_controller_t* self,
struct _cef_overlay_controller_t* that);
///
// Returns the contents View for this overlay.
///
struct _cef_view_t*(CEF_CALLBACK* get_contents_view)(
struct _cef_overlay_controller_t* self);
///
// Returns the top-level Window hosting this overlay. Use this function
// instead of calling get_window() on the contents View.
///
struct _cef_window_t*(CEF_CALLBACK* get_window)(
struct _cef_overlay_controller_t* self);
///
// Returns the docking mode for this overlay.
///
cef_docking_mode_t(CEF_CALLBACK* get_docking_mode)(
struct _cef_overlay_controller_t* self);
///
// Destroy this overlay.
///
void(CEF_CALLBACK* destroy)(struct _cef_overlay_controller_t* self);
///
// Sets the bounds (size and position) of this overlay. This will set the
// bounds of the contents View to match and trigger a re-layout if necessary.
// |bounds| is in parent coordinates and any insets configured on this overlay
// will be ignored. Use this function only for overlays created with a docking
// mode value of CEF_DOCKING_MODE_CUSTOM. With other docking modes modify the
// insets of this overlay and/or layout of the contents View and call
// size_to_preferred_size() instead to calculate the new size and re-position
// the overlay if necessary.
///
void(CEF_CALLBACK* set_bounds)(struct _cef_overlay_controller_t* self,
const cef_rect_t* bounds);
///
// Returns the bounds (size and position) of this overlay in parent
// coordinates.
///
cef_rect_t(CEF_CALLBACK* get_bounds)(struct _cef_overlay_controller_t* self);
///
// Returns the bounds (size and position) of this overlay in DIP screen
// coordinates.
///
cef_rect_t(CEF_CALLBACK* get_bounds_in_screen)(
struct _cef_overlay_controller_t* self);
///
// Sets the size of this overlay without changing the position. This will set
// the size of the contents View to match and trigger a re-layout if
// necessary. |size| is in parent coordinates and any insets configured on
// this overlay will be ignored. Use this function only for overlays created
// with a docking mode value of CEF_DOCKING_MODE_CUSTOM. With other docking
// modes modify the insets of this overlay and/or layout of the contents View
// and call size_to_preferred_size() instead to calculate the new size and re-
// position the overlay if necessary.
///
void(CEF_CALLBACK* set_size)(struct _cef_overlay_controller_t* self,
const cef_size_t* size);
///
// Returns the size of this overlay in parent coordinates.
///
cef_size_t(CEF_CALLBACK* get_size)(struct _cef_overlay_controller_t* self);
///
// Sets the position of this overlay without changing the size. |position| is
// in parent coordinates and any insets configured on this overlay will be
// ignored. Use this function only for overlays created with a docking mode
// value of CEF_DOCKING_MODE_CUSTOM. With other docking modes modify the
// insets of this overlay and/or layout of the contents View and call
// size_to_preferred_size() instead to calculate the new size and re-position
// the overlay if necessary.
///
void(CEF_CALLBACK* set_position)(struct _cef_overlay_controller_t* self,
const cef_point_t* position);
///
// Returns the position of this overlay in parent coordinates.
///
cef_point_t(CEF_CALLBACK* get_position)(
struct _cef_overlay_controller_t* self);
///
// Sets the insets for this overlay. |insets| is in parent coordinates. Use
// this function only for overlays created with a docking mode value other
// than CEF_DOCKING_MODE_CUSTOM.
///
void(CEF_CALLBACK* set_insets)(struct _cef_overlay_controller_t* self,
const cef_insets_t* insets);
///
// Returns the insets for this overlay in parent coordinates.
///
cef_insets_t(CEF_CALLBACK* get_insets)(
struct _cef_overlay_controller_t* self);
///
// Size this overlay to its preferred size and trigger a re-layout if
// necessary. The position of overlays created with a docking mode value of
// CEF_DOCKING_MODE_CUSTOM will not be modified by calling this function. With
// other docking modes this function may re-position the overlay if necessary
// to accommodate the new size and any insets configured on the contents View.
///
void(CEF_CALLBACK* size_to_preferred_size)(
struct _cef_overlay_controller_t* self);
///
// Sets whether this overlay is visible. Overlays are hidden by default. If
// this overlay is hidden then it and any child Views will not be drawn and,
// if any of those Views currently have focus, then focus will also be
// cleared. Painting is scheduled as needed.
///
void(CEF_CALLBACK* set_visible)(struct _cef_overlay_controller_t* self,
int visible);
///
// Returns whether this overlay is visible. A View may be visible but still
// not drawn in a Window if any parent Views are hidden. Call is_drawn() to
// determine whether this overlay and all parent Views are visible and will be
// drawn.
///
int(CEF_CALLBACK* is_visible)(struct _cef_overlay_controller_t* self);
///
// Returns whether this overlay is visible and drawn in a Window. A View is
// drawn if it and all parent Views are visible. To determine if the
// containing Window is visible to the user on-screen call is_visible() on the
// Window.
///
int(CEF_CALLBACK* is_drawn)(struct _cef_overlay_controller_t* self);
} cef_overlay_controller_t;
#ifdef __cplusplus
}
#endif
#endif // CEF_INCLUDE_CAPI_VIEWS_CEF_OVERLAY_CONTROLLER_CAPI_H_

View File

@@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=9881a00ef237b6972f14c071544387fc90fe18f1$
// $hash=84b29a8dcdadffae5466ac16e7aafd80471a0abd$
//
#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_VIEW_CAPI_H_
@@ -220,6 +220,19 @@ typedef struct _cef_view_t {
///
cef_point_t(CEF_CALLBACK* get_position)(struct _cef_view_t* self);
///
// Sets the insets for this View. |insets| is in parent coordinates, or DIP
// screen coordinates if there is no parent.
///
void(CEF_CALLBACK* set_insets)(struct _cef_view_t* self,
const cef_insets_t* insets);
///
// Returns the insets for this View in parent coordinates, or DIP screen
// coordinates if there is no parent.
///
cef_insets_t(CEF_CALLBACK* get_insets)(struct _cef_view_t* self);
///
// Returns the size this View would like to be if enough space is available.
// Size is in parent coordinates, or DIP screen coordinates if there is no

View File

@@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=a060cb3c53317d758e7f6b4a275288cd08f086e7$
// $hash=c8707f30655dc83c5f329d1dc22b14e9e06f4e76$
//
#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_VIEW_DELEGATE_CAPI_H_
@@ -121,6 +121,13 @@ typedef struct _cef_view_delegate_t {
struct _cef_view_t* view,
int added);
///
// Called when the layout of |view| has changed.
///
void(CEF_CALLBACK* on_layout_changed)(struct _cef_view_delegate_t* self,
struct _cef_view_t* view,
const cef_rect_t* new_bounds);
///
// Called when |view| gains focus.
///

View File

@@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=15f88e3521ca96947fe8b1f91f251eb3405fb293$
// $hash=0f5dad3572a20ee7395cb861b5c970cff382b61c$
//
#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_WINDOW_CAPI_H_
@@ -43,6 +43,7 @@
#include "include/capi/cef_image_capi.h"
#include "include/capi/cef_menu_model_capi.h"
#include "include/capi/views/cef_display_capi.h"
#include "include/capi/views/cef_overlay_controller_capi.h"
#include "include/capi/views/cef_panel_capi.h"
#include "include/capi/views/cef_window_delegate_capi.h"
@@ -197,6 +198,40 @@ typedef struct _cef_window_t {
struct _cef_image_t*(CEF_CALLBACK* get_window_app_icon)(
struct _cef_window_t* self);
///
// Add a View that will be overlayed on the Window contents with absolute
// positioning and high z-order. Positioning is controlled by |docking_mode|
// as described below. The returned cef_overlay_controller_t object is used to
// control the overlay. Overlays are hidden by default.
//
// With CEF_DOCKING_MODE_CUSTOM:
// 1. The overlay is initially hidden, sized to |view|'s preferred size, and
// positioned in the top-left corner.
// 2. Optionally change the overlay position and/or size by calling
// CefOverlayController methods.
// 3. Call CefOverlayController::SetVisible(true) to show the overlay.
// 4. The overlay will be automatically re-sized if |view|'s layout changes.
// Optionally change the overlay position and/or size when
// OnLayoutChanged is called on the Window's delegate to indicate a
// change in Window bounds.
//
// With other docking modes:
// 1. The overlay is initially hidden, sized to |view|'s preferred size, and
// positioned based on |docking_mode|.
// 2. Call CefOverlayController::SetVisible(true) to show the overlay.
// 3. The overlay will be automatically re-sized if |view|'s layout changes
// and re-positioned as appropriate when the Window resizes.
//
// Overlays created by this function will receive a higher z-order then any
// child Views added previously. It is therefore recommended to call this
// function last after all other child Views have been added so that the
// overlay displays as the top-most child of the Window.
///
struct _cef_overlay_controller_t*(CEF_CALLBACK* add_overlay_view)(
struct _cef_window_t* self,
struct _cef_view_t* view,
cef_docking_mode_t docking_mode);
///
// Show a menu with contents |menu_model|. |screen_point| specifies the menu
// position in screen coordinates. |anchor_position| specifies how the menu

View File

@@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=b43e6106fde84f3bab4dd566efab23a50adaf94d$
// $hash=839098c445b1d3203bc482fc5d1555e1f9b87646$
//
#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_WINDOW_DELEGATE_CAPI_H_
@@ -99,6 +99,13 @@ typedef struct _cef_window_delegate_t {
struct _cef_window_delegate_t* self,
struct _cef_window_t* window);
///
// Return the initial show state for |window|.
///
cef_show_state_t(CEF_CALLBACK* get_initial_show_state)(
struct _cef_window_delegate_t* self,
struct _cef_window_t* window);
///
// Return true (1) if |window| should be created without a frame or title bar.
// The window will be resizable if can_resize() returns true (1). Use

View File

@@ -42,13 +42,13 @@
// way that may cause binary incompatibility with other builds. The universal
// hash value will change if any platform is affected whereas the platform hash
// values will change only if that particular platform is affected.
#define CEF_API_HASH_UNIVERSAL "5625e3ce80d2bbf5b5a39f8655d96c215f7685ee"
#define CEF_API_HASH_UNIVERSAL "6198f526f7dcccda1b66b81826ac030c1f76fd15"
#if defined(OS_WIN)
#define CEF_API_HASH_PLATFORM "c20e4ffc24e6267b61774f49237d0f30a581f370"
#define CEF_API_HASH_PLATFORM "7b514a69fd70f75f8a7ddba848136a9cdd8182d4"
#elif defined(OS_MAC)
#define CEF_API_HASH_PLATFORM "65731bc654ec6e1dbd48d6ff2336c4c8573f7d35"
#define CEF_API_HASH_PLATFORM "e33e34f6268be00c7eb4a69bdc97d6f5f3bc6154"
#elif defined(OS_LINUX)
#define CEF_API_HASH_PLATFORM "4e35b9cc9735c63ac9f16fbbb49a4b8e2307f23a"
#define CEF_API_HASH_PLATFORM "edbea2dd852cfcf63a0f57d7495e5d69e87f0052"
#endif
#ifdef __cplusplus

View File

@@ -132,11 +132,14 @@ class CefFrameHandler : public virtual CefBaseRefCounted {
///
// Called when a frame can begin routing commands to/from the associated
// renderer process. Any commands that were queued have now been dispatched.
// renderer process. |reattached| will be true if the frame was re-attached
// after exiting the BackForwardCache. Any commands that were queued have now
// been dispatched.
///
/*--cef()--*/
virtual void OnFrameAttached(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame) {}
CefRefPtr<CefFrame> frame,
bool reattached) {}
///
// Called when a frame loses its connection to the renderer process and will

49
include/cef_i18n_util.h Normal file
View File

@@ -0,0 +1,49 @@
// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the name Chromium Embedded
// Framework nor the names of its contributors may be used to endorse
// or promote products derived from this software without specific prior
// written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// ---------------------------------------------------------------------------
//
// The contents of this file must follow a specific format in order to
// support the CEF translator tool. See the translator.README.txt file in the
// tools directory for more information.
//
#ifndef CEF_INCLUDE_CEF_I18N_UTIL_H_
#define CEF_INCLUDE_CEF_I18N_UTIL_H_
#pragma once
#include "include/cef_base.h"
///
// Returns true if the application text direction is right-to-left.
///
/*--cef()--*/
bool CefIsRTL();
#endif // CEF_INCLUDE_CEF_I18N_UTIL_H_

View File

@@ -1159,6 +1159,16 @@ typedef enum {
// A resource that a plugin requested.
///
RT_PLUGIN_RESOURCE,
///
// A main-frame service worker navigation preload request.
///
RT_NAVIGATION_PRELOAD_MAIN_FRAME = 19,
///
// A sub-frame service worker navigation preload request.
///
RT_NAVIGATION_PRELOAD_SUB_FRAME,
} cef_resource_type_t;
///
@@ -3198,6 +3208,27 @@ typedef enum {
CEF_CTT_LOCATION,
} cef_chrome_toolbar_type_t;
///
// Docking modes supported by CefWindow::AddOverlay.
///
typedef enum {
CEF_DOCKING_MODE_TOP_LEFT = 1,
CEF_DOCKING_MODE_TOP_RIGHT,
CEF_DOCKING_MODE_BOTTOM_LEFT,
CEF_DOCKING_MODE_BOTTOM_RIGHT,
CEF_DOCKING_MODE_CUSTOM,
} cef_docking_mode_t;
///
// Show states supported by CefWindowDelegate::GetInitialShowState.
///
typedef enum {
CEF_SHOW_STATE_NORMAL = 1,
CEF_SHOW_STATE_MINIMIZED,
CEF_SHOW_STATE_MAXIMIZED,
CEF_SHOW_STATE_FULLSCREEN,
} cef_show_state_t;
#ifdef __cplusplus
}
#endif

View File

@@ -0,0 +1,209 @@
// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the name Chromium Embedded
// Framework nor the names of its contributors may be used to endorse
// or promote products derived from this software without specific prior
// written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// ---------------------------------------------------------------------------
//
// The contents of this file must follow a specific format in order to
// support the CEF translator tool. See the translator.README.txt file in the
// tools directory for more information.
//
#ifndef CEF_INCLUDE_VIEWS_CEF_OVERLAY_CONTROLLER_H_
#define CEF_INCLUDE_VIEWS_CEF_OVERLAY_CONTROLLER_H_
#pragma once
#include "include/cef_base.h"
class CefView;
class CefWindow;
///
// Controller for an overlay that contains a contents View added via
// CefWindow::AddOverlayView. Methods exposed by this controller should be
// called in preference to methods of the same name exposed by the contents View
// unless otherwise indicated. Methods must be called on the browser process UI
// thread unless otherwise indicated.
///
/*--cef(source=library)--*/
class CefOverlayController : public CefBaseRefCounted {
public:
///
// Returns true if this object is valid.
///
/*--cef()--*/
virtual bool IsValid() = 0;
///
// Returns true if this object is the same as |that| object.
///
/*--cef()--*/
virtual bool IsSame(CefRefPtr<CefOverlayController> that) = 0;
///
// Returns the contents View for this overlay.
///
/*--cef()--*/
virtual CefRefPtr<CefView> GetContentsView() = 0;
///
// Returns the top-level Window hosting this overlay. Use this method instead
// of calling GetWindow() on the contents View.
///
/*--cef()--*/
virtual CefRefPtr<CefWindow> GetWindow() = 0;
///
// Returns the docking mode for this overlay.
///
/*--cef(default_retval=CEF_DOCKING_MODE_TOP_LEFT)--*/
virtual cef_docking_mode_t GetDockingMode() = 0;
///
// Destroy this overlay.
///
/*--cef()--*/
virtual void Destroy() = 0;
///
// Sets the bounds (size and position) of this overlay. This will set the
// bounds of the contents View to match and trigger a re-layout if necessary.
// |bounds| is in parent coordinates and any insets configured on this overlay
// will be ignored. Use this method only for overlays created with a docking
// mode value of CEF_DOCKING_MODE_CUSTOM. With other docking modes modify the
// insets of this overlay and/or layout of the contents View and call
// SizeToPreferredSize() instead to calculate the new size and re-position the
// overlay if necessary.
///
/*--cef()--*/
virtual void SetBounds(const CefRect& bounds) = 0;
///
// Returns the bounds (size and position) of this overlay in parent
// coordinates.
///
/*--cef()--*/
virtual CefRect GetBounds() = 0;
///
// Returns the bounds (size and position) of this overlay in DIP screen
// coordinates.
///
/*--cef()--*/
virtual CefRect GetBoundsInScreen() = 0;
///
// Sets the size of this overlay without changing the position. This will set
// the size of the contents View to match and trigger a re-layout if
// necessary. |size| is in parent coordinates and any insets configured on
// this overlay will be ignored. Use this method only for overlays created
// with a docking mode value of CEF_DOCKING_MODE_CUSTOM. With other docking
// modes modify the insets of this overlay and/or layout of the contents View
// and call SizeToPreferredSize() instead to calculate the new size and
// re-position the overlay if necessary.
///
/*--cef()--*/
virtual void SetSize(const CefSize& size) = 0;
///
// Returns the size of this overlay in parent coordinates.
///
/*--cef()--*/
virtual CefSize GetSize() = 0;
///
// Sets the position of this overlay without changing the size. |position| is
// in parent coordinates and any insets configured on this overlay will
// be ignored. Use this method only for overlays created with a docking mode
// value of CEF_DOCKING_MODE_CUSTOM. With other docking modes modify the
// insets of this overlay and/or layout of the contents View and call
// SizeToPreferredSize() instead to calculate the new size and re-position the
// overlay if necessary.
///
/*--cef()--*/
virtual void SetPosition(const CefPoint& position) = 0;
///
// Returns the position of this overlay in parent coordinates.
///
/*--cef()--*/
virtual CefPoint GetPosition() = 0;
///
// Sets the insets for this overlay. |insets| is in parent coordinates. Use
// this method only for overlays created with a docking mode value other than
// CEF_DOCKING_MODE_CUSTOM.
///
/*--cef()--*/
virtual void SetInsets(const CefInsets& insets) = 0;
///
// Returns the insets for this overlay in parent coordinates.
///
/*--cef()--*/
virtual CefInsets GetInsets() = 0;
///
// Size this overlay to its preferred size and trigger a re-layout if
// necessary. The position of overlays created with a docking mode value of
// CEF_DOCKING_MODE_CUSTOM will not be modified by calling this method. With
// other docking modes this method may re-position the overlay if necessary to
// accommodate the new size and any insets configured on the contents View.
///
/*--cef()--*/
virtual void SizeToPreferredSize() = 0;
///
// Sets whether this overlay is visible. Overlays are hidden by default. If
// this overlay is hidden then it and any child Views will not be drawn and,
// if any of those Views currently have focus, then focus will also be
// cleared. Painting is scheduled as needed.
///
/*--cef()--*/
virtual void SetVisible(bool visible) = 0;
///
// Returns whether this overlay is visible. A View may be visible but still
// not drawn in a Window if any parent Views are hidden. Call IsDrawn() to
// determine whether this overlay and all parent Views are visible and will be
// drawn.
///
/*--cef()--*/
virtual bool IsVisible() = 0;
///
// Returns whether this overlay is visible and drawn in a Window. A View is
// drawn if it and all parent Views are visible. To determine if the
// containing Window is visible to the user on-screen call IsVisible() on the
// Window.
///
/*--cef()--*/
virtual bool IsDrawn() = 0;
};
#endif // CEF_INCLUDE_VIEWS_CEF_OVERLAY_CONTROLLER_H_

View File

@@ -222,6 +222,20 @@ class CefView : public CefBaseRefCounted {
/*--cef()--*/
virtual CefPoint GetPosition() = 0;
///
// Sets the insets for this View. |insets| is in parent coordinates, or DIP
// screen coordinates if there is no parent.
///
/*--cef()--*/
virtual void SetInsets(const CefInsets& insets) = 0;
///
// Returns the insets for this View in parent coordinates, or DIP screen
// coordinates if there is no parent.
///
/*--cef()--*/
virtual CefInsets GetInsets() = 0;
///
// Returns the size this View would like to be if enough space is available.
// Size is in parent coordinates, or DIP screen coordinates if there is no

View File

@@ -108,9 +108,16 @@ class CefViewDelegate : public virtual CefBaseRefCounted {
///
// Called when |view| is added or removed from the CefWindow.
///
/*--cef(optional_param=window)--*/
/*--cef()--*/
virtual void OnWindowChanged(CefRefPtr<CefView> view, bool added) {}
///
// Called when the layout of |view| has changed.
///
/*--cef()--*/
virtual void OnLayoutChanged(CefRefPtr<CefView> view,
const CefRect& new_bounds) {}
///
// Called when |view| gains focus.
///

View File

@@ -41,6 +41,7 @@
#include "include/cef_image.h"
#include "include/cef_menu_model.h"
#include "include/views/cef_display.h"
#include "include/views/cef_overlay_controller.h"
#include "include/views/cef_panel.h"
#include "include/views/cef_window_delegate.h"
@@ -211,6 +212,40 @@ class CefWindow : public CefPanel {
/*--cef()--*/
virtual CefRefPtr<CefImage> GetWindowAppIcon() = 0;
///
// Add a View that will be overlayed on the Window contents with absolute
// positioning and high z-order. Positioning is controlled by |docking_mode|
// as described below. The returned CefOverlayController object is used to
// control the overlay. Overlays are hidden by default.
//
// With CEF_DOCKING_MODE_CUSTOM:
// 1. The overlay is initially hidden, sized to |view|'s preferred size, and
// positioned in the top-left corner.
// 2. Optionally change the overlay position and/or size by calling
// CefOverlayController methods.
// 3. Call CefOverlayController::SetVisible(true) to show the overlay.
// 4. The overlay will be automatically re-sized if |view|'s layout changes.
// Optionally change the overlay position and/or size when
// OnLayoutChanged is called on the Window's delegate to indicate a
// change in Window bounds.
//
// With other docking modes:
// 1. The overlay is initially hidden, sized to |view|'s preferred size, and
// positioned based on |docking_mode|.
// 2. Call CefOverlayController::SetVisible(true) to show the overlay.
// 3. The overlay will be automatically re-sized if |view|'s layout changes
// and re-positioned as appropriate when the Window resizes.
//
// Overlays created by this method will receive a higher z-order then any
// child Views added previously. It is therefore recommended to call this
// method last after all other child Views have been added so that the overlay
// displays as the top-most child of the Window.
///
/*--cef()--*/
virtual CefRefPtr<CefOverlayController> AddOverlayView(
CefRefPtr<CefView> view,
cef_docking_mode_t docking_mode) = 0;
///
// Show a menu with contents |menu_model|. |screen_point| specifies the menu
// position in screen coordinates. |anchor_position| specifies how the menu

View File

@@ -91,6 +91,14 @@ class CefWindowDelegate : public CefPanelDelegate {
return CefRect();
}
///
// Return the initial show state for |window|.
///
/*--cef(default_retval=CEF_SHOW_STATE_NORMAL)--*/
virtual cef_show_state_t GetInitialShowState(CefRefPtr<CefWindow> window) {
return CEF_SHOW_STATE_NORMAL;
}
///
// Return true if |window| should be created without a frame or title bar. The
// window will be resizable if CanResize() returns true. Use

View File

@@ -1463,6 +1463,14 @@ void AlloyBrowserHostImpl::ExitPictureInPicture() {
PictureInPictureWindowManager::GetInstance()->ExitPictureInPicture();
}
bool AlloyBrowserHostImpl::IsBackForwardCacheSupported() {
return true;
}
bool AlloyBrowserHostImpl::IsPrerender2Supported() {
return true;
}
// content::WebContentsObserver methods.
// -----------------------------------------------------------------------------

View File

@@ -289,6 +289,8 @@ class AlloyBrowserHostImpl : public CefBrowserHostBase,
const viz::SurfaceId& surface_id,
const gfx::Size& natural_size) override;
void ExitPictureInPicture() override;
bool IsBackForwardCacheSupported() override;
bool IsPrerender2Supported() override;
// content::WebContentsObserver methods.
using content::WebContentsObserver::BeforeUnloadFired;

View File

@@ -77,6 +77,7 @@
#include "components/content_settings/core/browser/cookie_settings.h"
#include "components/embedder_support/switches.h"
#include "components/embedder_support/user_agent_utils.h"
#include "components/pdf/browser/pdf_web_contents_helper.h"
#include "components/spellcheck/common/spellcheck.mojom.h"
#include "components/version_info/version_info.h"
#include "content/browser/plugin_service_impl.h"
@@ -943,10 +944,6 @@ void AlloyContentBrowserClient::OverrideWebkitPrefs(
renderer_prefs::PopulateWebPreferences(rvh, *prefs, base_background_color);
web_contents->SetPageBaseBackgroundColor(base_background_color);
if (rvh->GetWidget()->GetView()) {
rvh->GetWidget()->GetView()->SetBackgroundColor(base_background_color);
}
}
bool AlloyContentBrowserClient::OverrideWebPreferencesAfterNavigation(
@@ -995,6 +992,13 @@ bool AlloyContentBrowserClient::BindAssociatedReceiverFromFrame(
render_frame_host);
return true;
}
if (interface_name == pdf::mojom::PdfService::Name_) {
pdf::PDFWebContentsHelper::BindPdfService(
mojo::PendingAssociatedReceiver<pdf::mojom::PdfService>(
std::move(*handle)),
render_frame_host);
return true;
}
return false;
}

View File

@@ -103,10 +103,9 @@ void ChromeBrowserProcessAlloy::CleanupOnUIThread() {
local_state_.reset();
browser_policy_connector_.reset();
background_printing_manager_.reset();
field_trial_list_.reset();
component_updater_.reset();
shutdown_ = true;
}

View File

@@ -18,6 +18,8 @@
#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/render_widget_host.h"
#include "content/public/browser/render_widget_host_view.h"
#include "third_party/blink/public/mojom/favicon/favicon_url.mojom.h"
#include "third_party/blink/public/mojom/input/focus_type.mojom-blink.h"
@@ -45,11 +47,11 @@ void CefBrowserContentsDelegate::ObserveWebContents(
content::Source<content::NavigationController>(
&new_contents->GetController()));
// Make sure RenderFrameCreated is called at least one time.
// Make sure MaybeCreateFrame is called at least one time.
// Create the frame representation before OnAfterCreated is called for a new
// browser. Additionally, RenderFrameCreated is otherwise not called at all
// for new popup browsers.
RenderFrameCreated(new_contents->GetMainFrame());
// browser.
browser_info_->MaybeCreateFrame(new_contents->GetMainFrame(),
false /* is_guest_view */);
} else {
registrar_.reset();
}
@@ -235,6 +237,18 @@ bool CefBrowserContentsDelegate::HandleKeyboardEvent(
void CefBrowserContentsDelegate::RenderFrameCreated(
content::RenderFrameHost* render_frame_host) {
browser_info_->MaybeCreateFrame(render_frame_host, false /* is_guest_view */);
if (render_frame_host->GetParent() == nullptr) {
auto render_view_host = render_frame_host->GetRenderViewHost();
auto base_background_color = platform_delegate()->GetBackgroundColor();
if (browser_info_ && browser_info_->is_popup()) {
// force reset page base background color because popup window won't get
// the page base background from web_contents at the creation time
web_contents()->SetPageBaseBackgroundColor(SkColor());
web_contents()->SetPageBaseBackgroundColor(base_background_color);
}
render_view_host->GetWidget()->GetView()->SetBackgroundColor(
base_background_color);
}
}
void CefBrowserContentsDelegate::RenderFrameHostChanged(
@@ -365,6 +379,10 @@ void CefBrowserContentsDelegate::DidFinishNavigation(
(error_code == net::OK ? navigation_handle->GetURL() : GURL());
auto browser_info = browser_info_;
if (!browser_info->browser()) {
// Ignore notifications when the browser is closing.
return;
}
// May return NULL when starting a new navigation if the previous navigation
// caused the renderer process to crash during load.

View File

@@ -798,6 +798,7 @@ void CefBrowserHostBase::OnBeforeClose() {
handler->OnBeforeClose(this);
}
}
browser_info_->SetClosing();
}
void CefBrowserHostBase::OnBrowserDestroyed() {

View File

@@ -41,7 +41,9 @@ CefBrowserInfo::~CefBrowserInfo() {
CefRefPtr<CefBrowserHostBase> CefBrowserInfo::browser() const {
base::AutoLock lock_scope(lock_);
return browser_;
if (!is_closing_)
return browser_;
return nullptr;
}
void CefBrowserInfo::SetBrowser(CefRefPtr<CefBrowserHostBase> browser) {
@@ -71,6 +73,12 @@ void CefBrowserInfo::SetBrowser(CefRefPtr<CefBrowserHostBase> browser) {
}
}
void CefBrowserInfo::SetClosing() {
base::AutoLock lock_scope(lock_);
DCHECK(!is_closing_);
is_closing_ = true;
}
void CefBrowserInfo::MaybeCreateFrame(content::RenderFrameHost* host,
bool is_guest_view) {
CEF_REQUIRE_UIT();
@@ -155,7 +163,26 @@ void CefBrowserInfo::FrameHostStateChanged(
content::RenderFrameHost::LifecycleState new_state) {
CEF_REQUIRE_UIT();
// We currently only care about BackForwardCache state changes.
if ((old_state == content::RenderFrameHost::LifecycleState::kPrerendering ||
old_state ==
content::RenderFrameHost::LifecycleState::kInBackForwardCache) &&
new_state == content::RenderFrameHost::LifecycleState::kActive) {
if (auto frame = GetFrameForHost(host)) {
// Update the associated RFH, which may have changed.
frame->MaybeReAttach(this, host);
if (frame->IsMain()) {
// Update the main frame object.
NotificationStateLock lock_scope(this);
SetMainFrame(browser_, frame);
}
// Update draggable regions.
frame->MaybeSendDidStopLoading();
}
}
// Update BackForwardCache state.
bool added_to_bfcache =
new_state ==
content::RenderFrameHost::LifecycleState::kInBackForwardCache;
@@ -207,9 +234,9 @@ void CefBrowserInfo::RemoveFrame(content::RenderFrameHost* host) {
}
CefRefPtr<CefFrameHostImpl> CefBrowserInfo::GetMainFrame() {
NotificationStateLock lock_scope(this);
base::AutoLock lock_scope(lock_);
// Early exit if called post-destruction.
if (!browser_)
if (!browser_ || is_closing_)
return nullptr;
CHECK(main_frame_);
@@ -345,6 +372,26 @@ void CefBrowserInfo::MaybeExecuteFrameNotification(
std::move(pending_action).Run(frame_handler);
}
void CefBrowserInfo::MaybeNotifyDraggableRegionsChanged(
CefRefPtr<CefBrowserHostBase> browser,
CefRefPtr<CefFrameHostImpl> frame,
std::vector<CefDraggableRegion> draggable_regions) {
CEF_REQUIRE_UIT();
DCHECK(frame->IsMain());
if (draggable_regions == draggable_regions_)
return;
draggable_regions_ = std::move(draggable_regions);
if (auto client = browser->GetClient()) {
if (auto handler = client->GetDragHandler()) {
handler->OnDraggableRegionsChanged(browser.get(), frame,
draggable_regions_);
}
}
}
// Passing in |browser| here because |browser_| may already be cleared.
void CefBrowserInfo::SetMainFrame(CefRefPtr<CefBrowserHostBase> browser,
CefRefPtr<CefFrameHostImpl> frame) {
@@ -352,6 +399,12 @@ void CefBrowserInfo::SetMainFrame(CefRefPtr<CefBrowserHostBase> browser,
DCHECK(browser);
DCHECK(!frame || frame->IsMain());
if (frame && main_frame_ &&
frame->GetIdentifier() == main_frame_->GetIdentifier()) {
// Nothing to do.
return;
}
CefRefPtr<CefFrameHostImpl> old_frame;
if (main_frame_) {
old_frame = main_frame_;
@@ -451,6 +504,8 @@ void CefBrowserInfo::RemoveAllFrames(
CefBrowserInfo::NotificationStateLock::NotificationStateLock(
CefBrowserInfo* browser_info)
: browser_info_(browser_info) {
CEF_REQUIRE_UIT();
// Take the navigation state lock.
{
base::AutoLock lock_scope_(browser_info_->notification_lock_);
@@ -465,6 +520,8 @@ CefBrowserInfo::NotificationStateLock::NotificationStateLock(
}
CefBrowserInfo::NotificationStateLock::~NotificationStateLock() {
CEF_REQUIRE_UIT();
// Unlock in reverse order.
browser_info_lock_scope_.reset();
@@ -477,11 +534,8 @@ CefBrowserInfo::NotificationStateLock::~NotificationStateLock() {
if (!queue_.empty()) {
DCHECK(frame_handler_);
scoped_refptr<NavigationLock> nav_lock;
if (CEF_CURRENTLY_ON_UIT()) {
// Don't navigate while inside callbacks.
nav_lock = browser_info_->CreateNavigationLock();
}
// Don't navigate while inside callbacks.
auto nav_lock = browser_info_->CreateNavigationLock();
// Empty the queue of pending actions. Any of these actions might result in
// the acquisition of a new NotificationStateLock.

View File

@@ -52,6 +52,13 @@ class CefBrowserInfo : public base::RefCountedThreadSafe<CefBrowserInfo> {
// (to set) and DestroyBrowser (to clear).
void SetBrowser(CefRefPtr<CefBrowserHostBase> browser);
// Called after OnBeforeClose and before SetBrowser(nullptr). This will cause
// browser() and GetMainFrame() to return nullptr as expected by
// CefFrameHandler callbacks. Note that this differs from calling
// SetBrowser(nullptr) because the WebContents has not yet been destroyed and
// further frame-related callbacks are expected.
void SetClosing();
// Ensure that a frame record exists for |host|. Called for the main frame
// when the RenderView is created, or for a sub-frame when the associated
// RenderFrame is created in the renderer process.
@@ -147,6 +154,11 @@ class CefBrowserInfo : public base::RefCountedThreadSafe<CefBrowserInfo> {
// executed immediately.
void MaybeExecuteFrameNotification(FrameNotifyOnceAction pending_action);
void MaybeNotifyDraggableRegionsChanged(
CefRefPtr<CefBrowserHostBase> browser,
CefRefPtr<CefFrameHostImpl> frame,
std::vector<CefDraggableRegion> draggable_regions);
private:
friend class base::RefCountedThreadSafe<CefBrowserInfo>;
@@ -192,7 +204,7 @@ class CefBrowserInfo : public base::RefCountedThreadSafe<CefBrowserInfo> {
// Used instead of |base::AutoLock(lock_)| in situations that might generate
// CefFrameHandler notifications. Any notifications passed to
// MaybeExecuteFrameNotification() will be queued until the lock is released,
// and then executed in order.
// and then executed in order. Only accessed on the UI thread.
class NotificationStateLock final {
public:
explicit NotificationStateLock(CefBrowserInfo* browser_info);
@@ -234,6 +246,12 @@ class CefBrowserInfo : public base::RefCountedThreadSafe<CefBrowserInfo> {
// The current main frame.
CefRefPtr<CefFrameHostImpl> main_frame_;
// True if the browser is currently closing.
bool is_closing_ = false;
// Only accessed on the UI thread.
std::vector<CefDraggableRegion> draggable_regions_;
DISALLOW_COPY_AND_ASSIGN(CefBrowserInfo);
};

View File

@@ -56,8 +56,6 @@ CefRefPtr<ChromeBrowserHostImpl> ChromeBrowserHostImpl::Create(
ChromeBrowserHostImpl::GetBrowserForContents(web_contents);
CHECK(browser_host);
browser->window()->Show();
return browser_host;
}

View File

@@ -188,11 +188,6 @@ void ChromeContentBrowserClientCef::OverrideWebkitPrefs(
}
web_contents->SetPageBaseBackgroundColor(base_background_color);
auto rvh = web_contents->GetRenderViewHost();
if (rvh->GetWidget()->GetView()) {
rvh->GetWidget()->GetView()->SetBackgroundColor(base_background_color);
}
}
bool ChromeContentBrowserClientCef::WillCreateURLLoaderFactory(

View File

@@ -0,0 +1,15 @@
// Copyright 2021 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.
#include "libcef/browser/chrome/views/chrome_views_util.h"
#include "libcef/browser/views/view_util.h"
namespace cef {
bool IsCefView(views::View* view) {
return view_util::GetFor(view, /*find_known_parent=*/false) != nullptr;
}
} // namespace cef

View File

@@ -0,0 +1,20 @@
// Copyright 2021 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_VIEWS_CHROME_VIEWS_H_
#define CEF_LIBCEF_BROWSER_CHROME_VIEWS_CHROME_VIEWS_H_
#pragma once
namespace views {
class View;
}
namespace cef {
// Returns true if |view| is a CefView.
bool IsCefView(views::View* view);
} // namespace cef
#endif // CEF_LIBCEF_BROWSER_CHROME_VIEWS_CHROME_VIEWS_H_

View File

@@ -460,6 +460,36 @@ bool CefFrameHostImpl::Detach() {
return first_detach;
}
void CefFrameHostImpl::MaybeReAttach(
scoped_refptr<CefBrowserInfo> browser_info,
content::RenderFrameHost* render_frame_host) {
CEF_REQUIRE_UIT();
if (is_attached_ && render_frame_host_ == render_frame_host) {
// Nothing to do here.
return;
}
// We expect that Detach() was called previously.
CHECK(!is_temporary());
CHECK(!is_attached_);
CHECK(!render_frame_host_);
// The RFH may change but the GlobalId should remain the same.
CHECK_EQ(frame_id_,
frame_util::MakeFrameId(render_frame_host->GetGlobalId()));
{
base::AutoLock lock_scope(state_lock_);
browser_info_ = browser_info;
}
render_frame_host_ = render_frame_host;
RefreshAttributes();
// Restore the RenderFrame connection.
FrameAttachedInternal(/*reattached=*/true);
}
// kMainFrameId must be -1 to align with renderer expectations.
const int64_t CefFrameHostImpl::kMainFrameId = -1;
const int64_t CefFrameHostImpl::kFocusedFrameId = -2;
@@ -552,6 +582,10 @@ void CefFrameHostImpl::SendMessage(const std::string& name,
}
void CefFrameHostImpl::FrameAttached() {
FrameAttachedInternal(/*reattached=*/false);
}
void CefFrameHostImpl::FrameAttachedInternal(bool reattached) {
CEF_REQUIRE_UIT();
auto browser_info = GetBrowserInfo();
@@ -573,13 +607,13 @@ void CefFrameHostImpl::FrameAttached() {
}
browser_info->MaybeExecuteFrameNotification(base::BindOnce(
[](CefRefPtr<CefFrameHostImpl> self,
[](CefRefPtr<CefFrameHostImpl> self, bool reattached,
CefRefPtr<CefFrameHandler> handler) {
if (auto browser = self->GetBrowserHostBase()) {
handler->OnFrameAttached(browser, self);
handler->OnFrameAttached(browser, self, reattached);
}
},
CefRefPtr<CefFrameHostImpl>(this)));
CefRefPtr<CefFrameHostImpl>(this), reattached));
}
}
@@ -596,13 +630,6 @@ void CefFrameHostImpl::UpdateDraggableRegions(
if (!browser)
return;
CefRefPtr<CefDragHandler> handler;
auto client = browser->GetClient();
if (client)
handler = client->GetDragHandler();
if (!handler)
return;
std::vector<CefDraggableRegion> draggable_regions;
if (regions) {
draggable_regions.reserve(regions->size());
@@ -615,7 +642,10 @@ void CefFrameHostImpl::UpdateDraggableRegions(
}
}
handler->OnDraggableRegionsChanged(browser.get(), this, draggable_regions);
// Delegate to BrowserInfo so that current state is maintained with
// cross-origin navigation.
browser_info_->MaybeNotifyDraggableRegionsChanged(
browser, this, std::move(draggable_regions));
}
void CefExecuteJavaScriptWithUserGestureForTests(CefRefPtr<CefFrame> frame,

View File

@@ -119,6 +119,12 @@ class CefFrameHostImpl : public CefFrame, public cef::mojom::BrowserFrame {
// if this was the first call to Detach() for the frame.
bool Detach();
// A frame has swapped to active status from prerendering or the back-forward
// cache. We may need to re-attach if the RFH has changed. See
// https://crbug.com/1179502#c8 for additional background.
void MaybeReAttach(scoped_refptr<CefBrowserInfo> browser_info,
content::RenderFrameHost* render_frame_host);
// cef::mojom::BrowserFrame methods forwarded from CefBrowserFrame.
void SendMessage(const std::string& name, base::Value arguments) override;
void FrameAttached() override;
@@ -153,6 +159,8 @@ class CefFrameHostImpl : public CefFrame, public cef::mojom::BrowserFrame {
void SendToRenderFrame(const std::string& function_name,
RenderFrameAction action);
void FrameAttachedInternal(bool reattached);
const bool is_main_frame_;
// The following members may be read/modified from any thread. All access must

View File

@@ -1313,7 +1313,7 @@ void ProxyURLLoaderFactory::CreateLoaderAndStart(
return;
}
if (DisableRequestHandlingForTesting()) {
if (DisableRequestHandlingForTesting() && request.url.SchemeIsHTTPOrHTTPS()) {
// This is the so-called pass-through, no-op option.
if (target_factory_) {
target_factory_->CreateLoaderAndStart(std::move(receiver), request_id,

View File

@@ -114,7 +114,9 @@ class CefDelegatedFrameHostClient : public content::DelegatedFrameHostClient {
return view_->render_widget_host()->CollectSurfaceIdsForEviction();
}
void InvalidateLocalSurfaceIdOnEviction() override {}
void InvalidateLocalSurfaceIdOnEviction() override {
view_->InvalidateLocalSurfaceId();
}
bool ShouldShowStaleContentOnEviction() override { return false; }

View File

@@ -274,6 +274,11 @@ class CefRenderWidgetHostViewOSR
void ReleaseCompositor();
// Marks the current viz::LocalSurfaceId as invalid. AllocateLocalSurfaceId
// must be called before submitting new CompositorFrames. May be called by
// content::DelegatedFrameHostClient::InvalidateLocalSurfaceIdOnEviction.
void InvalidateLocalSurfaceId();
private:
void SetFrameRate();
bool SetDeviceScaleFactor();
@@ -321,10 +326,6 @@ class CefRenderWidgetHostViewOSR
// Returns the current viz::LocalSurfaceIdAllocation.
const viz::LocalSurfaceId& GetOrCreateLocalSurfaceId();
// Marks the current viz::LocalSurfaceId as invalid. AllocateLocalSurfaceId
// must be called before submitting new CompositorFrames.
void InvalidateLocalSurfaceId();
void AddDamageRect(uint32_t sequence, const gfx::Rect& rect);
// Applies background color without notifying the RenderWidget about

View File

@@ -55,11 +55,15 @@ bool CefSSLHostStateDelegate::DidHostRunInsecureContent(
return false;
}
void CefSSLHostStateDelegate::AllowHttpForHost(const std::string& host) {
void CefSSLHostStateDelegate::AllowHttpForHost(
const std::string& host,
content::WebContents* web_contents) {
// Intentional no-op.
}
bool CefSSLHostStateDelegate::IsHttpAllowedForHost(const std::string& host) {
bool CefSSLHostStateDelegate::IsHttpAllowedForHost(
const std::string& host,
content::WebContents* web_contents) {
// Intentional no-op. Return value does not matter as HTTPS-Only Mode is not
// enabled.
return false;

View File

@@ -64,8 +64,10 @@ class CefSSLHostStateDelegate : public content::SSLHostStateDelegate {
bool DidHostRunInsecureContent(const std::string& host,
int child_id,
InsecureContentType content_type) override;
void AllowHttpForHost(const std::string& host) override;
bool IsHttpAllowedForHost(const std::string& host) override;
void AllowHttpForHost(const std::string& host,
content::WebContents* web_contents) override;
bool IsHttpAllowedForHost(const std::string& host,
content::WebContents* web_contents) override;
void RevokeUserAllowExceptions(const std::string& host) override;
bool HasAllowException(const std::string& host,
content::WebContents* web_contents) override;

View File

@@ -218,9 +218,15 @@ void CefBrowserPlatformDelegateViews::SendTouchEvent(
}
void CefBrowserPlatformDelegateViews::SendFocusEvent(bool setFocus) {
// Will result in a call to WebContents::Focus().
if (setFocus && browser_view_->root_view())
// Will activate the Widget and result in a call to WebContents::Focus().
if (setFocus && browser_view_->root_view()) {
if (auto widget = GetWindowWidget()) {
// Don't activate a minimized Widget, or it will be shown.
if (widget->IsMinimized())
return;
}
browser_view_->root_view()->RequestFocus();
}
}
gfx::Point CefBrowserPlatformDelegateViews::GetScreenPoint(

View File

@@ -0,0 +1,330 @@
// Copyright 2021 The Chromium Embedded Framework Authors. Portions copyright
// 2011 The Chromium Authors. All rights reserved. Use of this source code is
// governed by a BSD-style license that can be found in the LICENSE file.
#include "libcef/browser/views/overlay_view_host.h"
#include "libcef/browser/views/view_util.h"
#include "libcef/browser/views/window_view.h"
#include "base/i18n/rtl.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "chrome/browser/ui/views/theme_copying_widget.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/compositor/layer.h"
#if defined(USE_AURA)
#include "ui/aura/window.h"
#include "ui/views/view_constants_aura.h"
#endif
namespace {
class CefOverlayControllerImpl : public CefOverlayController {
public:
CefOverlayControllerImpl(CefOverlayViewHost* host, CefRefPtr<CefView> view)
: host_(host), view_(view) {}
bool IsValid() override {
// View validity implies that CefOverlayViewHost is still valid, because the
// Widget that it owns (and that owns the View) is still valid.
return view_ && view_->IsValid();
}
bool IsSame(CefRefPtr<CefOverlayController> that) override {
return that && that->GetContentsView()->IsSame(view_);
}
CefRefPtr<CefView> GetContentsView() override { return view_; }
CefRefPtr<CefWindow> GetWindow() override {
if (IsValid()) {
return view_util::GetWindowFor(host_->window_view()->GetWidget());
}
return nullptr;
}
cef_docking_mode_t GetDockingMode() override {
if (IsValid()) {
return host_->docking_mode();
}
return CEF_DOCKING_MODE_TOP_LEFT;
}
void Destroy() override {
if (IsValid()) {
host_->Destroy();
view_ = nullptr;
}
}
void SetBounds(const CefRect& bounds) override {
if (IsValid() && host_->docking_mode() == CEF_DOCKING_MODE_CUSTOM) {
host_->SetOverlayBounds(
gfx::Rect(bounds.x, bounds.y, bounds.width, bounds.height));
}
}
CefRect GetBounds() override {
if (IsValid()) {
const auto& bounds = host_->bounds();
return CefRect(bounds.x(), bounds.y(), bounds.width(), bounds.height());
}
return CefRect();
}
CefRect GetBoundsInScreen() override {
if (IsValid()) {
const auto& bounds = host_->widget()->GetWindowBoundsInScreen();
return CefRect(bounds.x(), bounds.y(), bounds.width(), bounds.height());
}
return CefRect();
}
void SetSize(const CefSize& size) override {
if (IsValid() && host_->docking_mode() == CEF_DOCKING_MODE_CUSTOM) {
// Update the size without changing the origin.
const auto& origin = host_->bounds().origin();
host_->SetOverlayBounds(
gfx::Rect(origin, gfx::Size(size.width, size.height)));
}
}
CefSize GetSize() override {
const auto& bounds = GetBounds();
return CefSize(bounds.width, bounds.height);
}
void SetPosition(const CefPoint& position) override {
if (IsValid() && host_->docking_mode() == CEF_DOCKING_MODE_CUSTOM) {
// Update the origin without changing the size.
const auto& size = host_->bounds().size();
host_->SetOverlayBounds(
gfx::Rect(gfx::Point(position.x, position.y), size));
}
}
CefPoint GetPosition() override {
const auto& bounds = GetBounds();
return CefPoint(bounds.x, bounds.y);
}
void SetInsets(const CefInsets& insets) override {
if (IsValid() && host_->docking_mode() != CEF_DOCKING_MODE_CUSTOM) {
host_->SetOverlayInsets(insets);
}
}
CefInsets GetInsets() override {
if (IsValid()) {
return host_->insets();
}
return CefInsets();
}
void SizeToPreferredSize() override {
if (IsValid()) {
if (host_->docking_mode() == CEF_DOCKING_MODE_CUSTOM) {
// Update the size without changing the origin.
const auto& origin = host_->bounds().origin();
const auto& preferred_size = host_->view()->GetPreferredSize();
host_->SetOverlayBounds(gfx::Rect(origin, preferred_size));
} else {
host_->MoveIfNecessary();
}
}
}
void SetVisible(bool visible) override {
if (IsValid()) {
if (visible) {
host_->MoveIfNecessary();
host_->widget()->Show();
} else {
host_->widget()->Hide();
}
}
}
bool IsVisible() override {
if (IsValid()) {
return host_->widget()->IsVisible();
}
return false;
}
bool IsDrawn() override { return IsVisible(); }
private:
CefOverlayViewHost* const host_;
CefRefPtr<CefView> view_;
IMPLEMENT_REFCOUNTING(CefOverlayControllerImpl);
DISALLOW_COPY_AND_ASSIGN(CefOverlayControllerImpl);
};
} // namespace
CefOverlayViewHost::CefOverlayViewHost(CefWindowView* window_view,
cef_docking_mode_t docking_mode)
: window_view_(window_view), docking_mode_(docking_mode) {}
void CefOverlayViewHost::Init(views::View* widget_view,
CefRefPtr<CefView> view) {
DCHECK(view);
// Match the logic in CEF_PANEL_IMPL_D::AddChildView().
auto controls_view = view->IsAttached()
? base::WrapUnique(view_util::GetFor(view))
: view_util::PassOwnership(view);
DCHECK(controls_view.get());
cef_controller_ = new CefOverlayControllerImpl(this, view);
// Initialize the Widget.
widget_ = std::make_unique<ThemeCopyingWidget>(window_view_->GetWidget());
views::Widget::InitParams params(views::Widget::InitParams::TYPE_CONTROL);
params.delegate = this;
params.name = "CefOverlayViewHost";
params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
params.parent = window_view_->GetWidget()->GetNativeView();
params.opacity = views::Widget::InitParams::WindowOpacity::kTranslucent;
params.activatable = views::Widget::InitParams::Activatable::kNo;
widget_->Init(std::move(params));
view_ = widget_->GetContentsView()->AddChildView(std::move(controls_view));
// Make the Widget background transparent. The View might still be opaque.
if (widget_->GetCompositor()) {
widget_->GetCompositor()->SetBackgroundColor(SK_ColorTRANSPARENT);
}
#if defined(USE_AURA)
// See matching logic in view_util::GetWindowFor.
widget_->GetNativeView()->SetProperty(views::kHostViewKey, widget_view);
#endif
if (cef::IsChromeRuntimeEnabled()) {
// Some attributes associated with a Chrome toolbar are located via the
// Widget. See matching logic in BrowserView::AddedToWidget.
auto browser_view = BrowserView::GetBrowserViewForNativeWindow(
view_util::GetNativeWindow(window_view_->GetWidget()));
if (browser_view) {
widget_->SetNativeWindowProperty(BrowserView::kBrowserViewKey,
browser_view);
}
}
// Set the initial bounds after the View has been added to the Widget.
// Otherwise, preferred size won't calculate correctly.
gfx::Rect bounds;
if (docking_mode_ == CEF_DOCKING_MODE_CUSTOM) {
if (view_->size().IsEmpty()) {
// Size to the preferred size to start.
view_->SizeToPreferredSize();
}
// Top-left origin with existing size.
bounds = gfx::Rect(gfx::Point(), view_->size());
} else {
bounds = ComputeBounds();
}
SetOverlayBounds(bounds);
// Register for future bounds change notifications.
view_->AddObserver(this);
// Initially hidden.
widget_->Hide();
}
void CefOverlayViewHost::Destroy() {
if (widget_ && !widget_->IsClosed()) {
// Remove the child View immediately. It may be reused by the client.
auto view = view_util::GetFor(view_, /*find_known_parent=*/false);
widget_->GetContentsView()->RemoveChildView(view_);
if (view) {
view_util::ResumeOwnership(view);
}
widget_->Close();
}
}
void CefOverlayViewHost::MoveIfNecessary() {
if (bounds_changing_ || docking_mode_ == CEF_DOCKING_MODE_CUSTOM) {
return;
}
SetOverlayBounds(ComputeBounds());
}
void CefOverlayViewHost::SetOverlayBounds(const gfx::Rect& bounds) {
// Avoid re-entrancy of this method.
if (bounds_changing_)
return;
gfx::Rect new_bounds = bounds;
// Keep the result inside the widget.
new_bounds.Intersect(window_view_->bounds());
if (new_bounds == bounds_)
return;
bounds_changing_ = true;
bounds_ = new_bounds;
if (view_->size() != bounds_.size()) {
view_->SetSize(bounds_.size());
}
widget_->SetBounds(bounds_);
bounds_changing_ = false;
}
void CefOverlayViewHost::SetOverlayInsets(const CefInsets& insets) {
if (insets == insets_)
return;
insets_ = insets;
MoveIfNecessary();
}
void CefOverlayViewHost::OnViewBoundsChanged(views::View* observed_view) {
MoveIfNecessary();
}
gfx::Rect CefOverlayViewHost::ComputeBounds() const {
// This method is only used with corner docking.
DCHECK_NE(docking_mode_, CEF_DOCKING_MODE_CUSTOM);
// Find the area we have to work with.
const auto& widget_bounds = window_view_->bounds();
// Ask the view how large an area it needs to draw on.
const auto& prefsize = view_->GetPreferredSize();
// Swap left/right docking with RTL.
const bool is_rtl = base::i18n::IsRTL();
// Dock to the correct corner, considering insets in the docking corner only.
int x = widget_bounds.x();
int y = widget_bounds.y();
if (((docking_mode_ == CEF_DOCKING_MODE_TOP_RIGHT ||
docking_mode_ == CEF_DOCKING_MODE_BOTTOM_RIGHT) &&
!is_rtl) ||
((docking_mode_ == CEF_DOCKING_MODE_TOP_LEFT ||
docking_mode_ == CEF_DOCKING_MODE_BOTTOM_LEFT) &&
is_rtl)) {
x += widget_bounds.width() - prefsize.width() - insets_.right;
} else {
x += insets_.left;
}
if (docking_mode_ == CEF_DOCKING_MODE_BOTTOM_LEFT ||
docking_mode_ == CEF_DOCKING_MODE_BOTTOM_RIGHT) {
y += widget_bounds.height() - prefsize.height() - insets_.bottom;
} else {
y += insets_.top;
}
return gfx::Rect(x, y, prefsize.width(), prefsize.height());
}

View File

@@ -0,0 +1,79 @@
// Copyright 2021 The Chromium Embedded Framework Authors. Portions copyright
// 2011 The Chromium 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_VIEWS_OVERLAY_VIEW_HOST_H_
#define CEF_LIBCEF_BROWSER_VIEWS_OVERLAY_VIEW_HOST_H_
#pragma once
#include <memory>
#include "include/views/cef_overlay_controller.h"
#include "include/views/cef_view.h"
#include "base/compiler_specific.h"
#include "base/macros.h"
#include "ui/views/view_observer.h"
#include "ui/views/widget/widget_delegate.h"
class CefWindowView;
// Host class for a child Widget that behaves as an overlay control. Based on
// Chrome's DropdownBarHost.
class CefOverlayViewHost : public views::WidgetDelegate,
public views::ViewObserver {
public:
// |window_view| is the top-level view that contains this overlay.
CefOverlayViewHost(CefWindowView* window_view,
cef_docking_mode_t docking_mode);
// Initializes the CefOverlayViewHost. This creates the Widget that |view|
// paints into. |host_view| is the view whose position in the |window_view_|
// view hierarchy determines the z-order of the widget relative to views with
// layers and views with associated NativeViews.
void Init(views::View* host_view, CefRefPtr<CefView> view);
void Destroy();
void MoveIfNecessary();
void SetOverlayBounds(const gfx::Rect& bounds);
void SetOverlayInsets(const CefInsets& insets);
// views::ViewObserver methods:
void OnViewBoundsChanged(views::View* observed_view) override;
cef_docking_mode_t docking_mode() const { return docking_mode_; }
CefRefPtr<CefOverlayController> controller() const { return cef_controller_; }
CefWindowView* window_view() const { return window_view_; }
views::Widget* widget() const { return widget_.get(); }
views::View* view() const { return view_; }
gfx::Rect bounds() const { return bounds_; }
CefInsets insets() const { return insets_; }
private:
gfx::Rect ComputeBounds() const;
// The CefWindowView that created us.
CefWindowView* const window_view_;
const cef_docking_mode_t docking_mode_;
// Our view, which is responsible for drawing the UI.
views::View* view_ = nullptr;
// The Widget implementation that is created and maintained by the overlay.
// It contains |view_|.
std::unique_ptr<views::Widget> widget_;
CefRefPtr<CefOverlayController> cef_controller_;
gfx::Rect bounds_;
bool bounds_changing_ = false;
CefInsets insets_;
DISALLOW_COPY_AND_ASSIGN(CefOverlayViewHost);
};
#endif // CEF_LIBCEF_BROWSER_VIEWS_OVERLAY_VIEW_HOST_H_

View File

@@ -299,6 +299,7 @@
#include "base/logging.h"
#include "base/values.h"
#include "ui/views/background.h"
#include "ui/views/border.h"
#include "ui/views/view.h"
// Helpers for template boiler-plate.
@@ -384,6 +385,8 @@ CEF_VIEW_IMPL_T class CefViewImpl : public CefViewAdapter, public CefViewClass {
CefSize GetSize() override;
void SetPosition(const CefPoint& position) override;
CefPoint GetPosition() override;
void SetInsets(const CefInsets& insets) override;
CefInsets GetInsets() override;
CefSize GetPreferredSize() override;
void SizeToPreferredSize() override;
CefSize GetMinimumSize() override;
@@ -571,6 +574,20 @@ CEF_VIEW_IMPL_T CefPoint CEF_VIEW_IMPL_D::GetPosition() {
return CefPoint(bounds.x, bounds.y);
}
CEF_VIEW_IMPL_T void CEF_VIEW_IMPL_D::SetInsets(const CefInsets& insets) {
CEF_REQUIRE_VALID_RETURN_VOID();
gfx::Insets gfx_insets(insets.top, insets.left, insets.bottom, insets.right);
root_view()->SetBorder(
gfx_insets.IsEmpty() ? nullptr : views::CreateEmptyBorder(gfx_insets));
}
CEF_VIEW_IMPL_T CefInsets CEF_VIEW_IMPL_D::GetInsets() {
CEF_REQUIRE_VALID_RETURN(CefInsets());
const auto insets = root_view()->GetInsets();
return CefInsets(insets.top(), insets.left(), insets.bottom(),
insets.right());
}
CEF_VIEW_IMPL_T CefSize CEF_VIEW_IMPL_D::GetPreferredSize() {
CEF_REQUIRE_VALID_RETURN(CefSize());
const gfx::Size& size = root_view()->GetPreferredSize();

View File

@@ -20,6 +20,11 @@
#include "ui/display/win/screen_win.h"
#endif
#if defined(USE_AURA)
#include "ui/aura/window.h"
#include "ui/views/view_constants_aura.h"
#endif
namespace view_util {
namespace {
@@ -160,6 +165,18 @@ void ResumeOwnership(CefRefPtr<CefView> view) {
CefRefPtr<CefWindow> GetWindowFor(views::Widget* widget) {
CefRefPtr<CefWindow> window;
#if defined(USE_AURA)
// Retrieve the parent Widget for an overlay.
if (widget) {
// See matching logic in CefOverlayViewHost::Init.
auto widget_view =
widget->GetNativeView()->GetProperty(views::kHostViewKey);
if (widget_view) {
widget = widget_view->GetWidget();
}
}
#endif // defined(USE_AURA)
if (widget) {
// The views::WidgetDelegate should be a CefWindowView and |content_view|
// should be the same CefWindowView. However, just in case the views::Widget

View File

@@ -156,6 +156,13 @@ CEF_VIEW_VIEW_T void CEF_VIEW_VIEW_D::Layout() {
// If Layout() did not provide a size then use the preferred size.
if (ParentClass::size().IsEmpty())
ParentClass::SizeToPreferredSize();
if (cef_delegate()) {
const auto new_bounds = ParentClass::bounds();
CefRect new_rect(new_bounds.x(), new_bounds.y(), new_bounds.width(),
new_bounds.height());
cef_delegate()->OnLayoutChanged(GetCefView(), new_rect);
}
}
CEF_VIEW_VIEW_T void CEF_VIEW_VIEW_D::ViewHierarchyChanged(
@@ -202,8 +209,9 @@ CEF_VIEW_VIEW_T void CEF_VIEW_VIEW_D::NotifyChildViewChanged(
// Only notify for children that have a known CEF root view. For example,
// don't notify when ScrollView adds child scroll bars.
CefRefPtr<CefView> child = view_util::GetFor(details.child, false);
if (child)
if (child) {
cef_delegate()->OnChildViewChanged(GetCefView(), details.is_add, child);
}
}
CEF_VIEW_VIEW_T void CEF_VIEW_VIEW_D::NotifyParentViewChanged(
@@ -217,10 +225,11 @@ CEF_VIEW_VIEW_T void CEF_VIEW_VIEW_D::NotifyParentViewChanged(
return;
// The immediate parent might be an intermediate view so find the closest
// known CEF root view.
// known CEF root view. |parent| might be nullptr for overlays.
CefRefPtr<CefView> parent = view_util::GetFor(details.parent, true);
DCHECK(parent);
cef_delegate()->OnParentViewChanged(GetCefView(), details.is_add, parent);
if (parent) {
cef_delegate()->OnParentViewChanged(GetCefView(), details.is_add, parent);
}
}
#endif // CEF_LIBCEF_BROWSER_VIEWS_VIEW_VIEW_H_

View File

@@ -12,6 +12,7 @@
#include "libcef/browser/views/view_util.h"
#include "libcef/browser/views/window_view.h"
#include "base/i18n/rtl.h"
#include "ui/base/test/ui_controls.h"
#include "ui/compositor/compositor.h"
#include "ui/gfx/geometry/rect.h"
@@ -278,6 +279,15 @@ CefRefPtr<CefImage> CefWindowImpl::GetWindowAppIcon() {
return nullptr;
}
CefRefPtr<CefOverlayController> CefWindowImpl::AddOverlayView(
CefRefPtr<CefView> view,
cef_docking_mode_t docking_mode) {
CEF_REQUIRE_VALID_RETURN(nullptr);
if (root_view())
return root_view()->AddOverlayView(view, docking_mode);
return nullptr;
}
void CefWindowImpl::GetDebugInfo(base::DictionaryValue* info,
bool include_children) {
ParentClass::GetDebugInfo(info, include_children);

View File

@@ -58,6 +58,9 @@ class CefWindowImpl
CefRefPtr<CefImage> GetWindowIcon() override;
void SetWindowAppIcon(CefRefPtr<CefImage> image) override;
CefRefPtr<CefImage> GetWindowAppIcon() override;
CefRefPtr<CefOverlayController> AddOverlayView(
CefRefPtr<CefView> view,
cef_docking_mode_t docking_mode) override;
void ShowMenu(CefRefPtr<CefMenuModel> menu_model,
const CefPoint& screen_point,
cef_menu_anchor_position_t anchor_position) override;

View File

@@ -276,6 +276,22 @@ void CefWindowView::CreateWidget() {
SetCanResize(cef_delegate()->CanResize(cef_window));
const auto show_state = cef_delegate()->GetInitialShowState(cef_window);
switch (show_state) {
case CEF_SHOW_STATE_NORMAL:
params.show_state = ui::SHOW_STATE_NORMAL;
break;
case CEF_SHOW_STATE_MINIMIZED:
params.show_state = ui::SHOW_STATE_MINIMIZED;
break;
case CEF_SHOW_STATE_MAXIMIZED:
params.show_state = ui::SHOW_STATE_MAXIMIZED;
break;
case CEF_SHOW_STATE_FULLSCREEN:
params.show_state = ui::SHOW_STATE_FULLSCREEN;
break;
}
bool is_menu = false;
bool can_activate_menu = true;
CefRefPtr<CefWindow> parent_window = cef_delegate()->GetParentWindow(
@@ -312,6 +328,7 @@ void CefWindowView::CreateWidget() {
#endif
widget->Init(std::move(params));
widget->AddObserver(this);
// |widget| should now be associated with |this|.
DCHECK_EQ(widget, GetWidget());
@@ -465,6 +482,11 @@ void CefWindowView::ViewHierarchyChanged(
ParentClass::ViewHierarchyChanged(details);
}
void CefWindowView::OnWidgetBoundsChanged(views::Widget* widget,
const gfx::Rect& new_bounds) {
MoveOverlaysIfNecessary();
}
display::Display CefWindowView::GetDisplay() const {
const views::Widget* widget = GetWidget();
if (widget) {
@@ -500,6 +522,39 @@ void CefWindowView::SetWindowAppIcon(CefRefPtr<CefImage> window_app_icon) {
widget->UpdateWindowIcon();
}
CefRefPtr<CefOverlayController> CefWindowView::AddOverlayView(
CefRefPtr<CefView> view,
cef_docking_mode_t docking_mode) {
DCHECK(view.get());
DCHECK(view->IsValid());
if (!view.get() || !view->IsValid())
return nullptr;
views::Widget* widget = GetWidget();
if (widget) {
// Owned by the View hierarchy. Acts as a z-order reference for the overlay.
auto overlay_host_view = AddChildView(std::make_unique<views::View>());
overlay_hosts_.push_back(
std::make_unique<CefOverlayViewHost>(this, docking_mode));
auto& overlay_host = overlay_hosts_.back();
overlay_host->Init(overlay_host_view, view);
return overlay_host->controller();
}
return nullptr;
}
void CefWindowView::MoveOverlaysIfNecessary() {
if (overlay_hosts_.empty())
return;
for (auto& overlay_host : overlay_hosts_) {
overlay_host->MoveIfNecessary();
}
}
void CefWindowView::SetDraggableRegions(
const std::vector<CefDraggableRegion>& regions) {
if (regions.empty()) {

View File

@@ -6,19 +6,24 @@
#define CEF_LIBCEF_BROWSER_VIEWS_WINDOW_VIEW_H_
#pragma once
#include <vector>
#include "include/views/cef_window.h"
#include "include/views/cef_window_delegate.h"
#include "libcef/browser/views/overlay_view_host.h"
#include "libcef/browser/views/panel_view.h"
#include "third_party/skia/include/core/SkRegion.h"
#include "ui/display/display.h"
#include "ui/views/widget/widget_delegate.h"
#include "ui/views/widget/widget_observer.h"
// Manages the views-based root window. This object will be deleted
// automatically when the associated root window is destroyed.
class CefWindowView
: public CefPanelView<views::WidgetDelegateView, CefWindowDelegate> {
: public CefPanelView<views::WidgetDelegateView, CefWindowDelegate>,
public views::WidgetObserver {
public:
typedef CefPanelView<views::WidgetDelegateView, CefWindowDelegate>
ParentClass;
@@ -70,6 +75,10 @@ class CefWindowView
void ViewHierarchyChanged(
const views::ViewHierarchyChangedDetails& details) override;
// views::WidgetObserver methods:
void OnWidgetBoundsChanged(views::Widget* widget,
const gfx::Rect& new_bounds) override;
// Returns the Display containing this Window.
display::Display GetDisplay() const;
@@ -89,6 +98,10 @@ class CefWindowView
void SetWindowAppIcon(CefRefPtr<CefImage> window_app_icon);
CefRefPtr<CefImage> window_app_icon() const { return window_app_icon_; }
CefRefPtr<CefOverlayController> AddOverlayView(
CefRefPtr<CefView> view,
cef_docking_mode_t docking_mode);
// Set/get the draggable regions.
void SetDraggableRegions(const std::vector<CefDraggableRegion>& regions);
SkRegion* draggable_region() const { return draggable_region_.get(); }
@@ -100,6 +113,8 @@ class CefWindowView
// Called when removed from the Widget and before |this| is deleted.
void DeleteDelegate();
void MoveOverlaysIfNecessary();
// Not owned by this object.
Delegate* window_delegate_;
@@ -112,6 +127,9 @@ class CefWindowView
std::unique_ptr<SkRegion> draggable_region_;
// Hosts for overlay widgets.
std::vector<std::unique_ptr<CefOverlayViewHost>> overlay_hosts_;
DISALLOW_COPY_AND_ASSIGN(CefWindowView);
};

View File

@@ -31,6 +31,7 @@
#include "components/component_updater/component_updater_paths.h"
#include "components/content_settings/core/common/content_settings_pattern.h"
#include "components/embedder_support/switches.h"
#include "components/spellcheck/common/spellcheck_features.h"
#include "components/viz/common/features.h"
#include "content/public/common/content_features.h"
#include "content/public/common/content_switches.h"
@@ -49,6 +50,10 @@
#include "libcef/common/util_mac.h"
#endif
#if defined(OS_WIN)
#include "ui/base/resource/resource_bundle_win.h"
#endif
namespace {
const char* const kNonWildcardDomainNonPortSchemes[] = {
@@ -246,6 +251,12 @@ bool AlloyMainDelegate::BasicStartupComplete(int* exit_code) {
disable_features.push_back(features::kCalculateNativeWinOcclusion.name);
}
if (spellcheck::kWinUseBrowserSpellChecker.default_state ==
base::FEATURE_ENABLED_BY_DEFAULT) {
// TODO: Add support for windows spellcheck service (see issue #3055).
disable_features.push_back(spellcheck::kWinUseBrowserSpellChecker.name);
}
if (!disable_features.empty()) {
DCHECK(!base::FeatureList::GetInstance());
std::string disable_features_str =
@@ -491,6 +502,20 @@ void AlloyMainDelegate::InitializeResourceBundle() {
if (!locales_dir.empty())
base::PathService::Override(ui::DIR_LOCALES, locales_dir);
}
#if defined(OS_WIN)
// From chrome/app/chrome_main_delegate.cc
// Throbber icons and cursors are still stored in chrome.dll,
// this can be killed once those are merged into resources.pak. See
// GlassBrowserFrameView::InitThrobberIcons(), https://crbug.com/368327 and
// https://crbug.com/1178117.
auto module_handle =
::GetModuleHandle(CefAppManager::Get()->GetResourceDllName());
if (!module_handle)
module_handle = ::GetModuleHandle(NULL);
ui::SetResourcesDataDLL(module_handle);
#endif
std::string locale = command_line->GetSwitchValueASCII(switches::kLang);
DCHECK(!locale.empty());

View File

@@ -120,8 +120,12 @@ bool CefDragDataImpl::GetFileNames(std::vector<CefString>& names) {
return false;
std::vector<ui::FileInfo>::const_iterator it = data_.filenames.begin();
for (; it != data_.filenames.end(); ++it)
names.push_back(it->path.value());
for (; it != data_.filenames.end(); ++it) {
auto name = it->display_name.value();
if (name.empty())
name = it->path.value();
names.push_back(name);
}
return true;
}

View File

@@ -0,0 +1,11 @@
// Copyright 2021 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.
#include "include/cef_i18n_util.h"
#include "base/i18n/rtl.h"
bool CefIsRTL() {
return base::i18n::IsRTL();
}

View File

@@ -335,6 +335,12 @@ void CefFrameImpl::OnDidFinishLoad() {
}
void CefFrameImpl::OnDraggableRegionsChanged() {
// Match the behavior in ChromeRenderFrameObserver::DraggableRegionsChanged.
// Only the main frame is allowed to control draggable regions, to avoid other
// frames manipulate the regions in the browser process.
if (frame_->Parent() != nullptr)
return;
blink::WebVector<blink::WebDraggableRegion> webregions =
frame_->GetDocument().DraggableRegions();
std::vector<cef::mojom::DraggableRegionEntryPtr> regions;
@@ -508,6 +514,11 @@ void CefFrameImpl::DidStopLoading() {
// the same browser then the other occurrences will be discarded in
// OnLoadingStateChange.
browser_->OnLoadingStateChange(false);
// Refresh draggable regions. Otherwise, we may not receive updated regions
// after navigation because LocalFrameView::UpdateDocumentAnnotatedRegion
// lacks sufficient context.
OnDraggableRegionsChanged();
}
void CefFrameImpl::MoveOrResizeStarted() {

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=4d483792f68dc51dbc52722820a15795c4a1baad$
// $hash=55d17a525f5a5a35a3b75f3636ddecb10bf37b99$
//
#include "libcef_dll/cpptoc/frame_handler_cpptoc.h"
@@ -49,7 +49,8 @@ frame_handler_on_frame_created(struct _cef_frame_handler_t* self,
void CEF_CALLBACK
frame_handler_on_frame_attached(struct _cef_frame_handler_t* self,
cef_browser_t* browser,
cef_frame_t* frame) {
cef_frame_t* frame,
int reattached) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@@ -68,7 +69,8 @@ frame_handler_on_frame_attached(struct _cef_frame_handler_t* self,
// Execute
CefFrameHandlerCppToC::Get(self)->OnFrameAttached(
CefBrowserCToCpp::Wrap(browser), CefFrameCToCpp::Wrap(frame));
CefBrowserCToCpp::Wrap(browser), CefFrameCToCpp::Wrap(frame),
reattached ? true : false);
}
void CEF_CALLBACK

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=312985bb5cc971d1fe9d77af1f985f6a544e9db5$
// $hash=7cbe7d4732eae535d759b62e718f5ab2de570f0a$
//
#include "libcef_dll/cpptoc/views/browser_view_cpptoc.h"
@@ -606,6 +606,46 @@ cef_point_t CEF_CALLBACK browser_view_get_position(struct _cef_view_t* self) {
return _retval;
}
void CEF_CALLBACK browser_view_set_insets(struct _cef_view_t* self,
const cef_insets_t* insets) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: insets; type: simple_byref_const
DCHECK(insets);
if (!insets)
return;
// Translate param: insets; type: simple_byref_const
CefInsets insetsVal = insets ? *insets : CefInsets();
// Execute
CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(self))
->SetInsets(insetsVal);
}
cef_insets_t CEF_CALLBACK browser_view_get_insets(struct _cef_view_t* self) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return CefInsets();
// Execute
cef_insets_t _retval =
CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(self))
->GetInsets();
// Return type: simple
return _retval;
}
cef_size_t CEF_CALLBACK
browser_view_get_preferred_size(struct _cef_view_t* self) {
shutdown_checker::AssertNotShutdown();
@@ -1120,6 +1160,8 @@ CefBrowserViewCppToC::CefBrowserViewCppToC() {
GetStruct()->base.get_size = browser_view_get_size;
GetStruct()->base.set_position = browser_view_set_position;
GetStruct()->base.get_position = browser_view_get_position;
GetStruct()->base.set_insets = browser_view_set_insets;
GetStruct()->base.get_insets = browser_view_get_insets;
GetStruct()->base.get_preferred_size = browser_view_get_preferred_size;
GetStruct()->base.size_to_preferred_size =
browser_view_size_to_preferred_size;

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=8e8daae6a8ed718582045ea42e16906813b77337$
// $hash=3067f33d10bbd2f7555a6a809bad7ea8e97dbece$
//
#include "libcef_dll/cpptoc/views/browser_view_delegate_cpptoc.h"
@@ -343,6 +343,35 @@ browser_view_delegate_on_window_changed(struct _cef_view_delegate_t* self,
->OnWindowChanged(CefViewCToCpp::Wrap(view), added ? true : false);
}
void CEF_CALLBACK
browser_view_delegate_on_layout_changed(struct _cef_view_delegate_t* self,
cef_view_t* view,
const cef_rect_t* new_bounds) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: view; type: refptr_diff
DCHECK(view);
if (!view)
return;
// Verify param: new_bounds; type: simple_byref_const
DCHECK(new_bounds);
if (!new_bounds)
return;
// Translate param: new_bounds; type: simple_byref_const
CefRect new_boundsVal = new_bounds ? *new_bounds : CefRect();
// Execute
CefBrowserViewDelegateCppToC::Get(
reinterpret_cast<cef_browser_view_delegate_t*>(self))
->OnLayoutChanged(CefViewCToCpp::Wrap(view), new_boundsVal);
}
void CEF_CALLBACK
browser_view_delegate_on_focus(struct _cef_view_delegate_t* self,
cef_view_t* view) {
@@ -410,6 +439,7 @@ CefBrowserViewDelegateCppToC::CefBrowserViewDelegateCppToC() {
GetStruct()->base.on_child_view_changed =
browser_view_delegate_on_child_view_changed;
GetStruct()->base.on_window_changed = browser_view_delegate_on_window_changed;
GetStruct()->base.on_layout_changed = browser_view_delegate_on_layout_changed;
GetStruct()->base.on_focus = browser_view_delegate_on_focus;
GetStruct()->base.on_blur = browser_view_delegate_on_blur;
}

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=a0060b09d6eb4bbeeb69e4b80dccccee394d600e$
// $hash=328f5caabb9eb92f668961216f9812b2a9bc3ee7$
//
#include "libcef_dll/cpptoc/views/button_cpptoc.h"
@@ -580,6 +580,45 @@ cef_point_t CEF_CALLBACK button_get_position(struct _cef_view_t* self) {
return _retval;
}
void CEF_CALLBACK button_set_insets(struct _cef_view_t* self,
const cef_insets_t* insets) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: insets; type: simple_byref_const
DCHECK(insets);
if (!insets)
return;
// Translate param: insets; type: simple_byref_const
CefInsets insetsVal = insets ? *insets : CefInsets();
// Execute
CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))
->SetInsets(insetsVal);
}
cef_insets_t CEF_CALLBACK button_get_insets(struct _cef_view_t* self) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return CefInsets();
// Execute
cef_insets_t _retval =
CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))->GetInsets();
// Return type: simple
return _retval;
}
cef_size_t CEF_CALLBACK button_get_preferred_size(struct _cef_view_t* self) {
shutdown_checker::AssertNotShutdown();
@@ -1076,6 +1115,8 @@ CefButtonCppToC::CefButtonCppToC() {
GetStruct()->base.get_size = button_get_size;
GetStruct()->base.set_position = button_set_position;
GetStruct()->base.get_position = button_get_position;
GetStruct()->base.set_insets = button_set_insets;
GetStruct()->base.get_insets = button_get_insets;
GetStruct()->base.get_preferred_size = button_get_preferred_size;
GetStruct()->base.size_to_preferred_size = button_size_to_preferred_size;
GetStruct()->base.get_minimum_size = button_get_minimum_size;

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=52a0deb8b7ae62e474acb1474cf922c3e9a04f14$
// $hash=ae5b6dce4c1840faa597c2dcb2b92772fa4f8de4$
//
#include "libcef_dll/cpptoc/views/button_delegate_cpptoc.h"
@@ -234,6 +234,34 @@ button_delegate_on_window_changed(struct _cef_view_delegate_t* self,
->OnWindowChanged(CefViewCToCpp::Wrap(view), added ? true : false);
}
void CEF_CALLBACK
button_delegate_on_layout_changed(struct _cef_view_delegate_t* self,
cef_view_t* view,
const cef_rect_t* new_bounds) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: view; type: refptr_diff
DCHECK(view);
if (!view)
return;
// Verify param: new_bounds; type: simple_byref_const
DCHECK(new_bounds);
if (!new_bounds)
return;
// Translate param: new_bounds; type: simple_byref_const
CefRect new_boundsVal = new_bounds ? *new_bounds : CefRect();
// Execute
CefButtonDelegateCppToC::Get(reinterpret_cast<cef_button_delegate_t*>(self))
->OnLayoutChanged(CefViewCToCpp::Wrap(view), new_boundsVal);
}
void CEF_CALLBACK button_delegate_on_focus(struct _cef_view_delegate_t* self,
cef_view_t* view) {
shutdown_checker::AssertNotShutdown();
@@ -289,6 +317,7 @@ CefButtonDelegateCppToC::CefButtonDelegateCppToC() {
GetStruct()->base.on_child_view_changed =
button_delegate_on_child_view_changed;
GetStruct()->base.on_window_changed = button_delegate_on_window_changed;
GetStruct()->base.on_layout_changed = button_delegate_on_layout_changed;
GetStruct()->base.on_focus = button_delegate_on_focus;
GetStruct()->base.on_blur = button_delegate_on_blur;
}

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=f723bc389e8df80f926a3e1952d9ba0241fcb494$
// $hash=4831a878243309dc259eea8ac107a2654b0da9fd$
//
#include "libcef_dll/cpptoc/views/label_button_cpptoc.h"
@@ -826,6 +826,46 @@ cef_point_t CEF_CALLBACK label_button_get_position(struct _cef_view_t* self) {
return _retval;
}
void CEF_CALLBACK label_button_set_insets(struct _cef_view_t* self,
const cef_insets_t* insets) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: insets; type: simple_byref_const
DCHECK(insets);
if (!insets)
return;
// Translate param: insets; type: simple_byref_const
CefInsets insetsVal = insets ? *insets : CefInsets();
// Execute
CefLabelButtonCppToC::Get(reinterpret_cast<cef_label_button_t*>(self))
->SetInsets(insetsVal);
}
cef_insets_t CEF_CALLBACK label_button_get_insets(struct _cef_view_t* self) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return CefInsets();
// Execute
cef_insets_t _retval =
CefLabelButtonCppToC::Get(reinterpret_cast<cef_label_button_t*>(self))
->GetInsets();
// Return type: simple
return _retval;
}
cef_size_t CEF_CALLBACK
label_button_get_preferred_size(struct _cef_view_t* self) {
shutdown_checker::AssertNotShutdown();
@@ -1355,6 +1395,8 @@ CefLabelButtonCppToC::CefLabelButtonCppToC() {
GetStruct()->base.base.get_size = label_button_get_size;
GetStruct()->base.base.set_position = label_button_set_position;
GetStruct()->base.base.get_position = label_button_get_position;
GetStruct()->base.base.set_insets = label_button_set_insets;
GetStruct()->base.base.get_insets = label_button_get_insets;
GetStruct()->base.base.get_preferred_size = label_button_get_preferred_size;
GetStruct()->base.base.size_to_preferred_size =
label_button_size_to_preferred_size;

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=97c8a26550af49abfe4a1fcf1d8d54193c5fb3b1$
// $hash=17a2490a2076439fca2ee7e6c2984f9307b880fc$
//
#include "libcef_dll/cpptoc/views/menu_button_cpptoc.h"
@@ -878,6 +878,46 @@ cef_point_t CEF_CALLBACK menu_button_get_position(struct _cef_view_t* self) {
return _retval;
}
void CEF_CALLBACK menu_button_set_insets(struct _cef_view_t* self,
const cef_insets_t* insets) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: insets; type: simple_byref_const
DCHECK(insets);
if (!insets)
return;
// Translate param: insets; type: simple_byref_const
CefInsets insetsVal = insets ? *insets : CefInsets();
// Execute
CefMenuButtonCppToC::Get(reinterpret_cast<cef_menu_button_t*>(self))
->SetInsets(insetsVal);
}
cef_insets_t CEF_CALLBACK menu_button_get_insets(struct _cef_view_t* self) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return CefInsets();
// Execute
cef_insets_t _retval =
CefMenuButtonCppToC::Get(reinterpret_cast<cef_menu_button_t*>(self))
->GetInsets();
// Return type: simple
return _retval;
}
cef_size_t CEF_CALLBACK
menu_button_get_preferred_size(struct _cef_view_t* self) {
shutdown_checker::AssertNotShutdown();
@@ -1407,6 +1447,8 @@ CefMenuButtonCppToC::CefMenuButtonCppToC() {
GetStruct()->base.base.base.get_size = menu_button_get_size;
GetStruct()->base.base.base.set_position = menu_button_set_position;
GetStruct()->base.base.base.get_position = menu_button_get_position;
GetStruct()->base.base.base.set_insets = menu_button_set_insets;
GetStruct()->base.base.base.get_insets = menu_button_get_insets;
GetStruct()->base.base.base.get_preferred_size =
menu_button_get_preferred_size;
GetStruct()->base.base.base.size_to_preferred_size =

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=2fcd1d4d2126285209e1fa782beccbb363693bf3$
// $hash=36a7761d47db5574fc6504b42a988e9f12ef234c$
//
#include "libcef_dll/cpptoc/views/menu_button_delegate_cpptoc.h"
@@ -274,6 +274,35 @@ menu_button_delegate_on_window_changed(struct _cef_view_delegate_t* self,
->OnWindowChanged(CefViewCToCpp::Wrap(view), added ? true : false);
}
void CEF_CALLBACK
menu_button_delegate_on_layout_changed(struct _cef_view_delegate_t* self,
cef_view_t* view,
const cef_rect_t* new_bounds) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: view; type: refptr_diff
DCHECK(view);
if (!view)
return;
// Verify param: new_bounds; type: simple_byref_const
DCHECK(new_bounds);
if (!new_bounds)
return;
// Translate param: new_bounds; type: simple_byref_const
CefRect new_boundsVal = new_bounds ? *new_bounds : CefRect();
// Execute
CefMenuButtonDelegateCppToC::Get(
reinterpret_cast<cef_menu_button_delegate_t*>(self))
->OnLayoutChanged(CefViewCToCpp::Wrap(view), new_boundsVal);
}
void CEF_CALLBACK
menu_button_delegate_on_focus(struct _cef_view_delegate_t* self,
cef_view_t* view) {
@@ -340,6 +369,8 @@ CefMenuButtonDelegateCppToC::CefMenuButtonDelegateCppToC() {
menu_button_delegate_on_child_view_changed;
GetStruct()->base.base.on_window_changed =
menu_button_delegate_on_window_changed;
GetStruct()->base.base.on_layout_changed =
menu_button_delegate_on_layout_changed;
GetStruct()->base.base.on_focus = menu_button_delegate_on_focus;
GetStruct()->base.base.on_blur = menu_button_delegate_on_blur;
}

View File

@@ -0,0 +1,416 @@
// Copyright (c) 2021 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.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=5f6f27874fc4e0ee698920fa734254eac9d14efa$
//
#include "libcef_dll/cpptoc/views/overlay_controller_cpptoc.h"
#include "libcef_dll/cpptoc/views/view_cpptoc.h"
#include "libcef_dll/cpptoc/views/window_cpptoc.h"
#include "libcef_dll/shutdown_checker.h"
namespace {
// MEMBER FUNCTIONS - Body may be edited by hand.
int CEF_CALLBACK
overlay_controller_is_valid(struct _cef_overlay_controller_t* self) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefOverlayControllerCppToC::Get(self)->IsValid();
// Return type: bool
return _retval;
}
int CEF_CALLBACK
overlay_controller_is_same(struct _cef_overlay_controller_t* self,
struct _cef_overlay_controller_t* that) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: that; type: refptr_same
DCHECK(that);
if (!that)
return 0;
// Execute
bool _retval = CefOverlayControllerCppToC::Get(self)->IsSame(
CefOverlayControllerCppToC::Unwrap(that));
// Return type: bool
return _retval;
}
struct _cef_view_t* CEF_CALLBACK
overlay_controller_get_contents_view(struct _cef_overlay_controller_t* self) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefRefPtr<CefView> _retval =
CefOverlayControllerCppToC::Get(self)->GetContentsView();
// Return type: refptr_same
return CefViewCppToC::Wrap(_retval);
}
struct _cef_window_t* CEF_CALLBACK
overlay_controller_get_window(struct _cef_overlay_controller_t* self) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefRefPtr<CefWindow> _retval =
CefOverlayControllerCppToC::Get(self)->GetWindow();
// Return type: refptr_same
return CefWindowCppToC::Wrap(_retval);
}
cef_docking_mode_t CEF_CALLBACK
overlay_controller_get_docking_mode(struct _cef_overlay_controller_t* self) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return CEF_DOCKING_MODE_TOP_LEFT;
// Execute
cef_docking_mode_t _retval =
CefOverlayControllerCppToC::Get(self)->GetDockingMode();
// Return type: simple
return _retval;
}
void CEF_CALLBACK
overlay_controller_destroy(struct _cef_overlay_controller_t* self) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefOverlayControllerCppToC::Get(self)->Destroy();
}
void CEF_CALLBACK
overlay_controller_set_bounds(struct _cef_overlay_controller_t* self,
const cef_rect_t* bounds) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: bounds; type: simple_byref_const
DCHECK(bounds);
if (!bounds)
return;
// Translate param: bounds; type: simple_byref_const
CefRect boundsVal = bounds ? *bounds : CefRect();
// Execute
CefOverlayControllerCppToC::Get(self)->SetBounds(boundsVal);
}
cef_rect_t CEF_CALLBACK
overlay_controller_get_bounds(struct _cef_overlay_controller_t* self) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return CefRect();
// Execute
cef_rect_t _retval = CefOverlayControllerCppToC::Get(self)->GetBounds();
// Return type: simple
return _retval;
}
cef_rect_t CEF_CALLBACK overlay_controller_get_bounds_in_screen(
struct _cef_overlay_controller_t* self) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return CefRect();
// Execute
cef_rect_t _retval =
CefOverlayControllerCppToC::Get(self)->GetBoundsInScreen();
// Return type: simple
return _retval;
}
void CEF_CALLBACK
overlay_controller_set_size(struct _cef_overlay_controller_t* self,
const cef_size_t* size) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: size; type: simple_byref_const
DCHECK(size);
if (!size)
return;
// Translate param: size; type: simple_byref_const
CefSize sizeVal = size ? *size : CefSize();
// Execute
CefOverlayControllerCppToC::Get(self)->SetSize(sizeVal);
}
cef_size_t CEF_CALLBACK
overlay_controller_get_size(struct _cef_overlay_controller_t* self) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return CefSize();
// Execute
cef_size_t _retval = CefOverlayControllerCppToC::Get(self)->GetSize();
// Return type: simple
return _retval;
}
void CEF_CALLBACK
overlay_controller_set_position(struct _cef_overlay_controller_t* self,
const cef_point_t* position) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: position; type: simple_byref_const
DCHECK(position);
if (!position)
return;
// Translate param: position; type: simple_byref_const
CefPoint positionVal = position ? *position : CefPoint();
// Execute
CefOverlayControllerCppToC::Get(self)->SetPosition(positionVal);
}
cef_point_t CEF_CALLBACK
overlay_controller_get_position(struct _cef_overlay_controller_t* self) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return CefPoint();
// Execute
cef_point_t _retval = CefOverlayControllerCppToC::Get(self)->GetPosition();
// Return type: simple
return _retval;
}
void CEF_CALLBACK
overlay_controller_set_insets(struct _cef_overlay_controller_t* self,
const cef_insets_t* insets) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: insets; type: simple_byref_const
DCHECK(insets);
if (!insets)
return;
// Translate param: insets; type: simple_byref_const
CefInsets insetsVal = insets ? *insets : CefInsets();
// Execute
CefOverlayControllerCppToC::Get(self)->SetInsets(insetsVal);
}
cef_insets_t CEF_CALLBACK
overlay_controller_get_insets(struct _cef_overlay_controller_t* self) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return CefInsets();
// Execute
cef_insets_t _retval = CefOverlayControllerCppToC::Get(self)->GetInsets();
// Return type: simple
return _retval;
}
void CEF_CALLBACK overlay_controller_size_to_preferred_size(
struct _cef_overlay_controller_t* self) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefOverlayControllerCppToC::Get(self)->SizeToPreferredSize();
}
void CEF_CALLBACK
overlay_controller_set_visible(struct _cef_overlay_controller_t* self,
int visible) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefOverlayControllerCppToC::Get(self)->SetVisible(visible ? true : false);
}
int CEF_CALLBACK
overlay_controller_is_visible(struct _cef_overlay_controller_t* self) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefOverlayControllerCppToC::Get(self)->IsVisible();
// Return type: bool
return _retval;
}
int CEF_CALLBACK
overlay_controller_is_drawn(struct _cef_overlay_controller_t* self) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefOverlayControllerCppToC::Get(self)->IsDrawn();
// Return type: bool
return _retval;
}
} // namespace
// CONSTRUCTOR - Do not edit by hand.
CefOverlayControllerCppToC::CefOverlayControllerCppToC() {
GetStruct()->is_valid = overlay_controller_is_valid;
GetStruct()->is_same = overlay_controller_is_same;
GetStruct()->get_contents_view = overlay_controller_get_contents_view;
GetStruct()->get_window = overlay_controller_get_window;
GetStruct()->get_docking_mode = overlay_controller_get_docking_mode;
GetStruct()->destroy = overlay_controller_destroy;
GetStruct()->set_bounds = overlay_controller_set_bounds;
GetStruct()->get_bounds = overlay_controller_get_bounds;
GetStruct()->get_bounds_in_screen = overlay_controller_get_bounds_in_screen;
GetStruct()->set_size = overlay_controller_set_size;
GetStruct()->get_size = overlay_controller_get_size;
GetStruct()->set_position = overlay_controller_set_position;
GetStruct()->get_position = overlay_controller_get_position;
GetStruct()->set_insets = overlay_controller_set_insets;
GetStruct()->get_insets = overlay_controller_get_insets;
GetStruct()->size_to_preferred_size =
overlay_controller_size_to_preferred_size;
GetStruct()->set_visible = overlay_controller_set_visible;
GetStruct()->is_visible = overlay_controller_is_visible;
GetStruct()->is_drawn = overlay_controller_is_drawn;
}
// DESTRUCTOR - Do not edit by hand.
CefOverlayControllerCppToC::~CefOverlayControllerCppToC() {
shutdown_checker::AssertNotShutdown();
}
template <>
CefRefPtr<CefOverlayController> CefCppToCRefCounted<
CefOverlayControllerCppToC,
CefOverlayController,
cef_overlay_controller_t>::UnwrapDerived(CefWrapperType type,
cef_overlay_controller_t* s) {
NOTREACHED() << "Unexpected class type: " << type;
return nullptr;
}
template <>
CefWrapperType CefCppToCRefCounted<CefOverlayControllerCppToC,
CefOverlayController,
cef_overlay_controller_t>::kWrapperType =
WT_OVERLAY_CONTROLLER;

View File

@@ -0,0 +1,42 @@
// Copyright (c) 2021 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.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=a35c34c93f38c7db53ddd261a1631ef52d0f5ab5$
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_OVERLAY_CONTROLLER_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_VIEWS_OVERLAY_CONTROLLER_CPPTOC_H_
#pragma once
#if !defined(BUILDING_CEF_SHARED)
#error This file can be included DLL-side only
#endif
#include "include/capi/views/cef_overlay_controller_capi.h"
#include "include/capi/views/cef_view_capi.h"
#include "include/capi/views/cef_window_capi.h"
#include "include/views/cef_overlay_controller.h"
#include "include/views/cef_view.h"
#include "include/views/cef_window.h"
#include "libcef_dll/cpptoc/cpptoc_ref_counted.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed DLL-side only.
class CefOverlayControllerCppToC
: public CefCppToCRefCounted<CefOverlayControllerCppToC,
CefOverlayController,
cef_overlay_controller_t> {
public:
CefOverlayControllerCppToC();
virtual ~CefOverlayControllerCppToC();
};
#endif // CEF_LIBCEF_DLL_CPPTOC_VIEWS_OVERLAY_CONTROLLER_CPPTOC_H_

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=46ba2afdb3ede88d0eb37df2726ab5ff33fb6983$
// $hash=6a2e3823506ccfeeff53ac719edf6e912056e3a3$
//
#include "libcef_dll/cpptoc/views/panel_cpptoc.h"
@@ -713,6 +713,45 @@ cef_point_t CEF_CALLBACK panel_get_position(struct _cef_view_t* self) {
return _retval;
}
void CEF_CALLBACK panel_set_insets(struct _cef_view_t* self,
const cef_insets_t* insets) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: insets; type: simple_byref_const
DCHECK(insets);
if (!insets)
return;
// Translate param: insets; type: simple_byref_const
CefInsets insetsVal = insets ? *insets : CefInsets();
// Execute
CefPanelCppToC::Get(reinterpret_cast<cef_panel_t*>(self))
->SetInsets(insetsVal);
}
cef_insets_t CEF_CALLBACK panel_get_insets(struct _cef_view_t* self) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return CefInsets();
// Execute
cef_insets_t _retval =
CefPanelCppToC::Get(reinterpret_cast<cef_panel_t*>(self))->GetInsets();
// Return type: simple
return _retval;
}
cef_size_t CEF_CALLBACK panel_get_preferred_size(struct _cef_view_t* self) {
shutdown_checker::AssertNotShutdown();
@@ -1210,6 +1249,8 @@ CefPanelCppToC::CefPanelCppToC() {
GetStruct()->base.get_size = panel_get_size;
GetStruct()->base.set_position = panel_set_position;
GetStruct()->base.get_position = panel_get_position;
GetStruct()->base.set_insets = panel_set_insets;
GetStruct()->base.get_insets = panel_get_insets;
GetStruct()->base.get_preferred_size = panel_get_preferred_size;
GetStruct()->base.size_to_preferred_size = panel_size_to_preferred_size;
GetStruct()->base.get_minimum_size = panel_get_minimum_size;

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=dd29f2990766a766a27dece7e39501eb11a296fd$
// $hash=d212d26c4fdb8c0b24a9f1ea12d0a402b8466995$
//
#include "libcef_dll/cpptoc/views/panel_delegate_cpptoc.h"
@@ -193,6 +193,34 @@ panel_delegate_on_window_changed(struct _cef_view_delegate_t* self,
->OnWindowChanged(CefViewCToCpp::Wrap(view), added ? true : false);
}
void CEF_CALLBACK
panel_delegate_on_layout_changed(struct _cef_view_delegate_t* self,
cef_view_t* view,
const cef_rect_t* new_bounds) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: view; type: refptr_diff
DCHECK(view);
if (!view)
return;
// Verify param: new_bounds; type: simple_byref_const
DCHECK(new_bounds);
if (!new_bounds)
return;
// Translate param: new_bounds; type: simple_byref_const
CefRect new_boundsVal = new_bounds ? *new_bounds : CefRect();
// Execute
CefPanelDelegateCppToC::Get(reinterpret_cast<cef_panel_delegate_t*>(self))
->OnLayoutChanged(CefViewCToCpp::Wrap(view), new_boundsVal);
}
void CEF_CALLBACK panel_delegate_on_focus(struct _cef_view_delegate_t* self,
cef_view_t* view) {
shutdown_checker::AssertNotShutdown();
@@ -245,6 +273,7 @@ CefPanelDelegateCppToC::CefPanelDelegateCppToC() {
GetStruct()->base.on_child_view_changed =
panel_delegate_on_child_view_changed;
GetStruct()->base.on_window_changed = panel_delegate_on_window_changed;
GetStruct()->base.on_layout_changed = panel_delegate_on_layout_changed;
GetStruct()->base.on_focus = panel_delegate_on_focus;
GetStruct()->base.on_blur = panel_delegate_on_blur;
}

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=88d6df521d18ef28e9e2e7cbe31ecf6c96351430$
// $hash=1b422791d4b286e5113f4867aa8da38e21e2a2ed$
//
#include "libcef_dll/cpptoc/views/scroll_view_cpptoc.h"
@@ -634,6 +634,46 @@ cef_point_t CEF_CALLBACK scroll_view_get_position(struct _cef_view_t* self) {
return _retval;
}
void CEF_CALLBACK scroll_view_set_insets(struct _cef_view_t* self,
const cef_insets_t* insets) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: insets; type: simple_byref_const
DCHECK(insets);
if (!insets)
return;
// Translate param: insets; type: simple_byref_const
CefInsets insetsVal = insets ? *insets : CefInsets();
// Execute
CefScrollViewCppToC::Get(reinterpret_cast<cef_scroll_view_t*>(self))
->SetInsets(insetsVal);
}
cef_insets_t CEF_CALLBACK scroll_view_get_insets(struct _cef_view_t* self) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return CefInsets();
// Execute
cef_insets_t _retval =
CefScrollViewCppToC::Get(reinterpret_cast<cef_scroll_view_t*>(self))
->GetInsets();
// Return type: simple
return _retval;
}
cef_size_t CEF_CALLBACK
scroll_view_get_preferred_size(struct _cef_view_t* self) {
shutdown_checker::AssertNotShutdown();
@@ -1149,6 +1189,8 @@ CefScrollViewCppToC::CefScrollViewCppToC() {
GetStruct()->base.get_size = scroll_view_get_size;
GetStruct()->base.set_position = scroll_view_set_position;
GetStruct()->base.get_position = scroll_view_get_position;
GetStruct()->base.set_insets = scroll_view_set_insets;
GetStruct()->base.get_insets = scroll_view_get_insets;
GetStruct()->base.get_preferred_size = scroll_view_get_preferred_size;
GetStruct()->base.size_to_preferred_size = scroll_view_size_to_preferred_size;
GetStruct()->base.get_minimum_size = scroll_view_get_minimum_size;

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=fd6b1cf787b563525dac101a765b7c399356e00c$
// $hash=41aa4a08d59759dd53429976da36299374a554d7$
//
#include "libcef_dll/cpptoc/views/textfield_cpptoc.h"
@@ -1035,6 +1035,46 @@ cef_point_t CEF_CALLBACK textfield_get_position(struct _cef_view_t* self) {
return _retval;
}
void CEF_CALLBACK textfield_set_insets(struct _cef_view_t* self,
const cef_insets_t* insets) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: insets; type: simple_byref_const
DCHECK(insets);
if (!insets)
return;
// Translate param: insets; type: simple_byref_const
CefInsets insetsVal = insets ? *insets : CefInsets();
// Execute
CefTextfieldCppToC::Get(reinterpret_cast<cef_textfield_t*>(self))
->SetInsets(insetsVal);
}
cef_insets_t CEF_CALLBACK textfield_get_insets(struct _cef_view_t* self) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return CefInsets();
// Execute
cef_insets_t _retval =
CefTextfieldCppToC::Get(reinterpret_cast<cef_textfield_t*>(self))
->GetInsets();
// Return type: simple
return _retval;
}
cef_size_t CEF_CALLBACK textfield_get_preferred_size(struct _cef_view_t* self) {
shutdown_checker::AssertNotShutdown();
@@ -1572,6 +1612,8 @@ CefTextfieldCppToC::CefTextfieldCppToC() {
GetStruct()->base.get_size = textfield_get_size;
GetStruct()->base.set_position = textfield_set_position;
GetStruct()->base.get_position = textfield_get_position;
GetStruct()->base.set_insets = textfield_set_insets;
GetStruct()->base.get_insets = textfield_get_insets;
GetStruct()->base.get_preferred_size = textfield_get_preferred_size;
GetStruct()->base.size_to_preferred_size = textfield_size_to_preferred_size;
GetStruct()->base.get_minimum_size = textfield_get_minimum_size;

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=e35b635ec442c8910b02aca64d48760b1360c868$
// $hash=9c22ccd70661c2c23bc5bbb6f80f4b04d42c90fe$
//
#include "libcef_dll/cpptoc/views/textfield_delegate_cpptoc.h"
@@ -249,6 +249,35 @@ textfield_delegate_on_window_changed(struct _cef_view_delegate_t* self,
->OnWindowChanged(CefViewCToCpp::Wrap(view), added ? true : false);
}
void CEF_CALLBACK
textfield_delegate_on_layout_changed(struct _cef_view_delegate_t* self,
cef_view_t* view,
const cef_rect_t* new_bounds) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: view; type: refptr_diff
DCHECK(view);
if (!view)
return;
// Verify param: new_bounds; type: simple_byref_const
DCHECK(new_bounds);
if (!new_bounds)
return;
// Translate param: new_bounds; type: simple_byref_const
CefRect new_boundsVal = new_bounds ? *new_bounds : CefRect();
// Execute
CefTextfieldDelegateCppToC::Get(
reinterpret_cast<cef_textfield_delegate_t*>(self))
->OnLayoutChanged(CefViewCToCpp::Wrap(view), new_boundsVal);
}
void CEF_CALLBACK textfield_delegate_on_focus(struct _cef_view_delegate_t* self,
cef_view_t* view) {
shutdown_checker::AssertNotShutdown();
@@ -306,6 +335,7 @@ CefTextfieldDelegateCppToC::CefTextfieldDelegateCppToC() {
GetStruct()->base.on_child_view_changed =
textfield_delegate_on_child_view_changed;
GetStruct()->base.on_window_changed = textfield_delegate_on_window_changed;
GetStruct()->base.on_layout_changed = textfield_delegate_on_layout_changed;
GetStruct()->base.on_focus = textfield_delegate_on_focus;
GetStruct()->base.on_blur = textfield_delegate_on_blur;
}

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=0884539e94e09316a9e516d93d77743c6287fe9a$
// $hash=df095c7377045f70561ee276a15fd0c13769851c$
//
#include "libcef_dll/cpptoc/views/view_cpptoc.h"
@@ -449,6 +449,43 @@ cef_point_t CEF_CALLBACK view_get_position(struct _cef_view_t* self) {
return _retval;
}
void CEF_CALLBACK view_set_insets(struct _cef_view_t* self,
const cef_insets_t* insets) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: insets; type: simple_byref_const
DCHECK(insets);
if (!insets)
return;
// Translate param: insets; type: simple_byref_const
CefInsets insetsVal = insets ? *insets : CefInsets();
// Execute
CefViewCppToC::Get(self)->SetInsets(insetsVal);
}
cef_insets_t CEF_CALLBACK view_get_insets(struct _cef_view_t* self) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return CefInsets();
// Execute
cef_insets_t _retval = CefViewCppToC::Get(self)->GetInsets();
// Return type: simple
return _retval;
}
cef_size_t CEF_CALLBACK view_get_preferred_size(struct _cef_view_t* self) {
shutdown_checker::AssertNotShutdown();
@@ -912,6 +949,8 @@ CefViewCppToC::CefViewCppToC() {
GetStruct()->get_size = view_get_size;
GetStruct()->set_position = view_set_position;
GetStruct()->get_position = view_get_position;
GetStruct()->set_insets = view_set_insets;
GetStruct()->get_insets = view_get_insets;
GetStruct()->get_preferred_size = view_get_preferred_size;
GetStruct()->size_to_preferred_size = view_size_to_preferred_size;
GetStruct()->get_minimum_size = view_get_minimum_size;

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=7c6283658d49420281d02b4793f65f478f261461$
// $hash=fd17603645550a551edbab0248dbe75afa074c19$
//
#include "libcef_dll/cpptoc/views/view_delegate_cpptoc.h"
@@ -194,6 +194,34 @@ view_delegate_on_window_changed(struct _cef_view_delegate_t* self,
added ? true : false);
}
void CEF_CALLBACK
view_delegate_on_layout_changed(struct _cef_view_delegate_t* self,
cef_view_t* view,
const cef_rect_t* new_bounds) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: view; type: refptr_diff
DCHECK(view);
if (!view)
return;
// Verify param: new_bounds; type: simple_byref_const
DCHECK(new_bounds);
if (!new_bounds)
return;
// Translate param: new_bounds; type: simple_byref_const
CefRect new_boundsVal = new_bounds ? *new_bounds : CefRect();
// Execute
CefViewDelegateCppToC::Get(self)->OnLayoutChanged(CefViewCToCpp::Wrap(view),
new_boundsVal);
}
void CEF_CALLBACK view_delegate_on_focus(struct _cef_view_delegate_t* self,
cef_view_t* view) {
shutdown_checker::AssertNotShutdown();
@@ -242,6 +270,7 @@ CefViewDelegateCppToC::CefViewDelegateCppToC() {
GetStruct()->on_parent_view_changed = view_delegate_on_parent_view_changed;
GetStruct()->on_child_view_changed = view_delegate_on_child_view_changed;
GetStruct()->on_window_changed = view_delegate_on_window_changed;
GetStruct()->on_layout_changed = view_delegate_on_layout_changed;
GetStruct()->on_focus = view_delegate_on_focus;
GetStruct()->on_blur = view_delegate_on_blur;
}

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=1d17ae751431af3baf83b3386f1cab410964a17f$
// $hash=180f352b0c01effd2e61c3879b81dcd3b0989d0a$
//
#include "libcef_dll/cpptoc/views/window_cpptoc.h"
@@ -21,6 +21,7 @@
#include "libcef_dll/cpptoc/views/display_cpptoc.h"
#include "libcef_dll/cpptoc/views/fill_layout_cpptoc.h"
#include "libcef_dll/cpptoc/views/layout_cpptoc.h"
#include "libcef_dll/cpptoc/views/overlay_controller_cpptoc.h"
#include "libcef_dll/cpptoc/views/panel_cpptoc.h"
#include "libcef_dll/cpptoc/views/scroll_view_cpptoc.h"
#include "libcef_dll/cpptoc/views/textfield_cpptoc.h"
@@ -414,6 +415,31 @@ window_get_window_app_icon(struct _cef_window_t* self) {
return CefImageCppToC::Wrap(_retval);
}
cef_overlay_controller_t* CEF_CALLBACK
window_add_overlay_view(struct _cef_window_t* self,
cef_view_t* view,
cef_docking_mode_t docking_mode) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Verify param: view; type: refptr_same
DCHECK(view);
if (!view)
return NULL;
// Execute
CefRefPtr<CefOverlayController> _retval =
CefWindowCppToC::Get(self)->AddOverlayView(CefViewCppToC::Unwrap(view),
docking_mode);
// Return type: refptr_same
return CefOverlayControllerCppToC::Wrap(_retval);
}
void CEF_CALLBACK window_show_menu(struct _cef_window_t* self,
cef_menu_model_t* menu_model,
const cef_point_t* screen_point,
@@ -1309,6 +1335,45 @@ cef_point_t CEF_CALLBACK window_get_position(struct _cef_view_t* self) {
return _retval;
}
void CEF_CALLBACK window_set_insets(struct _cef_view_t* self,
const cef_insets_t* insets) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: insets; type: simple_byref_const
DCHECK(insets);
if (!insets)
return;
// Translate param: insets; type: simple_byref_const
CefInsets insetsVal = insets ? *insets : CefInsets();
// Execute
CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))
->SetInsets(insetsVal);
}
cef_insets_t CEF_CALLBACK window_get_insets(struct _cef_view_t* self) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return CefInsets();
// Execute
cef_insets_t _retval =
CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))->GetInsets();
// Return type: simple
return _retval;
}
cef_size_t CEF_CALLBACK window_get_preferred_size(struct _cef_view_t* self) {
shutdown_checker::AssertNotShutdown();
@@ -1798,6 +1863,7 @@ CefWindowCppToC::CefWindowCppToC() {
GetStruct()->get_window_icon = window_get_window_icon;
GetStruct()->set_window_app_icon = window_set_window_app_icon;
GetStruct()->get_window_app_icon = window_get_window_app_icon;
GetStruct()->add_overlay_view = window_add_overlay_view;
GetStruct()->show_menu = window_show_menu;
GetStruct()->cancel_menu = window_cancel_menu;
GetStruct()->get_display = window_get_display;
@@ -1848,6 +1914,8 @@ CefWindowCppToC::CefWindowCppToC() {
GetStruct()->base.base.get_size = window_get_size;
GetStruct()->base.base.set_position = window_set_position;
GetStruct()->base.base.get_position = window_get_position;
GetStruct()->base.base.set_insets = window_set_insets;
GetStruct()->base.base.get_insets = window_get_insets;
GetStruct()->base.base.get_preferred_size = window_get_preferred_size;
GetStruct()->base.base.size_to_preferred_size = window_size_to_preferred_size;
GetStruct()->base.base.get_minimum_size = window_get_minimum_size;

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=a201b988556a825fffe39f58e378664b93795c72$
// $hash=3e70670085e23c885d7fe0006e782c5293d1430a$
//
#include "libcef_dll/cpptoc/views/window_delegate_cpptoc.h"
@@ -131,6 +131,30 @@ window_delegate_get_initial_bounds(struct _cef_window_delegate_t* self,
return _retval;
}
cef_show_state_t CEF_CALLBACK
window_delegate_get_initial_show_state(struct _cef_window_delegate_t* self,
cef_window_t* window) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return CEF_SHOW_STATE_NORMAL;
// Verify param: window; type: refptr_diff
DCHECK(window);
if (!window)
return CEF_SHOW_STATE_NORMAL;
// Execute
cef_show_state_t _retval =
CefWindowDelegateCppToC::Get(self)->GetInitialShowState(
CefWindowCToCpp::Wrap(window));
// Return type: simple
return _retval;
}
int CEF_CALLBACK
window_delegate_is_frameless(struct _cef_window_delegate_t* self,
cef_window_t* window) {
@@ -473,6 +497,34 @@ window_delegate_on_window_changed(struct _cef_view_delegate_t* self,
->OnWindowChanged(CefViewCToCpp::Wrap(view), added ? true : false);
}
void CEF_CALLBACK
window_delegate_on_layout_changed(struct _cef_view_delegate_t* self,
cef_view_t* view,
const cef_rect_t* new_bounds) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: view; type: refptr_diff
DCHECK(view);
if (!view)
return;
// Verify param: new_bounds; type: simple_byref_const
DCHECK(new_bounds);
if (!new_bounds)
return;
// Translate param: new_bounds; type: simple_byref_const
CefRect new_boundsVal = new_bounds ? *new_bounds : CefRect();
// Execute
CefWindowDelegateCppToC::Get(reinterpret_cast<cef_window_delegate_t*>(self))
->OnLayoutChanged(CefViewCToCpp::Wrap(view), new_boundsVal);
}
void CEF_CALLBACK window_delegate_on_focus(struct _cef_view_delegate_t* self,
cef_view_t* view) {
shutdown_checker::AssertNotShutdown();
@@ -520,6 +572,7 @@ CefWindowDelegateCppToC::CefWindowDelegateCppToC() {
GetStruct()->on_window_destroyed = window_delegate_on_window_destroyed;
GetStruct()->get_parent_window = window_delegate_get_parent_window;
GetStruct()->get_initial_bounds = window_delegate_get_initial_bounds;
GetStruct()->get_initial_show_state = window_delegate_get_initial_show_state;
GetStruct()->is_frameless = window_delegate_is_frameless;
GetStruct()->can_resize = window_delegate_can_resize;
GetStruct()->can_maximize = window_delegate_can_maximize;
@@ -538,6 +591,7 @@ CefWindowDelegateCppToC::CefWindowDelegateCppToC() {
GetStruct()->base.base.on_child_view_changed =
window_delegate_on_child_view_changed;
GetStruct()->base.base.on_window_changed = window_delegate_on_window_changed;
GetStruct()->base.base.on_layout_changed = window_delegate_on_layout_changed;
GetStruct()->base.base.on_focus = window_delegate_on_focus;
GetStruct()->base.base.on_blur = window_delegate_on_blur;
}

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=1b752686dc1743bed6957503b1cd6999f9a2a4f1$
// $hash=08e97b352e24a9d677d4f7f6e8c71d681bc41f76$
//
#include "libcef_dll/ctocpp/frame_handler_ctocpp.h"
@@ -46,7 +46,8 @@ void CefFrameHandlerCToCpp::OnFrameCreated(CefRefPtr<CefBrowser> browser,
NO_SANITIZE("cfi-icall")
void CefFrameHandlerCToCpp::OnFrameAttached(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame) {
CefRefPtr<CefFrame> frame,
bool reattached) {
shutdown_checker::AssertNotShutdown();
cef_frame_handler_t* _struct = GetStruct();
@@ -66,7 +67,7 @@ void CefFrameHandlerCToCpp::OnFrameAttached(CefRefPtr<CefBrowser> browser,
// Execute
_struct->on_frame_attached(_struct, CefBrowserCppToC::Wrap(browser),
CefFrameCppToC::Wrap(frame));
CefFrameCppToC::Wrap(frame), reattached);
}
NO_SANITIZE("cfi-icall")

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=d254c51cf1312313c462b034a42ff5ea95c41119$
// $hash=e20bf114ab84481c3c1c1978b06c32b88f2aa136$
//
#ifndef CEF_LIBCEF_DLL_CTOCPP_FRAME_HANDLER_CTOCPP_H_
@@ -37,7 +37,8 @@ class CefFrameHandlerCToCpp : public CefCToCppRefCounted<CefFrameHandlerCToCpp,
void OnFrameCreated(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame) override;
void OnFrameAttached(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame) override;
CefRefPtr<CefFrame> frame,
bool reattached) override;
void OnFrameDetached(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame) override;
void OnMainFrameChanged(CefRefPtr<CefBrowser> browser,

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=912a0807db8bc1405188d61961545cc8e540aacf$
// $hash=fc8a176aa84aa99ad132a5d3853c8ea16ce6660f$
//
#include "libcef_dll/ctocpp/views/browser_view_ctocpp.h"
@@ -530,6 +530,36 @@ NO_SANITIZE("cfi-icall") CefPoint CefBrowserViewCToCpp::GetPosition() {
return _retval;
}
NO_SANITIZE("cfi-icall")
void CefBrowserViewCToCpp::SetInsets(const CefInsets& insets) {
shutdown_checker::AssertNotShutdown();
cef_view_t* _struct = reinterpret_cast<cef_view_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, set_insets))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_insets(_struct, &insets);
}
NO_SANITIZE("cfi-icall") CefInsets CefBrowserViewCToCpp::GetInsets() {
shutdown_checker::AssertNotShutdown();
cef_view_t* _struct = reinterpret_cast<cef_view_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, get_insets))
return CefInsets();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_insets_t _retval = _struct->get_insets(_struct);
// Return type: simple
return _retval;
}
NO_SANITIZE("cfi-icall") CefSize CefBrowserViewCToCpp::GetPreferredSize() {
shutdown_checker::AssertNotShutdown();

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=1c713db1e73d434b6bce3aea8e3a6dddbc547b61$
// $hash=93f91329a1d2db5d20805cb10ee30e1fcd6c3185$
//
#ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_BROWSER_VIEW_CTOCPP_H_
@@ -64,6 +64,8 @@ class CefBrowserViewCToCpp : public CefCToCppRefCounted<CefBrowserViewCToCpp,
CefSize GetSize() override;
void SetPosition(const CefPoint& position) override;
CefPoint GetPosition() override;
void SetInsets(const CefInsets& insets) override;
CefInsets GetInsets() override;
CefSize GetPreferredSize() override;
void SizeToPreferredSize() override;
CefSize GetMinimumSize() override;

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=9aed01b6014f1c22815e7847eba321d75dbfa45d$
// $hash=8116871f028f4c3426e87298fcd20480f8094726$
//
#include "libcef_dll/ctocpp/views/browser_view_delegate_ctocpp.h"
@@ -332,6 +332,27 @@ void CefBrowserViewDelegateCToCpp::OnWindowChanged(CefRefPtr<CefView> view,
_struct->on_window_changed(_struct, CefViewCppToC::Wrap(view), added);
}
NO_SANITIZE("cfi-icall")
void CefBrowserViewDelegateCToCpp::OnLayoutChanged(CefRefPtr<CefView> view,
const CefRect& new_bounds) {
shutdown_checker::AssertNotShutdown();
cef_view_delegate_t* _struct =
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, on_layout_changed))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: view; type: refptr_diff
DCHECK(view.get());
if (!view.get())
return;
// Execute
_struct->on_layout_changed(_struct, CefViewCppToC::Wrap(view), &new_bounds);
}
NO_SANITIZE("cfi-icall")
void CefBrowserViewDelegateCToCpp::OnFocus(CefRefPtr<CefView> view) {
shutdown_checker::AssertNotShutdown();

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=20b067cabc4baa4c9edecaffb38a2ebb28524ccc$
// $hash=13f61ebbe80de396a56f2dd894c8137031133c83$
//
#ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_BROWSER_VIEW_DELEGATE_CTOCPP_H_
@@ -65,6 +65,8 @@ class CefBrowserViewDelegateCToCpp
bool added,
CefRefPtr<CefView> child) override;
void OnWindowChanged(CefRefPtr<CefView> view, bool added) override;
void OnLayoutChanged(CefRefPtr<CefView> view,
const CefRect& new_bounds) override;
void OnFocus(CefRefPtr<CefView> view) override;
void OnBlur(CefRefPtr<CefView> view) override;
};

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=b359b8f9e2c70946ed9831869100e82774a5ea2d$
// $hash=d7b21b37439e1b87e9b9c61fbd86b6cfdb4d3c8d$
//
#include "libcef_dll/ctocpp/views/button_ctocpp.h"
@@ -526,6 +526,36 @@ NO_SANITIZE("cfi-icall") CefPoint CefButtonCToCpp::GetPosition() {
return _retval;
}
NO_SANITIZE("cfi-icall")
void CefButtonCToCpp::SetInsets(const CefInsets& insets) {
shutdown_checker::AssertNotShutdown();
cef_view_t* _struct = reinterpret_cast<cef_view_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, set_insets))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_insets(_struct, &insets);
}
NO_SANITIZE("cfi-icall") CefInsets CefButtonCToCpp::GetInsets() {
shutdown_checker::AssertNotShutdown();
cef_view_t* _struct = reinterpret_cast<cef_view_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, get_insets))
return CefInsets();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_insets_t _retval = _struct->get_insets(_struct);
// Return type: simple
return _retval;
}
NO_SANITIZE("cfi-icall") CefSize CefButtonCToCpp::GetPreferredSize() {
shutdown_checker::AssertNotShutdown();

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=b543831782043e1651b8adfa907a60b553267ca7$
// $hash=bc6f35f85cc77030a7e36e1ebbb97cb9091cf976$
//
#ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_BUTTON_CTOCPP_H_
@@ -68,6 +68,8 @@ class CefButtonCToCpp
CefSize GetSize() override;
void SetPosition(const CefPoint& position) override;
CefPoint GetPosition() override;
void SetInsets(const CefInsets& insets) override;
CefInsets GetInsets() override;
CefSize GetPreferredSize() override;
void SizeToPreferredSize() override;
CefSize GetMinimumSize() override;

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=fc962d2832eeb3dee99e9a201f234d4a4b4d6f0f$
// $hash=10978e1021326cd0f21f84c0b35350e846b47fe9$
//
#include "libcef_dll/ctocpp/views/button_delegate_ctocpp.h"
@@ -231,6 +231,27 @@ void CefButtonDelegateCToCpp::OnWindowChanged(CefRefPtr<CefView> view,
_struct->on_window_changed(_struct, CefViewCppToC::Wrap(view), added);
}
NO_SANITIZE("cfi-icall")
void CefButtonDelegateCToCpp::OnLayoutChanged(CefRefPtr<CefView> view,
const CefRect& new_bounds) {
shutdown_checker::AssertNotShutdown();
cef_view_delegate_t* _struct =
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, on_layout_changed))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: view; type: refptr_diff
DCHECK(view.get());
if (!view.get())
return;
// Execute
_struct->on_layout_changed(_struct, CefViewCppToC::Wrap(view), &new_bounds);
}
NO_SANITIZE("cfi-icall")
void CefButtonDelegateCToCpp::OnFocus(CefRefPtr<CefView> view) {
shutdown_checker::AssertNotShutdown();

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=6a72a71a9becd6103d44719ed88b000d576d95eb$
// $hash=1120cbc3b78c41223e94493bf4416899f1b936ed$
//
#ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_BUTTON_DELEGATE_CTOCPP_H_
@@ -52,6 +52,8 @@ class CefButtonDelegateCToCpp
bool added,
CefRefPtr<CefView> child) override;
void OnWindowChanged(CefRefPtr<CefView> view, bool added) override;
void OnLayoutChanged(CefRefPtr<CefView> view,
const CefRect& new_bounds) override;
void OnFocus(CefRefPtr<CefView> view) override;
void OnBlur(CefRefPtr<CefView> view) override;
};

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=7e8ef08cc7510dc0ca0b580ae4d8031cb7acc268$
// $hash=21aa8991b400583b47f7cc29fb55334ff07b1eb4$
//
#include "libcef_dll/ctocpp/views/label_button_ctocpp.h"
@@ -737,6 +737,36 @@ NO_SANITIZE("cfi-icall") CefPoint CefLabelButtonCToCpp::GetPosition() {
return _retval;
}
NO_SANITIZE("cfi-icall")
void CefLabelButtonCToCpp::SetInsets(const CefInsets& insets) {
shutdown_checker::AssertNotShutdown();
cef_view_t* _struct = reinterpret_cast<cef_view_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, set_insets))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_insets(_struct, &insets);
}
NO_SANITIZE("cfi-icall") CefInsets CefLabelButtonCToCpp::GetInsets() {
shutdown_checker::AssertNotShutdown();
cef_view_t* _struct = reinterpret_cast<cef_view_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, get_insets))
return CefInsets();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_insets_t _retval = _struct->get_insets(_struct);
// Return type: simple
return _retval;
}
NO_SANITIZE("cfi-icall") CefSize CefLabelButtonCToCpp::GetPreferredSize() {
shutdown_checker::AssertNotShutdown();

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=ef0338428bd0261ccfc0235718d8d1bd81e30315$
// $hash=bb881cc52836308013fb9737d645077b623d55df$
//
#ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_LABEL_BUTTON_CTOCPP_H_
@@ -83,6 +83,8 @@ class CefLabelButtonCToCpp : public CefCToCppRefCounted<CefLabelButtonCToCpp,
CefSize GetSize() override;
void SetPosition(const CefPoint& position) override;
CefPoint GetPosition() override;
void SetInsets(const CefInsets& insets) override;
CefInsets GetInsets() override;
CefSize GetPreferredSize() override;
void SizeToPreferredSize() override;
CefSize GetMinimumSize() override;

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=8f766b8f5a014054dcc79f504d34d0df27f75f9d$
// $hash=7bdcfa2babc3a05789f73a5105aed80e11efe592$
//
#include "libcef_dll/ctocpp/views/menu_button_ctocpp.h"
@@ -783,6 +783,36 @@ NO_SANITIZE("cfi-icall") CefPoint CefMenuButtonCToCpp::GetPosition() {
return _retval;
}
NO_SANITIZE("cfi-icall")
void CefMenuButtonCToCpp::SetInsets(const CefInsets& insets) {
shutdown_checker::AssertNotShutdown();
cef_view_t* _struct = reinterpret_cast<cef_view_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, set_insets))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_insets(_struct, &insets);
}
NO_SANITIZE("cfi-icall") CefInsets CefMenuButtonCToCpp::GetInsets() {
shutdown_checker::AssertNotShutdown();
cef_view_t* _struct = reinterpret_cast<cef_view_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, get_insets))
return CefInsets();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_insets_t _retval = _struct->get_insets(_struct);
// Return type: simple
return _retval;
}
NO_SANITIZE("cfi-icall") CefSize CefMenuButtonCToCpp::GetPreferredSize() {
shutdown_checker::AssertNotShutdown();

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=90b4b0b803eaeef6873d455a2686dfd9f56a9fc3$
// $hash=3b4a2266f93b3c3623b0f29831a7a7d57c52a628$
//
#ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_MENU_BUTTON_CTOCPP_H_
@@ -87,6 +87,8 @@ class CefMenuButtonCToCpp : public CefCToCppRefCounted<CefMenuButtonCToCpp,
CefSize GetSize() override;
void SetPosition(const CefPoint& position) override;
CefPoint GetPosition() override;
void SetInsets(const CefInsets& insets) override;
CefInsets GetInsets() override;
CefSize GetPreferredSize() override;
void SizeToPreferredSize() override;
CefSize GetMinimumSize() override;

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=9ecd07954f90dc14ddf36072285c942f2ee8082f$
// $hash=db120a17dcd7382617f6a6245a8c719c6159d615$
//
#include "libcef_dll/ctocpp/views/menu_button_delegate_ctocpp.h"
@@ -263,6 +263,27 @@ void CefMenuButtonDelegateCToCpp::OnWindowChanged(CefRefPtr<CefView> view,
_struct->on_window_changed(_struct, CefViewCppToC::Wrap(view), added);
}
NO_SANITIZE("cfi-icall")
void CefMenuButtonDelegateCToCpp::OnLayoutChanged(CefRefPtr<CefView> view,
const CefRect& new_bounds) {
shutdown_checker::AssertNotShutdown();
cef_view_delegate_t* _struct =
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, on_layout_changed))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: view; type: refptr_diff
DCHECK(view.get());
if (!view.get())
return;
// Execute
_struct->on_layout_changed(_struct, CefViewCppToC::Wrap(view), &new_bounds);
}
NO_SANITIZE("cfi-icall")
void CefMenuButtonDelegateCToCpp::OnFocus(CefRefPtr<CefView> view) {
shutdown_checker::AssertNotShutdown();

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=7836ec7b53349057b1d1d75c6ba8506620bed53d$
// $hash=34037ec75b18dacfafd978da854131cfa0560d7d$
//
#ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_MENU_BUTTON_DELEGATE_CTOCPP_H_
@@ -58,6 +58,8 @@ class CefMenuButtonDelegateCToCpp
bool added,
CefRefPtr<CefView> child) override;
void OnWindowChanged(CefRefPtr<CefView> view, bool added) override;
void OnLayoutChanged(CefRefPtr<CefView> view,
const CefRect& new_bounds) override;
void OnFocus(CefRefPtr<CefView> view) override;
void OnBlur(CefRefPtr<CefView> view) override;
};

View File

@@ -0,0 +1,346 @@
// Copyright (c) 2021 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.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=275cb37282252c06bd4fe5ad21291924d37937c0$
//
#include "libcef_dll/ctocpp/views/overlay_controller_ctocpp.h"
#include "libcef_dll/ctocpp/views/view_ctocpp.h"
#include "libcef_dll/ctocpp/views/window_ctocpp.h"
#include "libcef_dll/shutdown_checker.h"
// VIRTUAL METHODS - Body may be edited by hand.
NO_SANITIZE("cfi-icall") bool CefOverlayControllerCToCpp::IsValid() {
shutdown_checker::AssertNotShutdown();
cef_overlay_controller_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, is_valid))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->is_valid(_struct);
// Return type: bool
return _retval ? true : false;
}
NO_SANITIZE("cfi-icall")
bool CefOverlayControllerCToCpp::IsSame(CefRefPtr<CefOverlayController> that) {
shutdown_checker::AssertNotShutdown();
cef_overlay_controller_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, is_same))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: that; type: refptr_same
DCHECK(that.get());
if (!that.get())
return false;
// Execute
int _retval =
_struct->is_same(_struct, CefOverlayControllerCToCpp::Unwrap(that));
// Return type: bool
return _retval ? true : false;
}
NO_SANITIZE("cfi-icall")
CefRefPtr<CefView> CefOverlayControllerCToCpp::GetContentsView() {
shutdown_checker::AssertNotShutdown();
cef_overlay_controller_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, get_contents_view))
return nullptr;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_view_t* _retval = _struct->get_contents_view(_struct);
// Return type: refptr_same
return CefViewCToCpp::Wrap(_retval);
}
NO_SANITIZE("cfi-icall")
CefRefPtr<CefWindow> CefOverlayControllerCToCpp::GetWindow() {
shutdown_checker::AssertNotShutdown();
cef_overlay_controller_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, get_window))
return nullptr;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_window_t* _retval = _struct->get_window(_struct);
// Return type: refptr_same
return CefWindowCToCpp::Wrap(_retval);
}
NO_SANITIZE("cfi-icall")
cef_docking_mode_t CefOverlayControllerCToCpp::GetDockingMode() {
shutdown_checker::AssertNotShutdown();
cef_overlay_controller_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, get_docking_mode))
return CEF_DOCKING_MODE_TOP_LEFT;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_docking_mode_t _retval = _struct->get_docking_mode(_struct);
// Return type: simple
return _retval;
}
NO_SANITIZE("cfi-icall") void CefOverlayControllerCToCpp::Destroy() {
shutdown_checker::AssertNotShutdown();
cef_overlay_controller_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, destroy))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->destroy(_struct);
}
NO_SANITIZE("cfi-icall")
void CefOverlayControllerCToCpp::SetBounds(const CefRect& bounds) {
shutdown_checker::AssertNotShutdown();
cef_overlay_controller_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, set_bounds))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_bounds(_struct, &bounds);
}
NO_SANITIZE("cfi-icall") CefRect CefOverlayControllerCToCpp::GetBounds() {
shutdown_checker::AssertNotShutdown();
cef_overlay_controller_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, get_bounds))
return CefRect();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_rect_t _retval = _struct->get_bounds(_struct);
// Return type: simple
return _retval;
}
NO_SANITIZE("cfi-icall")
CefRect CefOverlayControllerCToCpp::GetBoundsInScreen() {
shutdown_checker::AssertNotShutdown();
cef_overlay_controller_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, get_bounds_in_screen))
return CefRect();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_rect_t _retval = _struct->get_bounds_in_screen(_struct);
// Return type: simple
return _retval;
}
NO_SANITIZE("cfi-icall")
void CefOverlayControllerCToCpp::SetSize(const CefSize& size) {
shutdown_checker::AssertNotShutdown();
cef_overlay_controller_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, set_size))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_size(_struct, &size);
}
NO_SANITIZE("cfi-icall") CefSize CefOverlayControllerCToCpp::GetSize() {
shutdown_checker::AssertNotShutdown();
cef_overlay_controller_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, get_size))
return CefSize();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_size_t _retval = _struct->get_size(_struct);
// Return type: simple
return _retval;
}
NO_SANITIZE("cfi-icall")
void CefOverlayControllerCToCpp::SetPosition(const CefPoint& position) {
shutdown_checker::AssertNotShutdown();
cef_overlay_controller_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, set_position))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_position(_struct, &position);
}
NO_SANITIZE("cfi-icall") CefPoint CefOverlayControllerCToCpp::GetPosition() {
shutdown_checker::AssertNotShutdown();
cef_overlay_controller_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, get_position))
return CefPoint();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_point_t _retval = _struct->get_position(_struct);
// Return type: simple
return _retval;
}
NO_SANITIZE("cfi-icall")
void CefOverlayControllerCToCpp::SetInsets(const CefInsets& insets) {
shutdown_checker::AssertNotShutdown();
cef_overlay_controller_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, set_insets))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_insets(_struct, &insets);
}
NO_SANITIZE("cfi-icall") CefInsets CefOverlayControllerCToCpp::GetInsets() {
shutdown_checker::AssertNotShutdown();
cef_overlay_controller_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, get_insets))
return CefInsets();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_insets_t _retval = _struct->get_insets(_struct);
// Return type: simple
return _retval;
}
NO_SANITIZE("cfi-icall")
void CefOverlayControllerCToCpp::SizeToPreferredSize() {
shutdown_checker::AssertNotShutdown();
cef_overlay_controller_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, size_to_preferred_size))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->size_to_preferred_size(_struct);
}
NO_SANITIZE("cfi-icall")
void CefOverlayControllerCToCpp::SetVisible(bool visible) {
shutdown_checker::AssertNotShutdown();
cef_overlay_controller_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, set_visible))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_visible(_struct, visible);
}
NO_SANITIZE("cfi-icall") bool CefOverlayControllerCToCpp::IsVisible() {
shutdown_checker::AssertNotShutdown();
cef_overlay_controller_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, is_visible))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->is_visible(_struct);
// Return type: bool
return _retval ? true : false;
}
NO_SANITIZE("cfi-icall") bool CefOverlayControllerCToCpp::IsDrawn() {
shutdown_checker::AssertNotShutdown();
cef_overlay_controller_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, is_drawn))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = _struct->is_drawn(_struct);
// Return type: bool
return _retval ? true : false;
}
// CONSTRUCTOR - Do not edit by hand.
CefOverlayControllerCToCpp::CefOverlayControllerCToCpp() {}
// DESTRUCTOR - Do not edit by hand.
CefOverlayControllerCToCpp::~CefOverlayControllerCToCpp() {
shutdown_checker::AssertNotShutdown();
}
template <>
cef_overlay_controller_t* CefCToCppRefCounted<
CefOverlayControllerCToCpp,
CefOverlayController,
cef_overlay_controller_t>::UnwrapDerived(CefWrapperType type,
CefOverlayController* c) {
NOTREACHED() << "Unexpected class type: " << type;
return nullptr;
}
template <>
CefWrapperType CefCToCppRefCounted<CefOverlayControllerCToCpp,
CefOverlayController,
cef_overlay_controller_t>::kWrapperType =
WT_OVERLAY_CONTROLLER;

View File

@@ -0,0 +1,63 @@
// Copyright (c) 2021 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.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=3f0e14b544f91e4adfd0a3777242bc070025b927$
//
#ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_OVERLAY_CONTROLLER_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_VIEWS_OVERLAY_CONTROLLER_CTOCPP_H_
#pragma once
#if !defined(WRAPPING_CEF_SHARED)
#error This file can be included wrapper-side only
#endif
#include "include/capi/views/cef_overlay_controller_capi.h"
#include "include/capi/views/cef_view_capi.h"
#include "include/capi/views/cef_window_capi.h"
#include "include/views/cef_overlay_controller.h"
#include "include/views/cef_view.h"
#include "include/views/cef_window.h"
#include "libcef_dll/ctocpp/ctocpp_ref_counted.h"
// Wrap a C structure with a C++ class.
// This class may be instantiated and accessed wrapper-side only.
class CefOverlayControllerCToCpp
: public CefCToCppRefCounted<CefOverlayControllerCToCpp,
CefOverlayController,
cef_overlay_controller_t> {
public:
CefOverlayControllerCToCpp();
virtual ~CefOverlayControllerCToCpp();
// CefOverlayController methods.
bool IsValid() override;
bool IsSame(CefRefPtr<CefOverlayController> that) override;
CefRefPtr<CefView> GetContentsView() override;
CefRefPtr<CefWindow> GetWindow() override;
cef_docking_mode_t GetDockingMode() override;
void Destroy() override;
void SetBounds(const CefRect& bounds) override;
CefRect GetBounds() override;
CefRect GetBoundsInScreen() override;
void SetSize(const CefSize& size) override;
CefSize GetSize() override;
void SetPosition(const CefPoint& position) override;
CefPoint GetPosition() override;
void SetInsets(const CefInsets& insets) override;
CefInsets GetInsets() override;
void SizeToPreferredSize() override;
void SetVisible(bool visible) override;
bool IsVisible() override;
bool IsDrawn() override;
};
#endif // CEF_LIBCEF_DLL_CTOCPP_VIEWS_OVERLAY_CONTROLLER_CTOCPP_H_

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=3e77ca44ea8a99a3fc8c335cca58b4cbc790e9cb$
// $hash=48fcc126726458e5391885e4513d74d56b0c5fdb$
//
#include "libcef_dll/ctocpp/views/panel_ctocpp.h"
@@ -658,6 +658,36 @@ NO_SANITIZE("cfi-icall") CefPoint CefPanelCToCpp::GetPosition() {
return _retval;
}
NO_SANITIZE("cfi-icall")
void CefPanelCToCpp::SetInsets(const CefInsets& insets) {
shutdown_checker::AssertNotShutdown();
cef_view_t* _struct = reinterpret_cast<cef_view_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, set_insets))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_insets(_struct, &insets);
}
NO_SANITIZE("cfi-icall") CefInsets CefPanelCToCpp::GetInsets() {
shutdown_checker::AssertNotShutdown();
cef_view_t* _struct = reinterpret_cast<cef_view_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, get_insets))
return CefInsets();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_insets_t _retval = _struct->get_insets(_struct);
// Return type: simple
return _retval;
}
NO_SANITIZE("cfi-icall") CefSize CefPanelCToCpp::GetPreferredSize() {
shutdown_checker::AssertNotShutdown();

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=c2d630805de3dbcb47933c566b791c0e2fb7e6d7$
// $hash=a6e6ceefb7e403c46c00c59dd86104787ab77f7a$
//
#ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_PANEL_CTOCPP_H_
@@ -81,6 +81,8 @@ class CefPanelCToCpp
CefSize GetSize() override;
void SetPosition(const CefPoint& position) override;
CefPoint GetPosition() override;
void SetInsets(const CefInsets& insets) override;
CefInsets GetInsets() override;
CefSize GetPreferredSize() override;
void SizeToPreferredSize() override;
CefSize GetMinimumSize() override;

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=4bffffc0fe09523839a08109aef1e3de90f6e25c$
// $hash=2606f866b3a2d6a4d582a5c2c1990d8f8a7ff65d$
//
#include "libcef_dll/ctocpp/views/panel_delegate_ctocpp.h"
@@ -191,6 +191,27 @@ void CefPanelDelegateCToCpp::OnWindowChanged(CefRefPtr<CefView> view,
_struct->on_window_changed(_struct, CefViewCppToC::Wrap(view), added);
}
NO_SANITIZE("cfi-icall")
void CefPanelDelegateCToCpp::OnLayoutChanged(CefRefPtr<CefView> view,
const CefRect& new_bounds) {
shutdown_checker::AssertNotShutdown();
cef_view_delegate_t* _struct =
reinterpret_cast<cef_view_delegate_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, on_layout_changed))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: view; type: refptr_diff
DCHECK(view.get());
if (!view.get())
return;
// Execute
_struct->on_layout_changed(_struct, CefViewCppToC::Wrap(view), &new_bounds);
}
NO_SANITIZE("cfi-icall")
void CefPanelDelegateCToCpp::OnFocus(CefRefPtr<CefView> view) {
shutdown_checker::AssertNotShutdown();

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=d508126f22cba29931a4d53aecbdaaca7dd39b9d$
// $hash=c5368e0456a726a09fd5a76ec65cd3e9f6a04d0f$
//
#ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_PANEL_DELEGATE_CTOCPP_H_
@@ -48,6 +48,8 @@ class CefPanelDelegateCToCpp
bool added,
CefRefPtr<CefView> child) override;
void OnWindowChanged(CefRefPtr<CefView> view, bool added) override;
void OnLayoutChanged(CefRefPtr<CefView> view,
const CefRect& new_bounds) override;
void OnFocus(CefRefPtr<CefView> view) override;
void OnBlur(CefRefPtr<CefView> view) override;
};

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=8c2b3c821c18076ce40392ea339c177c66d53cc2$
// $hash=73f1e51eafb9ec8797e8f0753b33c2261c3b0e2f$
//
#include "libcef_dll/ctocpp/views/scroll_view_ctocpp.h"
@@ -565,6 +565,36 @@ NO_SANITIZE("cfi-icall") CefPoint CefScrollViewCToCpp::GetPosition() {
return _retval;
}
NO_SANITIZE("cfi-icall")
void CefScrollViewCToCpp::SetInsets(const CefInsets& insets) {
shutdown_checker::AssertNotShutdown();
cef_view_t* _struct = reinterpret_cast<cef_view_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, set_insets))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_insets(_struct, &insets);
}
NO_SANITIZE("cfi-icall") CefInsets CefScrollViewCToCpp::GetInsets() {
shutdown_checker::AssertNotShutdown();
cef_view_t* _struct = reinterpret_cast<cef_view_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, get_insets))
return CefInsets();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_insets_t _retval = _struct->get_insets(_struct);
// Return type: simple
return _retval;
}
NO_SANITIZE("cfi-icall") CefSize CefScrollViewCToCpp::GetPreferredSize() {
shutdown_checker::AssertNotShutdown();

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=20f4f752402507b4573596d6759c93cd1bc7a982$
// $hash=cc3bfb5c57f0b7b31997bfb5226dd3dd77f6d40c$
//
#ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_SCROLL_VIEW_CTOCPP_H_
@@ -68,6 +68,8 @@ class CefScrollViewCToCpp : public CefCToCppRefCounted<CefScrollViewCToCpp,
CefSize GetSize() override;
void SetPosition(const CefPoint& position) override;
CefPoint GetPosition() override;
void SetInsets(const CefInsets& insets) override;
CefInsets GetInsets() override;
CefSize GetPreferredSize() override;
void SizeToPreferredSize() override;
CefSize GetMinimumSize() override;

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=132a40648e492f00f21d6762ff63d4491e8060c3$
// $hash=0b38c9a006a344082c20030912d9d6fc4923912e$
//
#include "libcef_dll/ctocpp/views/textfield_ctocpp.h"
@@ -945,6 +945,36 @@ NO_SANITIZE("cfi-icall") CefPoint CefTextfieldCToCpp::GetPosition() {
return _retval;
}
NO_SANITIZE("cfi-icall")
void CefTextfieldCToCpp::SetInsets(const CefInsets& insets) {
shutdown_checker::AssertNotShutdown();
cef_view_t* _struct = reinterpret_cast<cef_view_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, set_insets))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->set_insets(_struct, &insets);
}
NO_SANITIZE("cfi-icall") CefInsets CefTextfieldCToCpp::GetInsets() {
shutdown_checker::AssertNotShutdown();
cef_view_t* _struct = reinterpret_cast<cef_view_t*>(GetStruct());
if (CEF_MEMBER_MISSING(_struct, get_insets))
return CefInsets();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_insets_t _retval = _struct->get_insets(_struct);
// Return type: simple
return _retval;
}
NO_SANITIZE("cfi-icall") CefSize CefTextfieldCToCpp::GetPreferredSize() {
shutdown_checker::AssertNotShutdown();

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=e907d476bdd6717660c7e35f55ab9a1679f0f1fb$
// $hash=b5dc694168601801e87d3b92544f3eb9ea3cecc9$
//
#ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_TEXTFIELD_CTOCPP_H_
@@ -94,6 +94,8 @@ class CefTextfieldCToCpp : public CefCToCppRefCounted<CefTextfieldCToCpp,
CefSize GetSize() override;
void SetPosition(const CefPoint& position) override;
CefPoint GetPosition() override;
void SetInsets(const CefInsets& insets) override;
CefInsets GetInsets() override;
CefSize GetPreferredSize() override;
void SizeToPreferredSize() override;
CefSize GetMinimumSize() override;

Some files were not shown because too many files have changed in this diff Show More