Compare commits

...

30 Commits
6045 ... 4638

Author SHA1 Message Date
Marshall Greenblatt
0d6005e731 Trial fix for CORS pre-flight requests missing headers (see issue #3110, see issue #3200) 2021-11-09 14:24:00 -05:00
Marshall Greenblatt
4208276762 cmake: Require version 3.19 or newer for VS2019 and Xcode 12+ support 2021-11-08 15:30:31 -05:00
Marshall Greenblatt
df5e41d0e8 Fix writing of files from DevTools (fixes issue #3211) 2021-11-08 15:07:02 -05:00
Marshall Greenblatt
89e80f799a Linux: Load Ozone EGL binaries from DIR_ASSETS (fixes issue #3213) 2021-11-08 14:41:39 -05:00
Marshall Greenblatt
9f72f35f47 Update to Chromium version 95.0.4638.69 2021-10-29 15:45:10 +00:00
Marshall Greenblatt
0a9d21250b osr: Fix GPU process crash with SendExternalBeginFrame (see issue #2800)
Fixes the following error:
Check failed: !pending_frame_callback_. Got overlapping IssueExternalBeginFrame

To test:
Run `cefclient --off-screen-rendering-enabled --external-begin-frame-enabled`
on Windows without crashing.
2021-10-28 15:21:26 -04:00
Marshall Greenblatt
99c4ac0d39 Mac: cefclient: Fix crash when quitting from the top menu (fixes issue #3201) 2021-10-22 18:38:06 -04:00
Marshall Greenblatt
8c9b0048e3 Mac: Document Xcode 13.0 support 2021-10-22 18:29:46 -04:00
Marshall Greenblatt
00d4ad546e Update to Chromium version 95.0.4638.54 2021-10-20 17:38:49 -04:00
Marshall Greenblatt
0d1bea3a78 alloy: Fix ComponentUpdateService shutdown crash with multi-threaded message loop (see issue #3149) 2021-10-19 17:27:18 -04:00
Marshall Greenblatt
69b7dc3148 Remove deprecated base::Bind APIs (see issue #3140)
This CL removes the following deprecated APIs:

- base::Bind()
- base::Callback
- base::Closure
- base::CancelableCallback
- base::CancelableClosure

The behavior that these APIs provided is still available using the *Repeating*
variants. However, consider strongly whether using these variants is actually
necessary in your case or whether the *Once* variants will suffice: unless your
callback *objects* (note: not variables!) need to be called multiple times,
they most likely can and should be the Once variants.

This applies the same changes as https://crrev.com/6cc94b5339.
2021-10-05 15:13:59 +03:00
Marshall Greenblatt
9b0af44ca6 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:01 +03:00
Marshall Greenblatt
9e3ac37d21 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 14:58:45 +03:00
Alex Maitland
192276af56 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:04:19 +03:00
Andy Tzeng
56afb712da 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:04:11 +03:00
Marshall Greenblatt
63773edcc5 Windows: Fix VS2019 warning C4458: declaration of 'bounds' hides class member (see issue #1515) 2021-10-01 12:07:18 +03:00
Marshall Greenblatt
d6c534308b 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:29:53 +03:00
Marshall Greenblatt
9f565d4fd9 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:29:46 +03:00
Marshall Greenblatt
aabe4ce466 Remove ignore_certificate_errors setting (fixes issue #2899)
This removes CefSettings.ignore_certificate_errors and
CefBrowserSettings.ignore_certificate_errors. Due to NetworkService
requirements these values must now be configured globally via the
"ignore-certificate-errors" command-line flag.
2021-09-27 18:24:08 +03:00
Marshall Greenblatt
ff33d7f721 Remove CefBrowserSettings related to file URL access (fixes issue #2820)
This removes CefBrowserSettings.universal_access_from_file_urls and
CefBrowserSettings.file_access_from_file_urls. Due to NetworkService
requirements these values must now be configured globally via command-line
flags ("allow-universal-access-from-files" and "allow-file-access-from-files"
respectively).

Also remove the kAllowFileAccessFromFileUrls switch in CEF which duplicates
the existing kAllowFileAccessFromFiles switch in Chromium (see issue #1785).
2021-09-27 18:23:58 +03:00
Marshall Greenblatt
f45e7582d0 Windows: Escape URLs passed to SellExecute (fixes issue #3133) 2021-09-27 18:23:49 +03:00
Marshall Greenblatt
98c2425063 Fix CefCommandLine character case requirements (fixes issue #1872)
Switch names will now be converted to lowercase ASCII on all platforms.
Switch values will retain the original case and UTF8 encoding.
2021-09-27 18:23:39 +03:00
Marshall Greenblatt
370a7749e9 Remove CefBrowserSettings.application_cache (fixes issue #1785)
AppCache is deprecated in favor of Service Workers and support will be
fully removed soon (~M95). See https://web.dev/appcache-removal/.

Also add missing "allow-file-access-from-files" command-line switch for
CefBrowserSettings.file_access_from_file_urls.
2021-09-27 18:23:30 +03:00
Marshall Greenblatt
3e7f1bb529 Replace CefRequestCallback with CefCallback (fixes issue #1861)
CefRequestCallback::Continue(false) was the same as Cancel(), so we can just
use CefCallback instead.
2021-09-27 18:23:18 +03:00
Marshall Greenblatt
8587cc4e4b Use CefRect for CefWindowInfo bounds (fixes issue #1515) 2021-09-27 18:23:08 +03:00
Marshall Greenblatt
49a4611e28 Rename SendFocusEvent to SetFocus (fixes issue #866)
Also removes CefBrowserHost::SendFocusEvent. Use the existing SetFocus method
instead.
2021-09-27 18:23:00 +03:00
CEF Spotify
263160aa14 Update to Chromium version 95.0.4638.17 2021-09-27 07:33:45 +00:00
Marshall Greenblatt
9a6c627c4b Linux: Fix PrintToPDF crash (fixes issue #3178) 2021-09-23 17:07:57 +03:00
Marshall Greenblatt
9913c10009 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 14:50:54 +03:00
Marshall Greenblatt
9e8198124e Update to Chromium version 95.0.4638.10 2021-09-23 10:45:13 +03:00
132 changed files with 803 additions and 982 deletions

View File

@@ -7,5 +7,6 @@
# https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
{
'chromium_checkout': 'refs/tags/95.0.4638.0'
'chromium_checkout': 'refs/tags/95.0.4638.69',
'depot_tools_checkout': 'eff810e93d'
}

View File

@@ -12,7 +12,7 @@
# distribution include:
#
# Linux: Ninja, GCC 7.5.0+, Unix Makefiles
# MacOS: Ninja, Xcode 12.2 to 12.5
# MacOS: Ninja, Xcode 12.2 to 13.0
# Windows: Ninja, Visual Studio 2019+
#
# Ninja is a cross-platform open-source tool for running fast builds using
@@ -36,7 +36,7 @@
#
# The below requirements must be met to build this CEF binary distribution.
#
# - CMake version 2.8.12.1 or newer.
# - CMake version 3.19 or newer.
#
# - Linux requirements:
# Currently supported distributions include Debian 10 (Buster), Ubuntu 18
@@ -48,7 +48,7 @@
# libgtk3.0-dev (required by the cefclient target only)
#
# - MacOS requirements:
# Xcode 12.2 to 12.5 building on MacOS 10.15.4 (Catalina) or newer. Only
# Xcode 12.2 to 13.0 building on MacOS 10.15.4 (Catalina) or newer. Only
# 64-bit builds are supported. The Xcode command-line tools must also be
# installed. Newer Xcode versions may not have been been tested and are not
# recommended.
@@ -132,7 +132,8 @@
# Global setup.
#
cmake_minimum_required(VERSION 2.8.12.1)
# For VS2019 and Xcode 12+ support.
cmake_minimum_required(VERSION 3.19)
# Only generate Debug and Release configuration types.
set(CMAKE_CONFIGURATION_TYPES Debug Release)

View File

@@ -8,7 +8,7 @@
# by hand. See the translator.README.txt file in the tools directory for
# more information.
#
# $hash=216bf0511bdceca67cdbdcf30f8316db2d00e276$
# $hash=42b9ae0a0ee20489699d69dcdbcbf8ad3265f821$
#
{
@@ -62,7 +62,6 @@
'include/cef_render_handler.h',
'include/cef_render_process_handler.h',
'include/cef_request.h',
'include/cef_request_callback.h',
'include/cef_request_context.h',
'include/cef_request_context_handler.h',
'include/cef_request_handler.h',
@@ -162,7 +161,6 @@
'include/capi/cef_render_handler_capi.h',
'include/capi/cef_render_process_handler_capi.h',
'include/capi/cef_request_capi.h',
'include/capi/cef_request_callback_capi.h',
'include/capi/cef_request_context_capi.h',
'include/capi/cef_request_context_handler_capi.h',
'include/capi/cef_request_handler_capi.h',
@@ -388,8 +386,6 @@
'libcef_dll/ctocpp/render_process_handler_ctocpp.h',
'libcef_dll/cpptoc/request_cpptoc.cc',
'libcef_dll/cpptoc/request_cpptoc.h',
'libcef_dll/cpptoc/request_callback_cpptoc.cc',
'libcef_dll/cpptoc/request_callback_cpptoc.h',
'libcef_dll/cpptoc/request_context_cpptoc.cc',
'libcef_dll/cpptoc/request_context_cpptoc.h',
'libcef_dll/ctocpp/request_context_handler_ctocpp.cc',
@@ -700,8 +696,6 @@
'libcef_dll/cpptoc/render_process_handler_cpptoc.h',
'libcef_dll/ctocpp/request_ctocpp.cc',
'libcef_dll/ctocpp/request_ctocpp.h',
'libcef_dll/ctocpp/request_callback_ctocpp.cc',
'libcef_dll/ctocpp/request_callback_ctocpp.h',
'libcef_dll/ctocpp/request_context_ctocpp.cc',
'libcef_dll/ctocpp/request_context_ctocpp.h',
'libcef_dll/cpptoc/request_context_handler_cpptoc.cc',

View File

@@ -56,6 +56,7 @@
'include/internal/cef_time.h',
'include/internal/cef_trace_event_internal.h',
'include/internal/cef_types.h',
'include/internal/cef_types_geometry.h',
],
'includes_capi': [
'include/capi/cef_base_capi.h',

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

@@ -54,9 +54,6 @@
// auto cb = base::BindOnce(&C::F, instance);
// std::move(cb).Run(); // Identical to instance->F()
//
// base::Bind is currently a type alias for base::BindRepeating(). In the
// future, we expect to flip this to default to base::BindOnce().
//
// See //docs/callback.md for the full documentation.
//
// -----------------------------------------------------------------------------
@@ -126,17 +123,6 @@ BindRepeating(Functor&& functor, Args&&... args) {
std::forward<Args>(args)...);
}
// Unannotated Bind.
// TODO(tzik): Deprecate this and migrate to OnceCallback and
// RepeatingCallback, once they get ready.
template <typename Functor, typename... Args>
inline Callback<internal::MakeUnboundRunType<Functor, Args...>> Bind(
Functor&& functor,
Args&&... args) {
return base::BindRepeating(std::forward<Functor>(functor),
std::forward<Args>(args)...);
}
// Special cases for binding to a base::Callback without extra bound arguments.
// We CHECK() the validity of callback to guard against null pointers
// accidentally ending up in posted tasks, causing hard-to-debug crashes.
@@ -159,12 +145,6 @@ RepeatingCallback<Signature> BindRepeating(
return callback;
}
template <typename Signature>
Callback<Signature> Bind(Callback<Signature> callback) {
CHECK(callback);
return callback;
}
// Unretained() allows binding a non-refcounted class, and to disable
// refcounting on arguments that are refcounted objects.
//

View File

@@ -60,9 +60,6 @@
// will be a no-op. Note that |IsCancelled()| and |is_null()| are distinct:
// simply cancelling a callback will not also make it null.
//
// base::Callback is currently a type alias for base::RepeatingCallback. In the
// future, we expect to flip this to default to base::OnceCallback.
//
// See https://chromium.googlesource.com/chromium/src/+/HEAD/docs/callback.md
// for the full documentation.
@@ -115,7 +112,7 @@ class OnceCallback<R(Args...)> : public internal::CallbackBase {
return *this;
}
R Run(Args... args) const & {
R Run(Args... args) const& {
static_assert(!sizeof(*this),
"OnceCallback::Run() may only be invoked on a non-const "
"rvalue, i.e. std::move(callback).Run().");
@@ -195,7 +192,7 @@ class RepeatingCallback<R(Args...)> : public internal::CallbackBaseCopyable {
return !operator==(other);
}
R Run(Args... args) const & {
R Run(Args... args) const& {
PolymorphicInvoke f =
reinterpret_cast<PolymorphicInvoke>(this->polymorphic_invoke());
return f(this->bind_state_.get(), std::forward<Args>(args)...);

View File

@@ -48,15 +48,11 @@ class OnceCallback;
template <typename Signature>
class RepeatingCallback;
template <typename Signature>
using Callback = RepeatingCallback<Signature>;
// Syntactic sugar to make OnceClosure<void()> and RepeatingClosure<void()>
// easier to declare since they will be used in a lot of APIs with delayed
// execution.
using OnceClosure = OnceCallback<void()>;
using RepeatingClosure = RepeatingCallback<void()>;
using Closure = Callback<void()>;
} // namespace base

View File

@@ -83,10 +83,10 @@
#include "include/base/cef_bind.h"
#include "include/base/cef_callback.h"
#include "include/base/internal/cef_callback_internal.h"
#include "include/base/cef_logging.h"
#include "include/base/cef_compiler_specific.h"
#include "include/base/cef_logging.h"
#include "include/base/cef_weak_ptr.h"
#include "include/base/internal/cef_callback_internal.h"
namespace base {
namespace internal {
@@ -113,9 +113,7 @@ class CancelableCallbackImpl {
}
// Returns true if the wrapped callback has been cancelled.
bool IsCancelled() const {
return callback_.is_null();
}
bool IsCancelled() const { return callback_.is_null(); }
// Sets |callback| as the closure that may be cancelled. |callback| may not
// be null. Outstanding and any previously wrapped callbacks are cancelled.
@@ -180,10 +178,6 @@ using CancelableRepeatingCallback =
internal::CancelableCallbackImpl<RepeatingCallback<Signature>>;
using CancelableRepeatingClosure = CancelableRepeatingCallback<void()>;
template <typename Signature>
using CancelableCallback = CancelableRepeatingCallback<Signature>;
using CancelableClosure = CancelableCallback<void()>;
} // namespace base
#endif // !USING_CHROMIUM_INCLUDES

View File

@@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=6e192c6e8a59c37e98e458578a287dd36b8ed90f$
// $hash=b83b96e2b90124bba8084e2df7f66cc6749df872$
//
#ifndef CEF_INCLUDE_CAPI_CEF_BROWSER_CAPI_H_
@@ -681,12 +681,6 @@ typedef struct _cef_browser_host_t {
void(CEF_CALLBACK* send_touch_event)(struct _cef_browser_host_t* self,
const struct _cef_touch_event_t* event);
///
// Send a focus event to the browser.
///
void(CEF_CALLBACK* send_focus_event)(struct _cef_browser_host_t* self,
int setFocus);
///
// Send a capture lost event to the browser.
///

View File

@@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=5af5bf1e877dd53f21f751d332a9e2166817324c$
// $hash=3ecebd6b30bb8fb837e062eacd021c1a1ff3620a$
//
#ifndef CEF_INCLUDE_CAPI_CEF_COMMAND_LINE_CAPI_H_
@@ -53,8 +53,9 @@ extern "C" {
// optionally have a value specified using the '=' delimiter (e.g.
// "-switch=value"). An argument of "--" will terminate switch parsing with all
// subsequent tokens, regardless of prefix, being interpreted as non-switch
// arguments. Switch names are considered case-insensitive. This structure can
// be used before cef_initialize() is called.
// arguments. Switch names should be lowercase ASCII and will be converted to
// such if necessary. Switch values will retain the original case and UTF8
// encoding. This structure can be used before cef_initialize() is called.
///
typedef struct _cef_command_line_t {
///

View File

@@ -1,74 +0,0 @@
// 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=273af5bd01c6ab5d4df8efb2af2b4e2da9c21760$
//
#ifndef CEF_INCLUDE_CAPI_CEF_REQUEST_CALLBACK_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_REQUEST_CALLBACK_CAPI_H_
#pragma once
#include "include/capi/cef_base_capi.h"
#ifdef __cplusplus
extern "C" {
#endif
///
// Callback structure used for asynchronous continuation of url requests.
///
typedef struct _cef_request_callback_t {
///
// Base structure.
///
cef_base_ref_counted_t base;
///
// Continue the url request. If |allow| is true (1) the request will be
// continued. Otherwise, the request will be canceled.
///
void(CEF_CALLBACK* cont)(struct _cef_request_callback_t* self, int allow);
///
// Cancel the url request.
///
void(CEF_CALLBACK* cancel)(struct _cef_request_callback_t* self);
} cef_request_callback_t;
#ifdef __cplusplus
}
#endif
#endif // CEF_INCLUDE_CAPI_CEF_REQUEST_CALLBACK_CAPI_H_

View File

@@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=1d8b3f540a8305ce1738c5fe7c716434062c67b0$
// $hash=83ff671e8a4db001029be8a02a414333fe4354af$
//
#ifndef CEF_INCLUDE_CAPI_CEF_REQUEST_HANDLER_CAPI_H_
@@ -43,8 +43,8 @@
#include "include/capi/cef_auth_callback_capi.h"
#include "include/capi/cef_base_capi.h"
#include "include/capi/cef_browser_capi.h"
#include "include/capi/cef_callback_capi.h"
#include "include/capi/cef_frame_capi.h"
#include "include/capi/cef_request_callback_capi.h"
#include "include/capi/cef_request_capi.h"
#include "include/capi/cef_resource_request_handler_capi.h"
#include "include/capi/cef_ssl_info_capi.h"
@@ -180,31 +180,30 @@ typedef struct _cef_request_handler_t {
// size via the webkitStorageInfo.requestQuota function. |origin_url| is the
// origin of the page making the request. |new_size| is the requested quota
// size in bytes. Return true (1) to continue the request and call
// cef_request_callback_t::cont() either in this function or at a later time
// to grant or deny the request. Return false (0) to cancel the request
// cef_callback_t functions either in this function or at a later time to
// grant or deny the request. Return false (0) to cancel the request
// immediately.
///
int(CEF_CALLBACK* on_quota_request)(struct _cef_request_handler_t* self,
struct _cef_browser_t* browser,
const cef_string_t* origin_url,
int64 new_size,
struct _cef_request_callback_t* callback);
struct _cef_callback_t* callback);
///
// Called on the UI thread to handle requests for URLs with an invalid SSL
// certificate. Return true (1) and call cef_request_callback_t::cont() either
// in this function or at a later time to continue or cancel the request.
// Return false (0) to cancel the request immediately. If
// certificate. Return true (1) and call cef_callback_t functions either in
// this function or at a later time to continue or cancel the request. Return
// false (0) to cancel the request immediately. If
// CefSettings.ignore_certificate_errors is set all invalid certificates will
// be accepted without calling this function.
///
int(CEF_CALLBACK* on_certificate_error)(
struct _cef_request_handler_t* self,
struct _cef_browser_t* browser,
cef_errorcode_t cert_error,
const cef_string_t* request_url,
struct _cef_sslinfo_t* ssl_info,
struct _cef_request_callback_t* callback);
int(CEF_CALLBACK* on_certificate_error)(struct _cef_request_handler_t* self,
struct _cef_browser_t* browser,
cef_errorcode_t cert_error,
const cef_string_t* request_url,
struct _cef_sslinfo_t* ssl_info,
struct _cef_callback_t* callback);
///
// Called on the UI thread when a client certificate is being requested for

View File

@@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=aec52d0efc8407495fe1fc4821616673da7ed17a$
// $hash=7276396521b8b61cf856050244f558baa3a52e04$
//
#ifndef CEF_INCLUDE_CAPI_CEF_RESOURCE_REQUEST_HANDLER_CAPI_H_
@@ -42,8 +42,8 @@
#include "include/capi/cef_base_capi.h"
#include "include/capi/cef_browser_capi.h"
#include "include/capi/cef_callback_capi.h"
#include "include/capi/cef_frame_capi.h"
#include "include/capi/cef_request_callback_capi.h"
#include "include/capi/cef_request_capi.h"
#include "include/capi/cef_resource_handler_capi.h"
#include "include/capi/cef_response_capi.h"
@@ -87,8 +87,8 @@ typedef struct _cef_resource_request_handler_t {
// or change the resource load optionally modify |request|. Modification of
// the request URL will be treated as a redirect. Return RV_CONTINUE to
// continue the request immediately. Return RV_CONTINUE_ASYNC and call
// cef_request_callback_t:: cont() at a later time to continue or cancel the
// request asynchronously. Return RV_CANCEL to cancel the request immediately.
// cef_callback_t functions at a later time to continue or cancel the request
// asynchronously. Return RV_CANCEL to cancel the request immediately.
//
///
cef_return_value_t(CEF_CALLBACK* on_before_resource_load)(
@@ -96,7 +96,7 @@ typedef struct _cef_resource_request_handler_t {
struct _cef_browser_t* browser,
struct _cef_frame_t* frame,
struct _cef_request_t* request,
struct _cef_request_callback_t* callback);
struct _cef_callback_t* callback);
///
// Called on the IO thread before a resource is loaded. The |browser| and

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 "b737ecfff4042edbbcb166d0af38556cb0ab8212"
#define CEF_API_HASH_UNIVERSAL "21ac25aebdb49a8e8088c6fbee802b04fd07b501"
#if defined(OS_WIN)
#define CEF_API_HASH_PLATFORM "7a55350a33b3cb6cb82659df7f4ee756b95482ef"
#define CEF_API_HASH_PLATFORM "1d81ccb5ba2f6d658abde2faeb490c8f7f6a60fe"
#elif defined(OS_MAC)
#define CEF_API_HASH_PLATFORM "24e05cd9bb4be12dfec61c5e19f0b279fc658f1d"
#define CEF_API_HASH_PLATFORM "d6bd1ab64a160962ee0306625da5dd2a0cae8b31"
#elif defined(OS_LINUX)
#define CEF_API_HASH_PLATFORM "55203c04095f193d3eb9966c40b601aad54188d2"
#define CEF_API_HASH_PLATFORM "0b5227787444955a548b7544b2cdcda95a354506"
#endif
#ifdef __cplusplus

View File

@@ -708,12 +708,6 @@ class CefBrowserHost : public virtual CefBaseRefCounted {
/*--cef()--*/
virtual void SendTouchEvent(const CefTouchEvent& event) = 0;
///
// Send a focus event to the browser.
///
/*--cef()--*/
virtual void SendFocusEvent(bool setFocus) = 0;
///
// Send a capture lost event to the browser.
///

View File

@@ -49,8 +49,9 @@
// optionally have a value specified using the '=' delimiter (e.g.
// "-switch=value"). An argument of "--" will terminate switch parsing with all
// subsequent tokens, regardless of prefix, being interpreted as non-switch
// arguments. Switch names are considered case-insensitive. This class can be
// used before CefInitialize() is called.
// arguments. Switch names should be lowercase ASCII and will be converted to
// such if necessary. Switch values will retain the original case and UTF8
// encoding. This class can be used before CefInitialize() is called.
///
/*--cef(source=library,no_debugct_check)--*/
class CefCommandLine : public virtual CefBaseRefCounted {

View File

@@ -43,9 +43,9 @@
#include "include/cef_auth_callback.h"
#include "include/cef_base.h"
#include "include/cef_browser.h"
#include "include/cef_callback.h"
#include "include/cef_frame.h"
#include "include/cef_request.h"
#include "include/cef_request_callback.h"
#include "include/cef_resource_request_handler.h"
#include "include/cef_ssl_info.h"
#include "include/cef_x509_certificate.h"
@@ -176,32 +176,32 @@ class CefRequestHandler : public virtual CefBaseRefCounted {
// Called on the IO thread when JavaScript requests a specific storage quota
// size via the webkitStorageInfo.requestQuota function. |origin_url| is the
// origin of the page making the request. |new_size| is the requested quota
// size in bytes. Return true to continue the request and call
// CefRequestCallback::Continue() either in this method or at a later time to
// grant or deny the request. Return false to cancel the request immediately.
// size in bytes. Return true to continue the request and call CefCallback
// methods either in this method or at a later time to grant or deny the
// request. Return false to cancel the request immediately.
///
/*--cef()--*/
virtual bool OnQuotaRequest(CefRefPtr<CefBrowser> browser,
const CefString& origin_url,
int64 new_size,
CefRefPtr<CefRequestCallback> callback) {
CefRefPtr<CefCallback> callback) {
return false;
}
///
// Called on the UI thread to handle requests for URLs with an invalid
// SSL certificate. Return true and call CefRequestCallback::Continue() either
// in this method or at a later time to continue or cancel the request. Return
// false to cancel the request immediately. If
// CefSettings.ignore_certificate_errors is set all invalid certificates will
// be accepted without calling this method.
// SSL certificate. Return true and call CefCallback methods either in this
// method or at a later time to continue or cancel the request. Return false
// to cancel the request immediately. If CefSettings.ignore_certificate_errors
// is set all invalid certificates will be accepted without calling this
// method.
///
/*--cef()--*/
virtual bool OnCertificateError(CefRefPtr<CefBrowser> browser,
cef_errorcode_t cert_error,
const CefString& request_url,
CefRefPtr<CefSSLInfo> ssl_info,
CefRefPtr<CefRequestCallback> callback) {
CefRefPtr<CefCallback> callback) {
return false;
}

View File

@@ -40,9 +40,9 @@
#include "include/cef_base.h"
#include "include/cef_browser.h"
#include "include/cef_callback.h"
#include "include/cef_frame.h"
#include "include/cef_request.h"
#include "include/cef_request_callback.h"
#include "include/cef_resource_handler.h"
#include "include/cef_response.h"
#include "include/cef_response_filter.h"
@@ -81,18 +81,17 @@ class CefResourceRequestHandler : public virtual CefBaseRefCounted {
// requests originating from service workers or CefURLRequest. To redirect or
// change the resource load optionally modify |request|. Modification of the
// request URL will be treated as a redirect. Return RV_CONTINUE to continue
// the request immediately. Return RV_CONTINUE_ASYNC and call
// CefRequestCallback:: Continue() at a later time to continue or cancel the
// request asynchronously. Return RV_CANCEL to cancel the request immediately.
// the request immediately. Return RV_CONTINUE_ASYNC and call CefCallback
// methods at a later time to continue or cancel the request asynchronously.
// Return RV_CANCEL to cancel the request immediately.
//
///
/*--cef(optional_param=browser,optional_param=frame,
default_retval=RV_CONTINUE)--*/
virtual ReturnValue OnBeforeResourceLoad(
CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefRequest> request,
CefRefPtr<CefRequestCallback> callback) {
virtual ReturnValue OnBeforeResourceLoad(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefRequest> request,
CefRefPtr<CefCallback> callback) {
return RV_CONTINUE;
}

View File

@@ -81,10 +81,7 @@ struct CefWindowInfoTraits {
bool copy) {
cef_string_set(src->window_name.str, src->window_name.length,
&target->window_name, copy);
target->x = src->x;
target->y = src->y;
target->width = src->width;
target->height = src->height;
target->bounds = src->bounds;
target->parent_window = src->parent_window;
target->windowless_rendering_enabled = src->windowless_rendering_enabled;
target->shared_texture_enabled = src->shared_texture_enabled;
@@ -105,12 +102,9 @@ class CefWindowInfo : public CefStructBase<CefWindowInfoTraits> {
///
// Create the browser as a child window.
///
void SetAsChild(CefWindowHandle parent, const CefRect& windowRect) {
void SetAsChild(CefWindowHandle parent, const CefRect& bounds) {
parent_window = parent;
x = windowRect.x;
y = windowRect.y;
width = windowRect.width;
height = windowRect.height;
this->bounds = bounds;
}
///

View File

@@ -81,10 +81,7 @@ struct CefWindowInfoTraits {
bool copy) {
cef_string_set(src->window_name.str, src->window_name.length,
&target->window_name, copy);
target->x = src->x;
target->y = src->y;
target->width = src->width;
target->height = src->height;
target->bounds = src->bounds;
target->hidden = src->hidden;
target->parent_view = src->parent_view;
target->windowless_rendering_enabled = src->windowless_rendering_enabled;
@@ -106,12 +103,9 @@ class CefWindowInfo : public CefStructBase<CefWindowInfoTraits> {
///
// Create the browser as a child view.
///
void SetAsChild(CefWindowHandle parent, int x, int y, int width, int height) {
void SetAsChild(CefWindowHandle parent, const CefRect& bounds) {
parent_view = parent;
this->x = x;
this->y = y;
this->width = width;
this->height = height;
this->bounds = bounds;
hidden = false;
}

View File

@@ -35,6 +35,7 @@
#include "include/internal/cef_string.h"
#include "include/internal/cef_string_list.h"
#include "include/internal/cef_time.h"
#include "include/internal/cef_types_geometry.h"
// Bring in platform-specific definitions.
#if defined(OS_WIN)
@@ -389,17 +390,6 @@ typedef struct _cef_settings_t {
///
int uncaught_exception_stack_size;
///
// Set to true (1) to ignore errors related to invalid SSL certificates.
// Enabling this setting can lead to potential security vulnerabilities like
// "man in the middle" attacks. Applications that load content from the
// internet should not enable this setting. Also configurable using the
// "ignore-certificate-errors" command-line switch. Can be overridden for
// individual CefRequestContext instances via the
// CefRequestContextSettings.ignore_certificate_errors value.
///
int ignore_certificate_errors;
///
// Background color used for the browser before a document is loaded and when
// no document color is specified. The alpha component must be either fully
@@ -485,16 +475,6 @@ typedef struct _cef_request_context_settings_t {
///
int persist_user_preferences;
///
// Set to true (1) to ignore errors related to invalid SSL certificates.
// Enabling this setting can lead to potential security vulnerabilities like
// "man in the middle" attacks. Applications that load content from the
// internet should not enable this setting. Can be set globally using the
// CefSettings.ignore_certificate_errors value. This value will be ignored if
// |cache_path| matches the CefSettings.cache_path value.
///
int ignore_certificate_errors;
///
// Comma delimited ordered list of language codes without any whitespace that
// will be used in the "Accept-Language" HTTP header. Can be set globally
@@ -602,18 +582,6 @@ typedef struct _cef_browser_settings_t {
///
cef_state_t plugins;
///
// Controls whether file URLs will have access to all URLs. Also configurable
// using the "allow-universal-access-from-files" command-line switch.
///
cef_state_t universal_access_from_file_urls;
///
// Controls whether file URLs will have access to other file URLs. Also
// configurable using the "allow-access-from-files" command-line switch.
///
cef_state_t file_access_from_file_urls;
///
// Controls whether image URLs will be loaded from the network. A cached image
// will still be rendered if requested. Also configurable using the
@@ -652,12 +620,6 @@ typedef struct _cef_browser_settings_t {
///
cef_state_t databases;
///
// Controls whether the application cache can be used. Also configurable using
// the "disable-application-cache" command-line switch.
///
cef_state_t application_cache;
///
// Controls whether WebGL can be used. Note that WebGL requires hardware
// support and may not work on all systems even when enabled. Also
@@ -1159,7 +1121,7 @@ typedef enum {
// A resource that a plugin requested.
///
RT_PLUGIN_RESOURCE,
///
// A main-frame service worker navigation preload request.
///
@@ -1372,51 +1334,6 @@ typedef enum {
UR_FAILED,
} cef_urlrequest_status_t;
///
// Structure representing a point.
///
typedef struct _cef_point_t {
int x;
int y;
} cef_point_t;
///
// Structure representing a rectangle.
///
typedef struct _cef_rect_t {
int x;
int y;
int width;
int height;
} cef_rect_t;
///
// Structure representing a size.
///
typedef struct _cef_size_t {
int width;
int height;
} cef_size_t;
///
// Structure representing a range.
///
typedef struct _cef_range_t {
int from;
int to;
} cef_range_t;
///
// Structure representing insets.
///
typedef struct _cef_insets_t {
int top;
int left;
int bottom;
int right;
} cef_insets_t;
///
// Structure representing a draggable region.
///
typedef struct _cef_draggable_region_t {
@@ -2958,6 +2875,14 @@ typedef enum {
CEF_SCHEME_OPTION_FETCH_ENABLED = 1 << 6,
} cef_scheme_options_t;
///
// Structure representing a range.
///
typedef struct _cef_range_t {
int from;
int to;
} cef_range_t;
///
// Composition underline style.
///
@@ -3219,6 +3144,16 @@ typedef enum {
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

@@ -1,4 +1,4 @@
// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2014 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
@@ -26,38 +26,53 @@
// 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_REQUEST_CALLBACK_H_
#define CEF_INCLUDE_CEF_REQUEST_CALLBACK_H_
#ifndef CEF_INCLUDE_INTERNAL_CEF_TYPES_GEOMETRY_H_
#define CEF_INCLUDE_INTERNAL_CEF_TYPES_GEOMETRY_H_
#pragma once
#include "include/cef_base.h"
#ifdef __cplusplus
extern "C" {
#endif
///
// Callback interface used for asynchronous continuation of url requests.
// Structure representing a point.
///
/*--cef(source=library)--*/
class CefRequestCallback : public virtual CefBaseRefCounted {
public:
///
// Continue the url request. If |allow| is true the request will be continued.
// Otherwise, the request will be canceled.
///
/*--cef(capi_name=cont)--*/
virtual void Continue(bool allow) = 0;
typedef struct _cef_point_t {
int x;
int y;
} cef_point_t;
///
// Cancel the url request.
///
/*--cef()--*/
virtual void Cancel() = 0;
};
///
// Structure representing a rectangle.
///
typedef struct _cef_rect_t {
int x;
int y;
int width;
int height;
} cef_rect_t;
#endif // CEF_INCLUDE_CEF_REQUEST_CALLBACK_H_
///
// Structure representing a size.
///
typedef struct _cef_size_t {
int width;
int height;
} cef_size_t;
///
// Structure representing insets.
///
typedef struct _cef_insets_t {
int top;
int left;
int bottom;
int right;
} cef_insets_t;
#ifdef __cplusplus
}
#endif
#endif // CEF_INCLUDE_INTERNAL_CEF_TYPES_GEOMETRY_H_

View File

@@ -43,6 +43,7 @@ typedef struct _XDisplay XDisplay;
#include "include/internal/cef_export.h"
#include "include/internal/cef_string.h"
#include "include/internal/cef_types_geometry.h"
// Handle types.
#if defined(CEF_X11)
@@ -93,10 +94,10 @@ typedef struct _cef_window_info_t {
///
cef_string_t window_name;
unsigned int x;
unsigned int y;
unsigned int width;
unsigned int height;
///
// Initial window bounds.
///
cef_rect_t bounds;
///
// Pointer for the parent window.

View File

@@ -35,6 +35,7 @@
#if defined(OS_MAC)
#include "include/internal/cef_string.h"
#include "include/internal/cef_types_geometry.h"
// Handle types.
// Actually NSCursor*
@@ -85,10 +86,11 @@ typedef struct _cef_main_args_t {
///
typedef struct _cef_window_info_t {
cef_string_t window_name;
int x;
int y;
int width;
int height;
///
// Initial window bounds.
///
cef_rect_t bounds;
///
// Set to true (1) to create the view initially hidden.

View File

@@ -35,7 +35,9 @@
#if defined(OS_WIN)
#include <windows.h>
#include "include/internal/cef_string.h"
#include "include/internal/cef_types_geometry.h"
// Handle types.
#define cef_cursor_handle_t HCURSOR
@@ -53,7 +55,9 @@ extern "C" {
///
// Structure representing CefExecuteProcess arguments.
///
typedef struct _cef_main_args_t { HINSTANCE instance; } cef_main_args_t;
typedef struct _cef_main_args_t {
HINSTANCE instance;
} cef_main_args_t;
///
// Structure representing window information.
@@ -63,10 +67,7 @@ typedef struct _cef_window_info_t {
DWORD ex_style;
cef_string_t window_name;
DWORD style;
int x;
int y;
int width;
int height;
cef_rect_t bounds;
cef_window_handle_t parent_window;
HMENU menu;

View File

@@ -594,7 +594,6 @@ struct CefSettingsTraits {
target->pack_loading_disabled = src->pack_loading_disabled;
target->remote_debugging_port = src->remote_debugging_port;
target->uncaught_exception_stack_size = src->uncaught_exception_stack_size;
target->ignore_certificate_errors = src->ignore_certificate_errors;
target->background_color = src->background_color;
cef_string_set(src->accept_language_list.str,
@@ -636,7 +635,6 @@ struct CefRequestContextSettingsTraits {
&target->cache_path, copy);
target->persist_session_cookies = src->persist_session_cookies;
target->persist_user_preferences = src->persist_user_preferences;
target->ignore_certificate_errors = src->ignore_certificate_errors;
cef_string_set(src->accept_language_list.str,
src->accept_language_list.length,
&target->accept_language_list, copy);
@@ -707,9 +705,6 @@ struct CefBrowserSettingsTraits {
target->javascript_access_clipboard = src->javascript_access_clipboard;
target->javascript_dom_paste = src->javascript_dom_paste;
target->plugins = src->plugins;
target->universal_access_from_file_urls =
src->universal_access_from_file_urls;
target->file_access_from_file_urls = src->file_access_from_file_urls;
target->image_loading = src->image_loading;
target->image_shrink_standalone_to_fit =
src->image_shrink_standalone_to_fit;
@@ -717,7 +712,6 @@ struct CefBrowserSettingsTraits {
target->tab_to_links = src->tab_to_links;
target->local_storage = src->local_storage;
target->databases = src->databases;
target->application_cache = src->application_cache;
target->webgl = src->webgl;
target->background_color = src->background_color;

View File

@@ -81,10 +81,7 @@ struct CefWindowInfoTraits {
cef_string_set(src->window_name.str, src->window_name.length,
&target->window_name, copy);
target->style = src->style;
target->x = src->x;
target->y = src->y;
target->width = src->width;
target->height = src->height;
target->bounds = src->bounds;
target->parent_window = src->parent_window;
target->menu = src->menu;
target->windowless_rendering_enabled = src->windowless_rendering_enabled;
@@ -108,14 +105,11 @@ class CefWindowInfo : public CefStructBase<CefWindowInfoTraits> {
///
// Create the browser as a child window.
///
void SetAsChild(CefWindowHandle parent, RECT windowRect) {
void SetAsChild(CefWindowHandle parent, const CefRect& windowBounds) {
style =
WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_TABSTOP | WS_VISIBLE;
parent_window = parent;
x = windowRect.left;
y = windowRect.top;
width = windowRect.right - windowRect.left;
height = windowRect.bottom - windowRect.top;
bounds = windowBounds;
}
///
@@ -125,10 +119,10 @@ class CefWindowInfo : public CefStructBase<CefWindowInfoTraits> {
style =
WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_VISIBLE;
parent_window = parent;
x = CW_USEDEFAULT;
y = CW_USEDEFAULT;
width = CW_USEDEFAULT;
height = CW_USEDEFAULT;
bounds.x = CW_USEDEFAULT;
bounds.y = CW_USEDEFAULT;
bounds.width = CW_USEDEFAULT;
bounds.height = CW_USEDEFAULT;
cef_string_copy(windowName.c_str(), windowName.length(), &window_name);
}

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

@@ -292,11 +292,10 @@ class CefResourceManager
// Called from CefRequestHandler::OnBeforeResourceLoad on the browser process
// IO thread.
///
cef_return_value_t OnBeforeResourceLoad(
CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefRequest> request,
CefRefPtr<CefRequestCallback> callback);
cef_return_value_t OnBeforeResourceLoad(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefRequest> request,
CefRefPtr<CefCallback> callback);
///
// Called from CefRequestHandler::GetResourceHandler on the browser process
@@ -327,7 +326,7 @@ class CefResourceManager
base::WeakPtr<CefResourceManager> manager_;
// Callback to execute once request handling is complete.
CefRefPtr<CefRequestCallback> callback_;
CefRefPtr<CefCallback> callback_;
// Position of the currently associated ProviderEntry in the |providers_|
// list.

View File

@@ -365,7 +365,7 @@ void AlloyBrowserHostImpl::SetFocusInternal(bool focus) {
if (focus)
OnSetFocus(FOCUS_SOURCE_SYSTEM);
else if (platform_delegate_)
platform_delegate_->SendFocusEvent(false);
platform_delegate_->SetFocus(false);
}
CefWindowHandle AlloyBrowserHostImpl::GetWindowHandle() {
@@ -653,10 +653,6 @@ void AlloyBrowserHostImpl::SendTouchEvent(const CefTouchEvent& event) {
platform_delegate_->SendTouchEvent(event);
}
void AlloyBrowserHostImpl::SendFocusEvent(bool setFocus) {
SetFocus(setFocus);
}
void AlloyBrowserHostImpl::SendCaptureLostEvent() {
if (!CEF_CURRENTLY_ON_UIT()) {
CEF_POST_TASK(
@@ -818,7 +814,7 @@ void AlloyBrowserHostImpl::OnSetFocus(cef_focus_source_t source) {
return;
if (platform_delegate_)
platform_delegate_->SendFocusEvent(true);
platform_delegate_->SetFocus(true);
}
void AlloyBrowserHostImpl::RunFileChooser(

View File

@@ -113,7 +113,6 @@ class AlloyBrowserHostImpl : public CefBrowserHostBase,
void Invalidate(PaintElementType type) override;
void SendExternalBeginFrame() override;
void SendTouchEvent(const CefTouchEvent& event) override;
void SendFocusEvent(bool setFocus) override;
void SendCaptureLostEvent() override;
void NotifyMoveOrResizeStarted() override;
int GetWindowlessFrameRate() override;

View File

@@ -162,7 +162,7 @@
namespace {
class CefQuotaCallbackImpl : public CefRequestCallback {
class CefQuotaCallbackImpl : public CefCallback {
public:
using CallbackType = content::QuotaPermissionContext::PermissionCallback;
@@ -181,22 +181,24 @@ class CefQuotaCallbackImpl : public CefRequestCallback {
}
}
void Continue(bool allow) override {
void Continue() override { ContinueNow(true); }
void Cancel() override { ContinueNow(false); }
CallbackType Disconnect() WARN_UNUSED_RESULT { return std::move(callback_); }
private:
void ContinueNow(bool allow) {
if (CEF_CURRENTLY_ON_IOT()) {
if (!callback_.is_null()) {
RunNow(std::move(callback_), allow);
}
} else {
CEF_POST_TASK(CEF_IOT, base::BindOnce(&CefQuotaCallbackImpl::Continue,
CEF_POST_TASK(CEF_IOT, base::BindOnce(&CefQuotaCallbackImpl::ContinueNow,
this, allow));
}
}
void Cancel() override { Continue(false); }
CallbackType Disconnect() WARN_UNUSED_RESULT { return std::move(callback_); }
private:
static void RunNow(CallbackType callback, bool allow) {
CEF_REQUIRE_IOT();
std::move(callback).Run(
@@ -211,7 +213,7 @@ class CefQuotaCallbackImpl : public CefRequestCallback {
DISALLOW_COPY_AND_ASSIGN(CefQuotaCallbackImpl);
};
class CefAllowCertificateErrorCallbackImpl : public CefRequestCallback {
class CefAllowCertificateErrorCallbackImpl : public CefCallback {
public:
typedef base::OnceCallback<void(content::CertificateRequestResultType)>
CallbackType;
@@ -233,7 +235,14 @@ class CefAllowCertificateErrorCallbackImpl : public CefRequestCallback {
}
}
void Continue(bool allow) override {
void Continue() override { ContinueNow(true); }
void Cancel() override { ContinueNow(false); }
CallbackType Disconnect() WARN_UNUSED_RESULT { return std::move(callback_); }
private:
void ContinueNow(bool allow) {
if (CEF_CURRENTLY_ON_UIT()) {
if (!callback_.is_null()) {
RunNow(std::move(callback_), allow);
@@ -241,16 +250,11 @@ class CefAllowCertificateErrorCallbackImpl : public CefRequestCallback {
} else {
CEF_POST_TASK(
CEF_UIT,
base::BindOnce(&CefAllowCertificateErrorCallbackImpl::Continue, this,
allow));
base::BindOnce(&CefAllowCertificateErrorCallbackImpl::ContinueNow,
this, allow));
}
}
void Cancel() override { Continue(false); }
CallbackType Disconnect() WARN_UNUSED_RESULT { return std::move(callback_); }
private:
static void RunNow(CallbackType callback, bool allow) {
CEF_REQUIRE_UIT();
std::move(callback).Run(
@@ -946,10 +950,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(

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(

View File

@@ -157,13 +157,13 @@ bool CefBrowserInfoManager::CanCreateWindow(
#if (defined(OS_WIN) || defined(OS_MAC))
// Default to the size from the popup features.
if (cef_features.xSet)
window_info->x = cef_features.x;
window_info->bounds.x = cef_features.x;
if (cef_features.ySet)
window_info->y = cef_features.y;
window_info->bounds.y = cef_features.y;
if (cef_features.widthSet)
window_info->width = cef_features.width;
window_info->bounds.width = cef_features.width;
if (cef_features.heightSet)
window_info->height = cef_features.height;
window_info->bounds.height = cef_features.height;
#endif
allow = !handler->OnBeforePopup(

View File

@@ -172,7 +172,7 @@ void CefBrowserPlatformDelegate::SendTouchEvent(const CefTouchEvent& event) {
NOTIMPLEMENTED();
}
void CefBrowserPlatformDelegate::SendFocusEvent(bool setFocus) {
void CefBrowserPlatformDelegate::SetFocus(bool setFocus) {
NOTIMPLEMENTED();
}

View File

@@ -225,7 +225,7 @@ class CefBrowserPlatformDelegate {
// Send focus event. The browser's WebContents may be NULL when this method is
// called.
virtual void SendFocusEvent(bool setFocus);
virtual void SetFocus(bool setFocus);
// Send capture lost event.
virtual void SendCaptureLostEvent();

View File

@@ -56,8 +56,6 @@ CefRefPtr<ChromeBrowserHostImpl> ChromeBrowserHostImpl::Create(
ChromeBrowserHostImpl::GetBrowserForContents(web_contents);
CHECK(browser_host);
browser->window()->Show();
return browser_host;
}
@@ -275,10 +273,6 @@ void ChromeBrowserHostImpl::SendTouchEvent(const CefTouchEvent& event) {
NOTIMPLEMENTED();
}
void ChromeBrowserHostImpl::SendFocusEvent(bool setFocus) {
NOTIMPLEMENTED();
}
void ChromeBrowserHostImpl::SendCaptureLostEvent() {
NOTIMPLEMENTED();
}

View File

@@ -93,7 +93,6 @@ class ChromeBrowserHostImpl : public CefBrowserHostBase {
void Invalidate(PaintElementType type) override;
void SendExternalBeginFrame() override;
void SendTouchEvent(const CefTouchEvent& event) override;
void SendFocusEvent(bool setFocus) override;
void SendCaptureLostEvent() override;
void NotifyMoveOrResizeStarted() override;
int GetWindowlessFrameRate() override;

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

@@ -434,9 +434,6 @@ void CefContext::PopulateGlobalRequestContextSettings(
settings->persist_user_preferences =
settings_.persist_user_preferences ||
command_line->HasSwitch(switches::kPersistUserPreferences);
settings->ignore_certificate_errors =
settings_.ignore_certificate_errors ||
command_line->HasSwitch(switches::kIgnoreCertificateErrors);
CefString(&settings->cookieable_schemes_list) =
CefString(&settings_.cookieable_schemes_list);

View File

@@ -534,7 +534,8 @@ void CefDevToolsFrontend::HandleMessageFromDevToolsFrontend(
const std::string* url = params[0].GetIfString();
const std::string* content = params[1].GetIfString();
if (!url || !content)
return file_manager_.AppendToFile(*url, *content);
return;
file_manager_.AppendToFile(*url, *content);
} else {
return;
}

View File

@@ -77,7 +77,7 @@ void CefBrowserPlatformDelegateBackground::SendTouchEvent(
// Nothing to do here.
}
void CefBrowserPlatformDelegateBackground::SendFocusEvent(bool setFocus) {
void CefBrowserPlatformDelegateBackground::SetFocus(bool setFocus) {
// Nothing to do here.
}

View File

@@ -33,7 +33,7 @@ class CefBrowserPlatformDelegateBackground
int deltaX,
int deltaY) override;
void SendTouchEvent(const CefTouchEvent& event) override;
void SendFocusEvent(bool setFocus) override;
void SetFocus(bool setFocus) override;
gfx::Point GetScreenPoint(const gfx::Point& view) const override;
void ViewText(const std::string& text) override;
bool HandleKeyboardEvent(

View File

@@ -48,13 +48,13 @@ void CefBrowserPlatformDelegateNativeLinux::BrowserDestroyed(
bool CefBrowserPlatformDelegateNativeLinux::CreateHostWindow() {
DCHECK(!window_widget_);
if (window_info_.width == 0)
window_info_.width = 800;
if (window_info_.height == 0)
window_info_.height = 600;
if (window_info_.bounds.width == 0)
window_info_.bounds.width = 800;
if (window_info_.bounds.height == 0)
window_info_.bounds.height = 600;
gfx::Rect rect(window_info_.x, window_info_.y, window_info_.width,
window_info_.height);
gfx::Rect rect(window_info_.bounds.x, window_info_.bounds.y,
window_info_.bounds.width, window_info_.bounds.height);
#if defined(USE_X11)
DCHECK(!window_x11_);
@@ -133,7 +133,7 @@ views::Widget* CefBrowserPlatformDelegateNativeLinux::GetWindowWidget() const {
return window_widget_;
}
void CefBrowserPlatformDelegateNativeLinux::SendFocusEvent(bool setFocus) {
void CefBrowserPlatformDelegateNativeLinux::SetFocus(bool setFocus) {
if (!setFocus)
return;

View File

@@ -24,7 +24,7 @@ class CefBrowserPlatformDelegateNativeLinux
void CloseHostWindow() override;
CefWindowHandle GetHostWindowHandle() const override;
views::Widget* GetWindowWidget() const override;
void SendFocusEvent(bool setFocus) override;
void SetFocus(bool setFocus) override;
void NotifyMoveOrResizeStarted() override;
void SizeTo(int width, int height) override;
gfx::Point GetScreenPoint(const gfx::Point& view) const override;

View File

@@ -33,7 +33,7 @@ class CefBrowserPlatformDelegateNativeMac
int deltaX,
int deltaY) override;
void SendTouchEvent(const CefTouchEvent& event) override;
void SendFocusEvent(bool setFocus) override;
void SetFocus(bool setFocus) override;
gfx::Point GetScreenPoint(const gfx::Point& view) const override;
void ViewText(const std::string& text) override;
bool HandleKeyboardEvent(

View File

@@ -166,18 +166,18 @@ bool CefBrowserPlatformDelegateNativeMac::CreateHostWindow() {
NSView* parentView =
CAST_CEF_WINDOW_HANDLE_TO_NSVIEW(window_info_.parent_view);
NSRect contentRect = {{static_cast<CGFloat>(window_info_.x),
static_cast<CGFloat>(window_info_.y)},
{static_cast<CGFloat>(window_info_.width),
static_cast<CGFloat>(window_info_.height)}};
NSRect contentRect = {{static_cast<CGFloat>(window_info_.bounds.x),
static_cast<CGFloat>(window_info_.bounds.y)},
{static_cast<CGFloat>(window_info_.bounds.width),
static_cast<CGFloat>(window_info_.bounds.height)}};
if (parentView == nil) {
// Create a new window.
NSRect screen_rect = [[NSScreen mainScreen] visibleFrame];
NSRect window_rect = {
{static_cast<CGFloat>(window_info_.x),
screen_rect.size.height - static_cast<CGFloat>(window_info_.y)},
{static_cast<CGFloat>(window_info_.width),
static_cast<CGFloat>(window_info_.height)}};
{static_cast<CGFloat>(window_info_.bounds.x),
screen_rect.size.height - static_cast<CGFloat>(window_info_.bounds.y)},
{static_cast<CGFloat>(window_info_.bounds.width),
static_cast<CGFloat>(window_info_.bounds.height)}};
if (window_rect.size.width == 0)
window_rect.size.width = 750;
if (window_rect.size.height == 0)
@@ -310,7 +310,7 @@ void CefBrowserPlatformDelegateNativeMac::SendTouchEvent(
NOTIMPLEMENTED();
}
void CefBrowserPlatformDelegateNativeMac::SendFocusEvent(bool setFocus) {
void CefBrowserPlatformDelegateNativeMac::SetFocus(bool setFocus) {
auto view = GetHostView();
if (view) {
view->SetActive(setFocus);

View File

@@ -16,8 +16,10 @@
#include "libcef/browser/native/window_delegate_view.h"
#include "libcef/browser/thread_util.h"
#include "base/base_paths_win.h"
#include "base/files/file_util.h"
#include "base/memory/ref_counted_memory.h"
#include "base/path_service.h"
#include "base/strings/utf_string_conversions.h"
#include "base/win/registry.h"
#include "base/win/win_util.h"
@@ -60,12 +62,6 @@ void WriteTempFileAndView(scoped_refptr<base::RefCountedString> str) {
ui::win::OpenFileViaShell(tmp_file);
}
// According to Mozilla in uriloader/exthandler/win/nsOSHelperAppService.cpp:
// "Some versions of windows (Win2k before SP3, Win XP before SP1) crash in
// ShellExecute on long URLs (bug 161357 on bugzilla.mozilla.org). IE 5 and 6
// support URLS of 2083 chars in length, 2K is safe."
const int kMaxAddressLengthChars = 2048;
bool HasExternalHandler(const std::string& scheme) {
base::win::RegKey key;
const std::wstring registry_path =
@@ -84,17 +80,48 @@ bool HasExternalHandler(const std::string& scheme) {
return false;
}
// Match the logic in chrome/browser/platform_util_win.cc
// OpenExternalOnWorkerThread.
void ExecuteExternalProtocol(const GURL& url) {
CEF_REQUIRE_BLOCKING();
if (!HasExternalHandler(url.scheme()))
return;
const std::string& address = url.spec();
if (address.length() > kMaxAddressLengthChars)
// Quote the input scheme to be sure that the command does not have
// parameters unexpected by the external program. This url should already
// have been escaped.
std::string escaped_url = url.spec();
escaped_url.insert(0, "\"");
escaped_url += "\"";
// According to Mozilla in uriloader/exthandler/win/nsOSHelperAppService.cpp:
// "Some versions of windows (Win2k before SP3, Win XP before SP1) crash in
// ShellExecute on long URLs (bug 161357 on bugzilla.mozilla.org). IE 5 and 6
// support URLS of 2083 chars in length, 2K is safe."
//
// It may be possible to increase this. https://crbug.com/727909
const size_t kMaxUrlLength = 2048;
if (escaped_url.length() > kMaxUrlLength)
return;
ShellExecuteA(NULL, "open", address.c_str(), NULL, NULL, SW_SHOWNORMAL);
// Specify %windir%\system32 as the CWD so that any new proc spawned does not
// inherit this proc's CWD. Without this, uninstalls may be broken by a
// long-lived child proc that holds a handle to the browser's version
// directory (the browser's CWD). A process's CWD is in the standard list of
// directories to search when loading a DLL, and precedes the system directory
// when safe DLL search mode is disabled (not the default). Setting the CWD to
// the system directory is a nice way to mitigate a potential DLL search order
// hijack for processes that don't implement their own mitigation.
base::FilePath system_dir;
base::PathService::Get(base::DIR_SYSTEM, &system_dir);
if (reinterpret_cast<ULONG_PTR>(ShellExecuteA(
NULL, "open", escaped_url.c_str(), NULL,
system_dir.AsUTF8Unsafe().c_str(), SW_SHOWNORMAL)) <= 32) {
// On failure, it may be good to display a message to the user.
// https://crbug.com/727913
return;
}
}
// DPI value for 1x scale factor.
@@ -148,10 +175,10 @@ bool CefBrowserPlatformDelegateNativeWin::CreateHostWindow() {
// Create the new browser window.
CreateWindowEx(window_info_.ex_style, GetWndClass(), windowName.c_str(),
window_info_.style, window_info_.x, window_info_.y,
window_info_.width, window_info_.height,
window_info_.parent_window, window_info_.menu,
::GetModuleHandle(NULL), this);
window_info_.style, window_info_.bounds.x,
window_info_.bounds.y, window_info_.bounds.width,
window_info_.bounds.height, window_info_.parent_window,
window_info_.menu, ::GetModuleHandle(NULL), this);
// It's possible for CreateWindowEx to fail if the parent window was
// destroyed between the call to CreateBrowser and the above one.
@@ -243,7 +270,7 @@ views::Widget* CefBrowserPlatformDelegateNativeWin::GetWindowWidget() const {
return window_widget_;
}
void CefBrowserPlatformDelegateNativeWin::SendFocusEvent(bool setFocus) {
void CefBrowserPlatformDelegateNativeWin::SetFocus(bool setFocus) {
if (!setFocus)
return;

View File

@@ -22,7 +22,7 @@ class CefBrowserPlatformDelegateNativeWin
void CloseHostWindow() override;
CefWindowHandle GetHostWindowHandle() const override;
views::Widget* GetWindowWidget() const override;
void SendFocusEvent(bool setFocus) override;
void SetFocus(bool setFocus) override;
void NotifyMoveOrResizeStarted() override;
void SizeTo(int width, int height) override;
gfx::Point GetScreenPoint(const gfx::Point& view) const override;

View File

@@ -158,13 +158,13 @@ class CorsPreflightRequest : public network::mojom::TrustedHeaderClient {
// mojom::TrustedHeaderClient methods:
void OnBeforeSendHeaders(const net::HttpRequestHeaders& headers,
OnBeforeSendHeadersCallback callback) override {
std::move(callback).Run(net::OK, absl::nullopt);
std::move(callback).Run(net::OK, headers);
}
void OnHeadersReceived(const std::string& headers,
const net::IPEndPoint& remote_endpoint,
OnHeadersReceivedCallback callback) override {
std::move(callback).Run(net::OK, absl::nullopt, GURL());
std::move(callback).Run(net::OK, headers, /*redirect_url=*/GURL());
OnDestroy();
}
@@ -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

@@ -41,7 +41,7 @@ namespace {
const int kLoadNoCookiesFlags =
net::LOAD_DO_NOT_SEND_COOKIES | net::LOAD_DO_NOT_SAVE_COOKIES;
class RequestCallbackWrapper : public CefRequestCallback {
class RequestCallbackWrapper : public CefCallback {
public:
using Callback = base::OnceCallback<void(bool /* allow */)>;
explicit RequestCallbackWrapper(Callback callback)
@@ -56,11 +56,16 @@ class RequestCallbackWrapper : public CefRequestCallback {
}
}
void Continue(bool allow) override {
void Continue() override { ContinueNow(true); }
void Cancel() override { ContinueNow(false); }
private:
void ContinueNow(bool allow) {
if (!work_thread_task_runner_->RunsTasksInCurrentSequence()) {
work_thread_task_runner_->PostTask(
FROM_HERE,
base::BindOnce(&RequestCallbackWrapper::Continue, this, allow));
base::BindOnce(&RequestCallbackWrapper::ContinueNow, this, allow));
return;
}
if (!callback_.is_null()) {
@@ -68,9 +73,6 @@ class RequestCallbackWrapper : public CefRequestCallback {
}
}
void Cancel() override { Continue(false); }
private:
Callback callback_;
scoped_refptr<base::SequencedTaskRunner> work_thread_task_runner_;
@@ -584,8 +586,13 @@ class InterceptedRequestHandlerWrapper : public InterceptedRequestHandler {
init_state_->browser_, init_state_->frame_,
state->pending_request_.get(), callbackPtr.get());
if (retval != RV_CONTINUE_ASYNC) {
// Continue or cancel the request immediately.
callbackPtr->Continue(retval == RV_CONTINUE);
if (retval == RV_CONTINUE) {
// Continue the request immediately.
callbackPtr->Continue();
} else {
// Cancel the request immediately.
callbackPtr->Cancel();
}
}
} else {
// The scheme factory may choose to handle it.

View File

@@ -161,10 +161,10 @@ void CefBrowserPlatformDelegateOsr::SendTouchEvent(const CefTouchEvent& event) {
view->SendTouchEvent(event);
}
void CefBrowserPlatformDelegateOsr::SendFocusEvent(bool setFocus) {
void CefBrowserPlatformDelegateOsr::SetFocus(bool setFocus) {
CefRenderWidgetHostViewOSR* view = GetOSRHostView();
if (view)
view->SendFocusEvent(setFocus);
view->SetFocus(setFocus);
}
gfx::Point CefBrowserPlatformDelegateOsr::GetScreenPoint(

View File

@@ -42,7 +42,7 @@ class CefBrowserPlatformDelegateOsr
int deltaX,
int deltaY) override;
void SendTouchEvent(const CefTouchEvent& event) override;
void SendFocusEvent(bool setFocus) override;
void SetFocus(bool setFocus) override;
gfx::Point GetScreenPoint(const gfx::Point& view) const override;
void ViewText(const std::string& text) override;
bool HandleKeyboardEvent(

View File

@@ -904,7 +904,10 @@ void CefRenderWidgetHostViewOSR::DidNavigate() {
void CefRenderWidgetHostViewOSR::OnFrameComplete(
const viz::BeginFrameAck& ack) {
// TODO(cef): is there something we need to track with this notification?
DCHECK(begin_frame_pending_);
DCHECK_EQ(begin_frame_source_.source_id(), ack.frame_id.source_id);
DCHECK_EQ(begin_frame_number_, ack.frame_id.sequence_number);
begin_frame_pending_ = false;
}
void CefRenderWidgetHostViewOSR::OnRenderFrameMetadataChangedAfterActivation(
@@ -1041,17 +1044,20 @@ void CefRenderWidgetHostViewOSR::Invalidate(
void CefRenderWidgetHostViewOSR::SendExternalBeginFrame() {
DCHECK(external_begin_frame_enabled_);
if (begin_frame_pending_)
return;
begin_frame_pending_ = true;
base::TimeTicks frame_time = base::TimeTicks::Now();
base::TimeTicks deadline = base::TimeTicks();
base::TimeDelta interval = viz::BeginFrameArgs::DefaultInterval();
viz::BeginFrameArgs begin_frame_args = viz::BeginFrameArgs::Create(
BEGINFRAME_FROM_HERE, begin_frame_source_.source_id(),
begin_frame_number_, frame_time, deadline, interval,
++begin_frame_number_, frame_time, deadline, interval,
viz::BeginFrameArgs::NORMAL);
DCHECK(begin_frame_args.IsValid());
begin_frame_number_++;
if (render_widget_host_)
render_widget_host_->ProgressFlingIfNeeded(frame_time);
@@ -1061,6 +1067,8 @@ void CefRenderWidgetHostViewOSR::SendExternalBeginFrame() {
begin_frame_args, /* force= */ true,
base::BindOnce(&CefRenderWidgetHostViewOSR::OnFrameComplete,
weak_ptr_factory_.GetWeakPtr()));
} else {
begin_frame_pending_ = false;
}
if (!IsPopupWidget() && popup_host_view_) {
@@ -1305,7 +1313,7 @@ bool CefRenderWidgetHostViewOSR::ShouldRouteEvents() const {
return !!render_widget_host_->delegate()->GetInputEventRouter();
}
void CefRenderWidgetHostViewOSR::SendFocusEvent(bool focus) {
void CefRenderWidgetHostViewOSR::SetFocus(bool focus) {
if (!render_widget_host_)
return;

View File

@@ -225,7 +225,7 @@ class CefRenderWidgetHostViewOSR
void SendMouseWheelEvent(const blink::WebMouseWheelEvent& event);
void SendTouchEvent(const CefTouchEvent& event);
bool ShouldRouteEvents() const;
void SendFocusEvent(bool focus);
void SetFocus(bool focus);
void UpdateFrameRate();
gfx::Size SizeInPixels();
@@ -354,6 +354,7 @@ class CefRenderWidgetHostViewOSR
// Provides |source_id| for BeginFrameArgs that we create.
viz::StubBeginFrameSource begin_frame_source_;
uint64_t begin_frame_number_ = viz::BeginFrameArgs::kStartingFrameNumber;
bool begin_frame_pending_ = false;
bool sync_frame_rate_ = false;
bool external_begin_frame_enabled_ = false;

View File

@@ -321,10 +321,6 @@ void SetCefPrefs(const CefBrowserSettings& cef,
web.javascript_can_access_clipboard);
SET_STATE(cef.javascript_dom_paste, web.dom_paste_enabled);
SET_STATE(cef.plugins, web.plugins_enabled);
SET_STATE(cef.universal_access_from_file_urls,
web.allow_universal_access_from_file_urls);
SET_STATE(cef.file_access_from_file_urls,
web.allow_file_access_from_file_urls);
SET_STATE(cef.image_loading, web.loads_images_automatically);
SET_STATE(cef.image_shrink_standalone_to_fit,
web.shrinks_standalone_images_to_fit);
@@ -332,7 +328,6 @@ void SetCefPrefs(const CefBrowserSettings& cef,
SET_STATE(cef.tab_to_links, web.tabs_to_links);
SET_STATE(cef.local_storage, web.local_storage_enabled);
SET_STATE(cef.databases, web.databases_enabled);
SET_STATE(cef.application_cache, web.application_cache_enabled);
// Never explicitly enable GPU-related functions in this method because the
// GPU blacklist is not being checked here.

View File

@@ -217,10 +217,16 @@ void CefBrowserPlatformDelegateViews::SendTouchEvent(
native_delegate_->SendTouchEvent(event);
}
void CefBrowserPlatformDelegateViews::SendFocusEvent(bool setFocus) {
// Will result in a call to WebContents::Focus().
if (setFocus && browser_view_->root_view())
void CefBrowserPlatformDelegateViews::SetFocus(bool setFocus) {
// 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

@@ -53,7 +53,7 @@ class CefBrowserPlatformDelegateViews
int deltaX,
int deltaY) override;
void SendTouchEvent(const CefTouchEvent& event) override;
void SendFocusEvent(bool setFocus) override;
void SetFocus(bool setFocus) override;
gfx::Point GetScreenPoint(const gfx::Point& view) const override;
void ViewText(const std::string& text) override;
bool HandleKeyboardEvent(

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(

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"
@@ -250,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 =

View File

@@ -6,6 +6,7 @@
#include "base/files/file_path.h"
#include "base/logging.h"
#include "base/strings/string_util.h"
CefCommandLineImpl::CefCommandLineImpl(base::CommandLine* value,
bool will_delete,
@@ -90,12 +91,13 @@ bool CefCommandLineImpl::HasSwitches() {
bool CefCommandLineImpl::HasSwitch(const CefString& name) {
CEF_VALUE_VERIFY_RETURN(false, false);
return const_value().HasSwitch(name.ToString());
return const_value().HasSwitch(base::ToLowerASCII(name.ToString()));
}
CefString CefCommandLineImpl::GetSwitchValue(const CefString& name) {
CEF_VALUE_VERIFY_RETURN(false, CefString());
return const_value().GetSwitchValueNative(name.ToString());
return const_value().GetSwitchValueNative(
base::ToLowerASCII(name.ToString()));
}
void CefCommandLineImpl::GetSwitches(SwitchMap& switches) {

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

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=0109529f61a92116f73bc6c0ff47bfd0423b6f07$
// $hash=08a83d2956014971961d1cf3f93afbc1dae48f76$
//
#include "libcef_dll/cpptoc/browser_host_cpptoc.h"
@@ -874,20 +874,6 @@ browser_host_send_touch_event(struct _cef_browser_host_t* self,
CefBrowserHostCppToC::Get(self)->SendTouchEvent(eventObj);
}
void CEF_CALLBACK
browser_host_send_focus_event(struct _cef_browser_host_t* self, int setFocus) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefBrowserHostCppToC::Get(self)->SendFocusEvent(setFocus ? true : false);
}
void CEF_CALLBACK
browser_host_send_capture_lost_event(struct _cef_browser_host_t* self) {
shutdown_checker::AssertNotShutdown();
@@ -1350,7 +1336,6 @@ CefBrowserHostCppToC::CefBrowserHostCppToC() {
GetStruct()->send_mouse_move_event = browser_host_send_mouse_move_event;
GetStruct()->send_mouse_wheel_event = browser_host_send_mouse_wheel_event;
GetStruct()->send_touch_event = browser_host_send_touch_event;
GetStruct()->send_focus_event = browser_host_send_focus_event;
GetStruct()->send_capture_lost_event = browser_host_send_capture_lost_event;
GetStruct()->notify_move_or_resize_started =
browser_host_notify_move_or_resize_started;

View File

@@ -1,79 +0,0 @@
// 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=bee998a59050e372ea10d1ce146532c074b1a3ec$
//
#include "libcef_dll/cpptoc/request_callback_cpptoc.h"
#include "libcef_dll/shutdown_checker.h"
namespace {
// MEMBER FUNCTIONS - Body may be edited by hand.
void CEF_CALLBACK request_callback_cont(struct _cef_request_callback_t* self,
int allow) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefRequestCallbackCppToC::Get(self)->Continue(allow ? true : false);
}
void CEF_CALLBACK
request_callback_cancel(struct _cef_request_callback_t* self) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefRequestCallbackCppToC::Get(self)->Cancel();
}
} // namespace
// CONSTRUCTOR - Do not edit by hand.
CefRequestCallbackCppToC::CefRequestCallbackCppToC() {
GetStruct()->cont = request_callback_cont;
GetStruct()->cancel = request_callback_cancel;
}
// DESTRUCTOR - Do not edit by hand.
CefRequestCallbackCppToC::~CefRequestCallbackCppToC() {
shutdown_checker::AssertNotShutdown();
}
template <>
CefRefPtr<CefRequestCallback> CefCppToCRefCounted<
CefRequestCallbackCppToC,
CefRequestCallback,
cef_request_callback_t>::UnwrapDerived(CefWrapperType type,
cef_request_callback_t* s) {
NOTREACHED() << "Unexpected class type: " << type;
return nullptr;
}
template <>
CefWrapperType CefCppToCRefCounted<CefRequestCallbackCppToC,
CefRequestCallback,
cef_request_callback_t>::kWrapperType =
WT_REQUEST_CALLBACK;

View File

@@ -1,38 +0,0 @@
// 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=bd2b56bd152e80651c9a3de4472891d7cf65b130$
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_REQUEST_CALLBACK_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_REQUEST_CALLBACK_CPPTOC_H_
#pragma once
#if !defined(BUILDING_CEF_SHARED)
#error This file can be included DLL-side only
#endif
#include "include/capi/cef_request_callback_capi.h"
#include "include/cef_request_callback.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 CefRequestCallbackCppToC
: public CefCppToCRefCounted<CefRequestCallbackCppToC,
CefRequestCallback,
cef_request_callback_t> {
public:
CefRequestCallbackCppToC();
virtual ~CefRequestCallbackCppToC();
};
#endif // CEF_LIBCEF_DLL_CPPTOC_REQUEST_CALLBACK_CPPTOC_H_

View File

@@ -9,15 +9,15 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=baa4e92404f1c0b975c3724e649afb4ef04250f0$
// $hash=0a2ea84b20bc58f12e8e97d2b38a55448abd47dd$
//
#include "libcef_dll/cpptoc/request_handler_cpptoc.h"
#include "libcef_dll/cpptoc/resource_request_handler_cpptoc.h"
#include "libcef_dll/ctocpp/auth_callback_ctocpp.h"
#include "libcef_dll/ctocpp/browser_ctocpp.h"
#include "libcef_dll/ctocpp/callback_ctocpp.h"
#include "libcef_dll/ctocpp/frame_ctocpp.h"
#include "libcef_dll/ctocpp/request_callback_ctocpp.h"
#include "libcef_dll/ctocpp/request_ctocpp.h"
#include "libcef_dll/ctocpp/select_client_certificate_callback_ctocpp.h"
#include "libcef_dll/ctocpp/sslinfo_ctocpp.h"
@@ -206,7 +206,7 @@ request_handler_on_quota_request(struct _cef_request_handler_t* self,
cef_browser_t* browser,
const cef_string_t* origin_url,
int64 new_size,
cef_request_callback_t* callback) {
cef_callback_t* callback) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@@ -230,7 +230,7 @@ request_handler_on_quota_request(struct _cef_request_handler_t* self,
// Execute
bool _retval = CefRequestHandlerCppToC::Get(self)->OnQuotaRequest(
CefBrowserCToCpp::Wrap(browser), CefString(origin_url), new_size,
CefRequestCallbackCToCpp::Wrap(callback));
CefCallbackCToCpp::Wrap(callback));
// Return type: bool
return _retval;
@@ -242,7 +242,7 @@ request_handler_on_certificate_error(struct _cef_request_handler_t* self,
cef_errorcode_t cert_error,
const cef_string_t* request_url,
struct _cef_sslinfo_t* ssl_info,
cef_request_callback_t* callback) {
cef_callback_t* callback) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@@ -270,8 +270,7 @@ request_handler_on_certificate_error(struct _cef_request_handler_t* self,
// Execute
bool _retval = CefRequestHandlerCppToC::Get(self)->OnCertificateError(
CefBrowserCToCpp::Wrap(browser), cert_error, CefString(request_url),
CefSSLInfoCToCpp::Wrap(ssl_info),
CefRequestCallbackCToCpp::Wrap(callback));
CefSSLInfoCToCpp::Wrap(ssl_info), CefCallbackCToCpp::Wrap(callback));
// Return type: bool
return _retval;

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=1009f2ed21a03d2a6e47372def61b0696055d4e1$
// $hash=e80900e24065ddf936bd64c2c40d70eddf47009c$
//
#include "libcef_dll/cpptoc/resource_request_handler_cpptoc.h"
@@ -17,8 +17,8 @@
#include "libcef_dll/cpptoc/resource_handler_cpptoc.h"
#include "libcef_dll/cpptoc/response_filter_cpptoc.h"
#include "libcef_dll/ctocpp/browser_ctocpp.h"
#include "libcef_dll/ctocpp/callback_ctocpp.h"
#include "libcef_dll/ctocpp/frame_ctocpp.h"
#include "libcef_dll/ctocpp/request_callback_ctocpp.h"
#include "libcef_dll/ctocpp/request_ctocpp.h"
#include "libcef_dll/ctocpp/response_ctocpp.h"
@@ -59,7 +59,7 @@ resource_request_handler_on_before_resource_load(
cef_browser_t* browser,
cef_frame_t* frame,
cef_request_t* request,
cef_request_callback_t* callback) {
cef_callback_t* callback) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -79,8 +79,7 @@ resource_request_handler_on_before_resource_load(
cef_return_value_t _retval =
CefResourceRequestHandlerCppToC::Get(self)->OnBeforeResourceLoad(
CefBrowserCToCpp::Wrap(browser), CefFrameCToCpp::Wrap(frame),
CefRequestCToCpp::Wrap(request),
CefRequestCallbackCToCpp::Wrap(callback));
CefRequestCToCpp::Wrap(request), CefCallbackCToCpp::Wrap(callback));
// Return type: simple
return _retval;

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=d6a40fcd6be6297224b573ac1600701ff6818680$
// $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) {
@@ -548,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;

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=e53c3c194d40a9bdee41a348a1c9fd65822e4ba9$
// $hash=791e5fd2deefd0e040143477a6ae53593886e706$
//
#include "libcef_dll/ctocpp/browser_host_ctocpp.h"
@@ -764,20 +764,6 @@ void CefBrowserHostCToCpp::SendTouchEvent(const CefTouchEvent& event) {
_struct->send_touch_event(_struct, &event);
}
NO_SANITIZE("cfi-icall")
void CefBrowserHostCToCpp::SendFocusEvent(bool setFocus) {
shutdown_checker::AssertNotShutdown();
cef_browser_host_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, send_focus_event))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->send_focus_event(_struct, setFocus);
}
NO_SANITIZE("cfi-icall") void CefBrowserHostCToCpp::SendCaptureLostEvent() {
shutdown_checker::AssertNotShutdown();
@@ -1015,8 +1001,8 @@ void CefBrowserHostCToCpp::DragSourceSystemDragEnded() {
}
NO_SANITIZE("cfi-icall")
CefRefPtr<
CefNavigationEntry> CefBrowserHostCToCpp::GetVisibleNavigationEntry() {
CefRefPtr<CefNavigationEntry>
CefBrowserHostCToCpp::GetVisibleNavigationEntry() {
shutdown_checker::AssertNotShutdown();
cef_browser_host_t* _struct = GetStruct();

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=0de1d0125514efd66096e5e900938b6481f0ec1d$
// $hash=1c231cf78fe94d9e395fe8bee9c0c848d81f3ef5$
//
#ifndef CEF_LIBCEF_DLL_CTOCPP_BROWSER_HOST_CTOCPP_H_
@@ -102,7 +102,6 @@ class CefBrowserHostCToCpp : public CefCToCppRefCounted<CefBrowserHostCToCpp,
int deltaX,
int deltaY) override;
void SendTouchEvent(const CefTouchEvent& event) override;
void SendFocusEvent(bool setFocus) override;
void SendCaptureLostEvent() override;
void NotifyMoveOrResizeStarted() override;
int GetWindowlessFrameRate() override;

View File

@@ -1,70 +0,0 @@
// 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=9fb040d47f4b6627904cc50518d0293bfe11d25d$
//
#include "libcef_dll/ctocpp/request_callback_ctocpp.h"
#include "libcef_dll/shutdown_checker.h"
// VIRTUAL METHODS - Body may be edited by hand.
NO_SANITIZE("cfi-icall") void CefRequestCallbackCToCpp::Continue(bool allow) {
shutdown_checker::AssertNotShutdown();
cef_request_callback_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, cont))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->cont(_struct, allow);
}
NO_SANITIZE("cfi-icall") void CefRequestCallbackCToCpp::Cancel() {
shutdown_checker::AssertNotShutdown();
cef_request_callback_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, cancel))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
_struct->cancel(_struct);
}
// CONSTRUCTOR - Do not edit by hand.
CefRequestCallbackCToCpp::CefRequestCallbackCToCpp() {}
// DESTRUCTOR - Do not edit by hand.
CefRequestCallbackCToCpp::~CefRequestCallbackCToCpp() {
shutdown_checker::AssertNotShutdown();
}
template <>
cef_request_callback_t* CefCToCppRefCounted<
CefRequestCallbackCToCpp,
CefRequestCallback,
cef_request_callback_t>::UnwrapDerived(CefWrapperType type,
CefRequestCallback* c) {
NOTREACHED() << "Unexpected class type: " << type;
return nullptr;
}
template <>
CefWrapperType CefCToCppRefCounted<CefRequestCallbackCToCpp,
CefRequestCallback,
cef_request_callback_t>::kWrapperType =
WT_REQUEST_CALLBACK;

View File

@@ -1,42 +0,0 @@
// 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=49871b71a226d36c9c60ac06c2a242c106766d34$
//
#ifndef CEF_LIBCEF_DLL_CTOCPP_REQUEST_CALLBACK_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_REQUEST_CALLBACK_CTOCPP_H_
#pragma once
#if !defined(WRAPPING_CEF_SHARED)
#error This file can be included wrapper-side only
#endif
#include "include/capi/cef_request_callback_capi.h"
#include "include/cef_request_callback.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 CefRequestCallbackCToCpp
: public CefCToCppRefCounted<CefRequestCallbackCToCpp,
CefRequestCallback,
cef_request_callback_t> {
public:
CefRequestCallbackCToCpp();
virtual ~CefRequestCallbackCToCpp();
// CefRequestCallback methods.
void Continue(bool allow) override;
void Cancel() override;
};
#endif // CEF_LIBCEF_DLL_CTOCPP_REQUEST_CALLBACK_CTOCPP_H_

View File

@@ -9,14 +9,14 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=cac9a84a4ddb5aa01e9c6fc97f5c4bcb4f4c368f$
// $hash=73d4abe535f9bec5507447e8d8139ed0fa4b2875$
//
#include "libcef_dll/ctocpp/request_handler_ctocpp.h"
#include "libcef_dll/cpptoc/auth_callback_cpptoc.h"
#include "libcef_dll/cpptoc/browser_cpptoc.h"
#include "libcef_dll/cpptoc/callback_cpptoc.h"
#include "libcef_dll/cpptoc/frame_cpptoc.h"
#include "libcef_dll/cpptoc/request_callback_cpptoc.h"
#include "libcef_dll/cpptoc/request_cpptoc.h"
#include "libcef_dll/cpptoc/select_client_certificate_callback_cpptoc.h"
#include "libcef_dll/cpptoc/sslinfo_cpptoc.h"
@@ -100,14 +100,15 @@ bool CefRequestHandlerCToCpp::OnOpenURLFromTab(
}
NO_SANITIZE("cfi-icall")
CefRefPtr<CefResourceRequestHandler> CefRequestHandlerCToCpp::
GetResourceRequestHandler(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefRequest> request,
bool is_navigation,
bool is_download,
const CefString& request_initiator,
bool& disable_default_handling) {
CefRefPtr<CefResourceRequestHandler>
CefRequestHandlerCToCpp::GetResourceRequestHandler(
CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefRequest> request,
bool is_navigation,
bool is_download,
const CefString& request_initiator,
bool& disable_default_handling) {
shutdown_checker::AssertNotShutdown();
cef_request_handler_t* _struct = GetStruct();
@@ -194,11 +195,10 @@ bool CefRequestHandlerCToCpp::GetAuthCredentials(
}
NO_SANITIZE("cfi-icall")
bool CefRequestHandlerCToCpp::OnQuotaRequest(
CefRefPtr<CefBrowser> browser,
const CefString& origin_url,
int64 new_size,
CefRefPtr<CefRequestCallback> callback) {
bool CefRequestHandlerCToCpp::OnQuotaRequest(CefRefPtr<CefBrowser> browser,
const CefString& origin_url,
int64 new_size,
CefRefPtr<CefCallback> callback) {
shutdown_checker::AssertNotShutdown();
cef_request_handler_t* _struct = GetStruct();
@@ -223,7 +223,7 @@ bool CefRequestHandlerCToCpp::OnQuotaRequest(
// Execute
int _retval = _struct->on_quota_request(
_struct, CefBrowserCppToC::Wrap(browser), origin_url.GetStruct(),
new_size, CefRequestCallbackCppToC::Wrap(callback));
new_size, CefCallbackCppToC::Wrap(callback));
// Return type: bool
return _retval ? true : false;
@@ -235,7 +235,7 @@ bool CefRequestHandlerCToCpp::OnCertificateError(
cef_errorcode_t cert_error,
const CefString& request_url,
CefRefPtr<CefSSLInfo> ssl_info,
CefRefPtr<CefRequestCallback> callback) {
CefRefPtr<CefCallback> callback) {
shutdown_checker::AssertNotShutdown();
cef_request_handler_t* _struct = GetStruct();
@@ -265,7 +265,7 @@ bool CefRequestHandlerCToCpp::OnCertificateError(
int _retval = _struct->on_certificate_error(
_struct, CefBrowserCppToC::Wrap(browser), cert_error,
request_url.GetStruct(), CefSSLInfoCppToC::Wrap(ssl_info),
CefRequestCallbackCppToC::Wrap(callback));
CefCallbackCppToC::Wrap(callback));
// Return type: bool
return _retval ? true : false;

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=771c124f112f02314f57b5f9bd475afe6cef3242$
// $hash=cc1503e0678dd6c15b282a3432830262f9a0d93e$
//
#ifndef CEF_LIBCEF_DLL_CTOCPP_REQUEST_HANDLER_CTOCPP_H_
@@ -64,12 +64,12 @@ class CefRequestHandlerCToCpp
bool OnQuotaRequest(CefRefPtr<CefBrowser> browser,
const CefString& origin_url,
int64 new_size,
CefRefPtr<CefRequestCallback> callback) override;
CefRefPtr<CefCallback> callback) override;
bool OnCertificateError(CefRefPtr<CefBrowser> browser,
cef_errorcode_t cert_error,
const CefString& request_url,
CefRefPtr<CefSSLInfo> ssl_info,
CefRefPtr<CefRequestCallback> callback) override;
CefRefPtr<CefCallback> callback) override;
bool OnSelectClientCertificate(
CefRefPtr<CefBrowser> browser,
bool isProxy,

View File

@@ -9,13 +9,13 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=a53f4f53f8063044f5c82870f2cef1ef89a91d83$
// $hash=f2ef36943d3cb292573201d2b15b4406d9aaeab4$
//
#include "libcef_dll/ctocpp/resource_request_handler_ctocpp.h"
#include "libcef_dll/cpptoc/browser_cpptoc.h"
#include "libcef_dll/cpptoc/callback_cpptoc.h"
#include "libcef_dll/cpptoc/frame_cpptoc.h"
#include "libcef_dll/cpptoc/request_callback_cpptoc.h"
#include "libcef_dll/cpptoc/request_cpptoc.h"
#include "libcef_dll/cpptoc/response_cpptoc.h"
#include "libcef_dll/ctocpp/cookie_access_filter_ctocpp.h"
@@ -25,10 +25,11 @@
// VIRTUAL METHODS - Body may be edited by hand.
NO_SANITIZE("cfi-icall")
CefRefPtr<CefCookieAccessFilter> CefResourceRequestHandlerCToCpp::
GetCookieAccessFilter(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefRequest> request) {
CefRefPtr<CefCookieAccessFilter>
CefResourceRequestHandlerCToCpp::GetCookieAccessFilter(
CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefRequest> request) {
cef_resource_request_handler_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, get_cookie_access_filter))
return nullptr;
@@ -52,11 +53,11 @@ CefRefPtr<CefCookieAccessFilter> CefResourceRequestHandlerCToCpp::
NO_SANITIZE("cfi-icall")
CefResourceRequestHandler::ReturnValue
CefResourceRequestHandlerCToCpp::OnBeforeResourceLoad(
CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefRequest> request,
CefRefPtr<CefRequestCallback> callback) {
CefResourceRequestHandlerCToCpp::OnBeforeResourceLoad(
CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefRequest> request,
CefRefPtr<CefCallback> callback) {
cef_resource_request_handler_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, on_before_resource_load))
return RV_CONTINUE;
@@ -76,18 +77,18 @@ CefResourceRequestHandler::ReturnValue
// Execute
cef_return_value_t _retval = _struct->on_before_resource_load(
_struct, CefBrowserCppToC::Wrap(browser), CefFrameCppToC::Wrap(frame),
CefRequestCppToC::Wrap(request),
CefRequestCallbackCppToC::Wrap(callback));
CefRequestCppToC::Wrap(request), CefCallbackCppToC::Wrap(callback));
// Return type: simple
return _retval;
}
NO_SANITIZE("cfi-icall")
CefRefPtr<CefResourceHandler> CefResourceRequestHandlerCToCpp::
GetResourceHandler(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefRequest> request) {
CefRefPtr<CefResourceHandler>
CefResourceRequestHandlerCToCpp::GetResourceHandler(
CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefRequest> request) {
cef_resource_request_handler_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, get_resource_handler))
return nullptr;
@@ -171,11 +172,12 @@ bool CefResourceRequestHandlerCToCpp::OnResourceResponse(
}
NO_SANITIZE("cfi-icall")
CefRefPtr<CefResponseFilter> CefResourceRequestHandlerCToCpp::
GetResourceResponseFilter(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefRequest> request,
CefRefPtr<CefResponse> response) {
CefRefPtr<CefResponseFilter>
CefResourceRequestHandlerCToCpp::GetResourceResponseFilter(
CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefRequest> request,
CefRefPtr<CefResponse> response) {
cef_resource_request_handler_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, get_resource_response_filter))
return nullptr;

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=0168c1a4e9321014b8a0a9434ea85f89de100cc7$
// $hash=a3d6561daffb943b551a27f1aa7fe9a58848df98$
//
#ifndef CEF_LIBCEF_DLL_CTOCPP_RESOURCE_REQUEST_HANDLER_CTOCPP_H_
@@ -39,11 +39,10 @@ class CefResourceRequestHandlerCToCpp
CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefRequest> request) override;
ReturnValue OnBeforeResourceLoad(
CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefRequest> request,
CefRefPtr<CefRequestCallback> callback) override;
ReturnValue OnBeforeResourceLoad(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefRequest> request,
CefRefPtr<CefCallback> callback) override;
CefRefPtr<CefResourceHandler> GetResourceHandler(
CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=1035cc694edfd110c5a64b042a6e7ca2e975003a$
// $hash=45534cf82be12888d9966a92a26d676203ae7c13$
//
#include "libcef_dll/ctocpp/views/window_delegate_ctocpp.h"
@@ -127,6 +127,30 @@ CefRect CefWindowDelegateCToCpp::GetInitialBounds(CefRefPtr<CefWindow> window) {
return _retval;
}
NO_SANITIZE("cfi-icall")
cef_show_state_t CefWindowDelegateCToCpp::GetInitialShowState(
CefRefPtr<CefWindow> window) {
shutdown_checker::AssertNotShutdown();
cef_window_delegate_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, get_initial_show_state))
return CEF_SHOW_STATE_NORMAL;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: window; type: refptr_diff
DCHECK(window.get());
if (!window.get())
return CEF_SHOW_STATE_NORMAL;
// Execute
cef_show_state_t _retval =
_struct->get_initial_show_state(_struct, CefWindowCppToC::Wrap(window));
// Return type: simple
return _retval;
}
NO_SANITIZE("cfi-icall")
bool CefWindowDelegateCToCpp::IsFrameless(CefRefPtr<CefWindow> window) {
shutdown_checker::AssertNotShutdown();

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=8a77494e63a8e06241f675c020532ac20fbaaab0$
// $hash=eb73d2c218d13a126f8cb3b9b5b70454c2d31ec9$
//
#ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_WINDOW_DELEGATE_CTOCPP_H_
@@ -43,6 +43,7 @@ class CefWindowDelegateCToCpp
bool* is_menu,
bool* can_activate_menu) override;
CefRect GetInitialBounds(CefRefPtr<CefWindow> window) override;
cef_show_state_t GetInitialShowState(CefRefPtr<CefWindow> window) override;
bool IsFrameless(CefRefPtr<CefWindow> window) override;
bool CanResize(CefRefPtr<CefWindow> window) override;
bool CanMaximize(CefRefPtr<CefWindow> window) override;

View File

@@ -324,7 +324,7 @@ struct CefResourceManager::ProviderEntry {
CefResourceManager::RequestState::~RequestState() {
// Always execute the callback.
if (callback_.get())
callback_->Continue(true);
callback_->Continue();
}
// CefResourceManager::Request implementation.
@@ -558,7 +558,7 @@ cef_return_value_t CefResourceManager::OnBeforeResourceLoad(
CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefRequest> request,
CefRefPtr<CefRequestCallback> callback) {
CefRefPtr<CefCallback> callback) {
CEF_REQUIRE_IO_THREAD();
// Find the first provider that is not pending deletion.

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=e09286ac977f5f06cf356eb8a5e04b48b0836523$
// $hash=850ad8962e4c70f0c244fe79b96b8189ae9c3aa8$
//
#ifndef CEF_LIBCEF_DLL_WRAPPER_TYPES_H_
@@ -106,7 +106,6 @@ enum CefWrapperType {
WT_RENDER_HANDLER,
WT_RENDER_PROCESS_HANDLER,
WT_REQUEST,
WT_REQUEST_CALLBACK,
WT_REQUEST_CONTEXT,
WT_REQUEST_CONTEXT_HANDLER,
WT_REQUEST_HANDLER,

View File

@@ -108,6 +108,8 @@ patches = [
#
# Windows: Fix focus assignment when clicking WebView with external parent.
# https://bitbucket.org/chromiumembedded/cef/issues/3031
#
# Fix minimize & fullscreen behavior on initial Widget creation.
'name': 'views_widget',
},
{
@@ -481,6 +483,11 @@ patches = [
# https://bitbucket.org/chromiumembedded/cef/issues/123
'name': 'print_preview_123',
},
{
# Store command-line switch names as lower-case ASCII on all platforms.
# https://bitbucket.org/chromiumembedded/cef/issues/1872
'name': 'base_command_line_1872',
},
{
# Remove cef_sandbox dependency on boringssl MD5/SHA1 functions.
# https://bitbucket.org/chromiumembedded/cef/issues/2743
@@ -545,10 +552,5 @@ patches = [
# Linux: Fix ATK assertion error when generating ARM build config.
# https://bugs.chromium.org/p/chromium/issues/detail?id=1123214
'name': 'linux_atk_1123214',
},
{
# Linux: Fix missing re2 dependency for third_party/maldoca.
# https://chromium-review.googlesource.com/c/chromium/src/+/3128781
'name': 'linux_maldoca_3128781',
}
]

View File

@@ -0,0 +1,17 @@
diff --git base/command_line.cc base/command_line.cc
index 3ef2e87e40687..f7b91a202a377 100644
--- base/command_line.cc
+++ base/command_line.cc
@@ -333,11 +333,10 @@ void CommandLine::AppendSwitchPath(StringPiece switch_string,
void CommandLine::AppendSwitchNative(StringPiece switch_string,
CommandLine::StringPieceType value) {
-#if defined(OS_WIN)
const std::string switch_key = ToLowerASCII(switch_string);
+#if defined(OS_WIN)
StringType combined_switch_string(UTF8ToWide(switch_key));
#elif defined(OS_POSIX) || defined(OS_FUCHSIA)
- StringPiece switch_key = switch_string;
StringType combined_switch_string(switch_key);
#endif
size_t prefix_length = GetSwitchPrefixLength(combined_switch_string);

View File

@@ -20,10 +20,10 @@ index 5daa087a01e80..316ec852394a4 100644
// TODO(wjmaclean): We should update the ProcessLock comparison API
diff --git content/browser/renderer_host/navigation_request.cc content/browser/renderer_host/navigation_request.cc
index f1136b6502573..654397a5a9f76 100644
index 5acbdf088e58c..76118f1609a71 100644
--- content/browser/renderer_host/navigation_request.cc
+++ content/browser/renderer_host/navigation_request.cc
@@ -5803,6 +5803,12 @@ NavigationRequest::GetOriginForURLLoaderFactoryWithoutFinalFrameHost(
@@ -5844,6 +5844,12 @@ NavigationRequest::GetOriginForURLLoaderFactoryWithoutFinalFrameHost(
network::mojom::WebSandboxFlags sandbox_flags) {
// Calculate an approximation of the origin. The sandbox/csp are ignored.
url::Origin origin = GetOriginForURLLoaderFactoryUnchecked(this);
@@ -36,7 +36,7 @@ index f1136b6502573..654397a5a9f76 100644
// Apply sandbox flags.
// See https://html.spec.whatwg.org/#sandboxed-origin-browsing-context-flag
@@ -5836,6 +5842,15 @@ NavigationRequest::GetOriginForURLLoaderFactoryWithFinalFrameHost() {
@@ -5877,6 +5883,15 @@ NavigationRequest::GetOriginForURLLoaderFactoryWithFinalFrameHost() {
if (IsSameDocument() || IsPageActivation())
return GetRenderFrameHost()->GetLastCommittedOrigin();

View File

@@ -1,5 +1,5 @@
diff --git chrome/browser/BUILD.gn chrome/browser/BUILD.gn
index a2045328ec276..cf90eda945d20 100644
index 442c7056f978e..a6cdd9c9e8bc5 100644
--- chrome/browser/BUILD.gn
+++ chrome/browser/BUILD.gn
@@ -13,6 +13,7 @@ import("//build/config/features.gni")
@@ -18,7 +18,7 @@ index a2045328ec276..cf90eda945d20 100644
"//chrome:extra_resources",
"//chrome:resources",
"//chrome:strings",
@@ -2512,6 +2514,10 @@ static_library("browser") {
@@ -2513,6 +2515,10 @@ static_library("browser") {
]
}

View File

@@ -200,7 +200,7 @@ index 2beb437bedf1d..21b15b48b4a3e 100644
void Browser::TabDetachedAtImpl(content::WebContents* contents,
diff --git chrome/browser/ui/browser.h chrome/browser/ui/browser.h
index 7649c59dde3f5..a3b719f5c673a 100644
index 599a822375fc7..90b3658ef3fe9 100644
--- chrome/browser/ui/browser.h
+++ chrome/browser/ui/browser.h
@@ -21,6 +21,7 @@
@@ -261,7 +261,7 @@ index 7649c59dde3f5..a3b719f5c673a 100644
// Get the FindBarController for this browser, creating it if it does not
// yet exist.
FindBarController* GetFindBarController();
@@ -793,6 +816,11 @@ class Browser : public TabStripModelObserver,
@@ -796,6 +819,11 @@ class Browser : public TabStripModelObserver,
void SetContentsBounds(content::WebContents* source,
const gfx::Rect& bounds) override;
void UpdateTargetURL(content::WebContents* source, const GURL& url) override;

View File

@@ -1,5 +1,5 @@
diff --git chrome/browser/renderer_context_menu/render_view_context_menu.cc chrome/browser/renderer_context_menu/render_view_context_menu.cc
index 9729ece5b3ffe..6a31b31567f24 100644
index dc7dbd4b527bb..171871cedc3df 100644
--- chrome/browser/renderer_context_menu/render_view_context_menu.cc
+++ chrome/browser/renderer_context_menu/render_view_context_menu.cc
@@ -280,6 +280,13 @@ base::OnceCallback<void(RenderViewContextMenu*)>* GetMenuShownCallback() {
@@ -16,7 +16,7 @@ index 9729ece5b3ffe..6a31b31567f24 100644
enum class UmaEnumIdLookupType {
GeneralEnumId,
ContextSpecificEnumId,
@@ -491,6 +498,10 @@ int FindUMAEnumValueForCommand(int id, UmaEnumIdLookupType type) {
@@ -493,6 +500,10 @@ int FindUMAEnumValueForCommand(int id, UmaEnumIdLookupType type) {
if (ContextMenuMatcher::IsExtensionsCustomCommandId(id))
return 1;
@@ -27,7 +27,7 @@ index 9729ece5b3ffe..6a31b31567f24 100644
id = CollapseCommandsForUMA(id);
const auto& map = GetIdcToUmaMap(type);
auto it = map.find(id);
@@ -667,6 +678,14 @@ RenderViewContextMenu::RenderViewContextMenu(
@@ -669,6 +680,14 @@ RenderViewContextMenu::RenderViewContextMenu(
system_app_ = GetBrowser() && GetBrowser()->app_controller()
? GetBrowser()->app_controller()->system_app()
: nullptr;
@@ -42,7 +42,7 @@ index 9729ece5b3ffe..6a31b31567f24 100644
}
RenderViewContextMenu::~RenderViewContextMenu() = default;
@@ -1033,6 +1052,12 @@ void RenderViewContextMenu::InitMenu() {
@@ -1025,6 +1044,12 @@ void RenderViewContextMenu::InitMenu() {
// menu, meaning that each menu item added/removed in this function will cause
// it to visibly jump on the screen (see b/173569669).
AppendQuickAnswersItems();
@@ -55,7 +55,7 @@ index 9729ece5b3ffe..6a31b31567f24 100644
}
Profile* RenderViewContextMenu::GetProfile() const {
@@ -2819,6 +2844,12 @@ void RenderViewContextMenu::RegisterMenuShownCallbackForTesting(
@@ -2843,6 +2868,12 @@ void RenderViewContextMenu::RegisterMenuShownCallbackForTesting(
*GetMenuShownCallback() = std::move(cb);
}
@@ -69,10 +69,10 @@ index 9729ece5b3ffe..6a31b31567f24 100644
RenderViewContextMenu::GetHandlersForLinkUrl() {
ProtocolHandlerRegistry::ProtocolHandlerList handlers =
diff --git chrome/browser/renderer_context_menu/render_view_context_menu.h chrome/browser/renderer_context_menu/render_view_context_menu.h
index 524cff207c179..801def29a8636 100644
index 526f116a0578b..27ec366c6ad77 100644
--- chrome/browser/renderer_context_menu/render_view_context_menu.h
+++ chrome/browser/renderer_context_menu/render_view_context_menu.h
@@ -109,6 +109,12 @@ class RenderViewContextMenu : public RenderViewContextMenuBase,
@@ -110,6 +110,12 @@ class RenderViewContextMenu : public RenderViewContextMenuBase,
static void RegisterMenuShownCallbackForTesting(
base::OnceCallback<void(RenderViewContextMenu*)> cb);
@@ -85,7 +85,7 @@ index 524cff207c179..801def29a8636 100644
protected:
Profile* GetProfile() const;
@@ -307,6 +313,9 @@ class RenderViewContextMenu : public RenderViewContextMenuBase,
@@ -309,6 +315,9 @@ class RenderViewContextMenu : public RenderViewContextMenuBase,
// built.
bool is_protocol_submenu_valid_ = false;

View File

@@ -1,5 +1,5 @@
diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn
index e5811d45bd4b6..4f532d65e963f 100644
index fa876edb9ae6f..306bcb400d0fc 100644
--- chrome/browser/ui/BUILD.gn
+++ chrome/browser/ui/BUILD.gn
@@ -11,6 +11,7 @@ import("//build/config/features.gni")
@@ -10,7 +10,7 @@ index e5811d45bd4b6..4f532d65e963f 100644
import("//chrome/browser/buildflags.gni")
import("//chrome/common/features.gni")
import("//chromeos/assistant/assistant.gni")
@@ -347,6 +348,10 @@ static_library("ui") {
@@ -346,6 +347,10 @@ static_library("ui") {
"//build/config/compiler:wexit_time_destructors",
]
@@ -21,7 +21,7 @@ index e5811d45bd4b6..4f532d65e963f 100644
# Since browser and browser_ui actually depend on each other,
# we must omit the dependency from browser_ui to browser.
# However, this means browser_ui and browser should more or less
@@ -369,6 +374,7 @@ static_library("ui") {
@@ -368,6 +373,7 @@ static_library("ui") {
"//build:branding_buildflags",
"//build:chromeos_buildflags",
"//cc/paint",
@@ -29,7 +29,7 @@ index e5811d45bd4b6..4f532d65e963f 100644
"//chrome:extra_resources",
"//chrome:resources",
"//chrome:strings",
@@ -4984,6 +4990,7 @@ static_library("ui") {
@@ -4992,6 +4998,7 @@ static_library("ui") {
if (enable_basic_printing) {
deps += [
"//components/printing/browser",

View File

@@ -14,7 +14,7 @@ index 4e76c7a55ac03..a4614a9d2cecb 100644
}
diff --git chrome/browser/profiles/profile.cc chrome/browser/profiles/profile.cc
index 5d6cb6f377f81..8c4b53d2f7cc3 100644
index e184a2418982e..ce80292f01b7c 100644
--- chrome/browser/profiles/profile.cc
+++ chrome/browser/profiles/profile.cc
@@ -86,6 +86,7 @@ base::LazyInstance<std::set<content::BrowserContext*>>::Leaky
@@ -85,10 +85,10 @@ index bf7fc55a91e20..d6209550b6567 100644
virtual bool IsSignedIn() = 0;
diff --git chrome/browser/profiles/profile_impl.cc chrome/browser/profiles/profile_impl.cc
index 56ce2f16cdd12..82e8d76090ce1 100644
index 4d9987407277f..c5c1ed73e1212 100644
--- chrome/browser/profiles/profile_impl.cc
+++ chrome/browser/profiles/profile_impl.cc
@@ -1026,7 +1026,9 @@ Profile* ProfileImpl::GetOffTheRecordProfile(const OTRProfileID& otr_profile_id,
@@ -1027,7 +1027,9 @@ Profile* ProfileImpl::GetOffTheRecordProfile(const OTRProfileID& otr_profile_id,
otr_profiles_[otr_profile_id] = std::move(otr_profile);
@@ -113,7 +113,7 @@ index b6c4eee4c9d1a..c8158ff856167 100644
}
diff --git chrome/browser/profiles/profile_manager.h chrome/browser/profiles/profile_manager.h
index c4d9b563a2bc1..13de953c75ad2 100644
index 126faf0da6c27..b9acfa7144650 100644
--- chrome/browser/profiles/profile_manager.h
+++ chrome/browser/profiles/profile_manager.h
@@ -119,7 +119,7 @@ class ProfileManager : public Profile::Delegate {

View File

@@ -1,8 +1,8 @@
diff --git chrome/browser/safe_browsing/BUILD.gn chrome/browser/safe_browsing/BUILD.gn
index abc27a26195d8..67124b5eccf50 100644
index adfa159ac4be3..b406a0eb4dd2a 100644
--- chrome/browser/safe_browsing/BUILD.gn
+++ chrome/browser/safe_browsing/BUILD.gn
@@ -27,6 +27,7 @@ static_library("safe_browsing") {
@@ -26,6 +26,7 @@ static_library("safe_browsing") {
"//chrome/common:constants",
"//components/browser_sync",
"//components/enterprise/common:strings",

View File

@@ -1,5 +1,5 @@
diff --git chrome/renderer/BUILD.gn chrome/renderer/BUILD.gn
index fdbff76b66227..d8b6453dffcac 100644
index f8ad4b2fe2646..9eee4d5d7a42b 100644
--- chrome/renderer/BUILD.gn
+++ chrome/renderer/BUILD.gn
@@ -5,6 +5,7 @@

View File

@@ -120,10 +120,10 @@ index e06cd6c3d83db..1f7da7cf79979 100644
// Initialize the frame (creates the underlying native window).
diff --git chrome/browser/ui/views/frame/browser_view.cc chrome/browser/ui/views/frame/browser_view.cc
index 84044530181a8..737c41a0d01a5 100644
index 61077f70f8a96..85f1d10dea443 100644
--- chrome/browser/ui/views/frame/browser_view.cc
+++ chrome/browser/ui/views/frame/browser_view.cc
@@ -281,11 +281,10 @@ using content::WebContents;
@@ -284,11 +284,10 @@ using content::WebContents;
using views::ColumnSet;
using web_modal::WebContentsModalDialogHost;
@@ -138,7 +138,7 @@ index 84044530181a8..737c41a0d01a5 100644
#if BUILDFLAG(IS_CHROMEOS_ASH)
// UMA histograms that record animation smoothness for tab loading animation.
@@ -600,11 +599,22 @@ class BrowserView::AccessibilityModeObserver : public ui::AXModeObserver {
@@ -603,11 +602,22 @@ class BrowserView::AccessibilityModeObserver : public ui::AXModeObserver {
///////////////////////////////////////////////////////////////////////////////
// BrowserView, public:
@@ -162,7 +162,7 @@ index 84044530181a8..737c41a0d01a5 100644
SetShowIcon(::ShouldShowWindowIcon(browser_.get()));
// In forced app mode, all size controls are always disabled. Otherwise, use
@@ -618,7 +628,6 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
@@ -621,7 +631,6 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
}
browser_->tab_strip_model()->AddObserver(this);
@@ -170,7 +170,7 @@ index 84044530181a8..737c41a0d01a5 100644
// Top container holds tab strip region and toolbar and lives at the front of
// the view hierarchy.
@@ -662,8 +671,15 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
@@ -665,8 +674,15 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
contents_container->SetLayoutManager(std::make_unique<ContentsLayoutManager>(
devtools_web_view_, contents_web_view_));
@@ -188,7 +188,7 @@ index 84044530181a8..737c41a0d01a5 100644
contents_separator_ =
top_container_->AddChildView(std::make_unique<ContentsSeparator>());
@@ -1454,6 +1470,8 @@ bool BrowserView::ShouldHideUIForFullscreen() const {
@@ -1472,6 +1488,8 @@ bool BrowserView::ShouldHideUIForFullscreen() const {
if (immersive_mode_controller_->IsEnabled())
return false;
@@ -197,7 +197,7 @@ index 84044530181a8..737c41a0d01a5 100644
return frame_->GetFrameView()->ShouldHideTopUIForFullscreen();
}
@@ -2527,7 +2545,8 @@ BrowserView::GetNativeViewHostsForTopControlsSlide() const {
@@ -2554,7 +2572,8 @@ BrowserView::GetNativeViewHostsForTopControlsSlide() const {
}
void BrowserView::ReparentTopContainerForEndOfImmersive() {
@@ -207,7 +207,7 @@ index 84044530181a8..737c41a0d01a5 100644
top_container()->DestroyLayer();
AddChildViewAt(top_container(), 0);
EnsureFocusOrder();
@@ -2979,8 +2998,10 @@ void BrowserView::Layout() {
@@ -3006,8 +3025,10 @@ void BrowserView::Layout() {
// TODO(jamescook): Why was this in the middle of layout code?
toolbar_->location_bar()->omnibox_view()->SetFocusBehavior(
@@ -220,7 +220,7 @@ index 84044530181a8..737c41a0d01a5 100644
// Some of the situations when the BrowserView is laid out are:
// - Enter/exit immersive fullscreen mode.
@@ -3043,6 +3064,11 @@ void BrowserView::AddedToWidget() {
@@ -3070,6 +3091,11 @@ void BrowserView::AddedToWidget() {
SetThemeProfileForWindow(GetNativeWindow(), browser_->profile());
#endif
@@ -232,7 +232,7 @@ index 84044530181a8..737c41a0d01a5 100644
toolbar_->Init();
#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
@@ -3078,13 +3104,9 @@ void BrowserView::AddedToWidget() {
@@ -3105,13 +3131,9 @@ void BrowserView::AddedToWidget() {
EnsureFocusOrder();
@@ -249,10 +249,10 @@ index 84044530181a8..737c41a0d01a5 100644
MaybeInitializeWebUITabStrip();
diff --git chrome/browser/ui/views/frame/browser_view.h chrome/browser/ui/views/frame/browser_view.h
index 4709cdd1f29d1..3d79400cbf4a7 100644
index c628d5143c8bc..953e930d6bce8 100644
--- chrome/browser/ui/views/frame/browser_view.h
+++ chrome/browser/ui/views/frame/browser_view.h
@@ -118,11 +118,16 @@ class BrowserView : public BrowserWindow,
@@ -121,11 +121,16 @@ class BrowserView : public BrowserWindow,
public webapps::AppBannerManager::Observer {
public:
METADATA_HEADER(BrowserView);
@@ -269,7 +269,7 @@ index 4709cdd1f29d1..3d79400cbf4a7 100644
void set_frame(BrowserFrame* frame) { frame_ = frame; }
BrowserFrame* frame() const { return frame_; }
@@ -679,6 +684,12 @@ class BrowserView : public BrowserWindow,
@@ -685,6 +690,12 @@ class BrowserView : public BrowserWindow,
return accessibility_focus_highlight_.get();
}
@@ -368,7 +368,7 @@ index 140c0df49ea46..7d4ac470dcc9a 100644
}
diff --git chrome/browser/ui/views/toolbar/toolbar_view.cc chrome/browser/ui/views/toolbar/toolbar_view.cc
index f290b0d5ea521..31ffa7e61e69f 100644
index aeda031a86169..229b12b48f975 100644
--- chrome/browser/ui/views/toolbar/toolbar_view.cc
+++ chrome/browser/ui/views/toolbar/toolbar_view.cc
@@ -162,12 +162,13 @@ auto& GetViewCommandMap() {
@@ -397,7 +397,7 @@ index f290b0d5ea521..31ffa7e61e69f 100644
size_animation_.Reset(1);
diff --git chrome/browser/ui/views/toolbar/toolbar_view.h chrome/browser/ui/views/toolbar/toolbar_view.h
index ec77ff5a0611a..0c8d95120d0c5 100644
index 1da8e4f42dc99..3c86aad64f014 100644
--- chrome/browser/ui/views/toolbar/toolbar_view.h
+++ chrome/browser/ui/views/toolbar/toolbar_view.h
@@ -91,7 +91,8 @@ class ToolbarView : public views::AccessiblePaneView,

View File

@@ -188,10 +188,10 @@ index 632ae86c6fd69..55b749ec12421 100644
const std::vector<WebPluginInfo>& all_plugins);
diff --git content/browser/renderer_host/render_frame_host_impl.cc content/browser/renderer_host/render_frame_host_impl.cc
index 974823d53b583..f5d635cd92889 100644
index 0b3cc858e55b3..ae2428a7b0d68 100644
--- content/browser/renderer_host/render_frame_host_impl.cc
+++ content/browser/renderer_host/render_frame_host_impl.cc
@@ -12408,6 +12408,7 @@ void RenderFrameHostImpl::BindHungDetectorHost(
@@ -12431,6 +12431,7 @@ void RenderFrameHostImpl::BindHungDetectorHost(
}
void RenderFrameHostImpl::GetPluginInfo(const GURL& url,
@@ -199,7 +199,7 @@ index 974823d53b583..f5d635cd92889 100644
const url::Origin& main_frame_origin,
const std::string& mime_type,
GetPluginInfoCallback callback) {
@@ -12415,7 +12416,8 @@ void RenderFrameHostImpl::GetPluginInfo(const GURL& url,
@@ -12438,7 +12439,8 @@ void RenderFrameHostImpl::GetPluginInfo(const GURL& url,
WebPluginInfo info;
std::string actual_mime_type;
bool found = PluginServiceImpl::GetInstance()->GetPluginInfo(
@@ -210,10 +210,10 @@ index 974823d53b583..f5d635cd92889 100644
std::move(callback).Run(found, info, actual_mime_type);
}
diff --git content/browser/renderer_host/render_frame_host_impl.h content/browser/renderer_host/render_frame_host_impl.h
index 53cc68edc7fd7..b8b6698f65e9d 100644
index cfa08c48e66e4..638e79ca69fc9 100644
--- content/browser/renderer_host/render_frame_host_impl.h
+++ content/browser/renderer_host/render_frame_host_impl.h
@@ -2611,6 +2611,7 @@ class CONTENT_EXPORT RenderFrameHostImpl
@@ -2617,6 +2617,7 @@ class CONTENT_EXPORT RenderFrameHostImpl
int32_t plugin_child_id,
const base::FilePath& path) override;
void GetPluginInfo(const GURL& url,
@@ -348,10 +348,10 @@ index 173952d4545d5..2f311b988c380 100644
&mime_type);
if (!found)
diff --git content/renderer/render_thread_impl.cc content/renderer/render_thread_impl.cc
index 52c02371bf373..3cd441e5d9a0d 100644
index c0a004136c09c..5fbf7092b07ad 100644
--- content/renderer/render_thread_impl.cc
+++ content/renderer/render_thread_impl.cc
@@ -610,6 +610,8 @@ void RenderThreadImpl::Init() {
@@ -616,6 +616,8 @@ void RenderThreadImpl::Init() {
GetContentClient()->renderer()->CreateURLLoaderThrottleProvider(
blink::URLLoaderThrottleProviderType::kFrame);
@@ -361,30 +361,31 @@ index 52c02371bf373..3cd441e5d9a0d 100644
&RenderThreadImpl::OnRendererInterfaceReceiver, base::Unretained(this)));
diff --git content/renderer/renderer_blink_platform_impl.cc content/renderer/renderer_blink_platform_impl.cc
index 337c630fc85f3..20abead97fe1d 100644
index 0280650b9c9b4..3c91de7baf061 100644
--- content/renderer/renderer_blink_platform_impl.cc
+++ content/renderer/renderer_blink_platform_impl.cc
@@ -1101,6 +1101,15 @@ SkBitmap* RendererBlinkPlatformImpl::GetSadPageBitmap() {
@@ -1105,6 +1105,16 @@ SkBitmap* RendererBlinkPlatformImpl::GetSadPageBitmap() {
//------------------------------------------------------------------------------
+void RendererBlinkPlatformImpl::DevToolsAgentAttached() {
+ GetContentClient()->renderer()->DevToolsAgentAttached();
+}
+
+void RendererBlinkPlatformImpl::DevToolsAgentDetached() {
+ GetContentClient()->renderer()->DevToolsAgentDetached();
+}
+
+//------------------------------------------------------------------------------
+
blink::mojom::CodeCacheHost& RendererBlinkPlatformImpl::GetCodeCacheHost() {
if (!code_cache_host_) {
code_cache_host_ = mojo::SharedRemote<blink::mojom::CodeCacheHost>(
mojo::SharedRemote<blink::mojom::CodeCacheHost>
RendererBlinkPlatformImpl::GetCodeCacheHost() {
base::AutoLock lock(code_cache_host_lock_);
diff --git content/renderer/renderer_blink_platform_impl.h content/renderer/renderer_blink_platform_impl.h
index b199c34615f02..43ced4c4d8cf5 100644
index 577ba7b677366..7549e2f92ea95 100644
--- content/renderer/renderer_blink_platform_impl.h
+++ content/renderer/renderer_blink_platform_impl.h
@@ -258,6 +258,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
@@ -260,6 +260,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
const blink::WebURL& url,
blink::WebVector<blink::WebContentSecurityPolicyHeader>* csp) override;

View File

@@ -46,3 +46,25 @@ index 016046d6caa4f..116e4919cda08 100644
return false;
const char kGLESv2ANGLELibraryName[] = "libGLESv2.so";
diff --git ui/ozone/common/egl_util.cc ui/ozone/common/egl_util.cc
index e028d8cf8dec6..d172832589534 100644
--- ui/ozone/common/egl_util.cc
+++ ui/ozone/common/egl_util.cc
@@ -158,7 +158,7 @@ bool LoadDefaultEGLGLES2Bindings(
#if BUILDFLAG(ENABLE_SWIFTSHADER)
base::FilePath module_path;
#if !defined(OS_FUCHSIA)
- if (!base::PathService::Get(base::DIR_MODULE, &module_path))
+ if (!base::PathService::Get(base::DIR_ASSETS, &module_path))
return false;
module_path = module_path.Append(FILE_PATH_LITERAL("swiftshader/"));
#endif
@@ -171,7 +171,7 @@ bool LoadDefaultEGLGLES2Bindings(
} else if (implementation.gl == gl::kGLImplementationEGLANGLE) {
base::FilePath module_path;
#if !defined(OS_FUCHSIA)
- if (!base::PathService::Get(base::DIR_MODULE, &module_path))
+ if (!base::PathService::Get(base::DIR_ASSETS, &module_path))
return false;
#endif

View File

@@ -1,12 +0,0 @@
diff --git third_party/maldoca/BUILD.gn third_party/maldoca/BUILD.gn
index 3fb5c5962c07b..20e5809263398 100644
--- third_party/maldoca/BUILD.gn
+++ third_party/maldoca/BUILD.gn
@@ -276,6 +276,7 @@ static_library("maldoca") {
"//third_party/boringssl",
"//third_party/libxml",
"//third_party/protobuf:protobuf_lite",
+ "//third_party/re2"
]
public_deps = [

View File

@@ -58,7 +58,7 @@ index 4ff73fd2d9ec3..d56686d8284ba 100644
// Add an entry to the map.
preview_dialog_map_[preview_dialog] = initiator;
diff --git chrome/browser/printing/print_view_manager_base.cc chrome/browser/printing/print_view_manager_base.cc
index e4cacbf9a82da..3f137e18b8087 100644
index e4cacbf9a82da..260fdc00ab860 100644
--- chrome/browser/printing/print_view_manager_base.cc
+++ chrome/browser/printing/print_view_manager_base.cc
@@ -21,6 +21,7 @@
@@ -96,6 +96,16 @@ index e4cacbf9a82da..3f137e18b8087 100644
}
void NotifySystemDialogCancelled(int render_process_id, int routing_id) {
@@ -273,8 +283,7 @@ void UpdatePrintSettingsOnIO(
DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
std::unique_ptr<PrinterQuery> printer_query = queue->PopPrinterQuery(cookie);
if (!printer_query) {
- printer_query = queue->CreatePrinterQuery(
- content::ChildProcessHost::kInvalidUniqueID, MSG_ROUTING_NONE);
+ printer_query = queue->CreatePrinterQuery(process_id, routing_id);
}
auto* printer_query_ptr = printer_query.get();
printer_query_ptr->SetSettings(
diff --git chrome/browser/printing/print_view_manager_base.h chrome/browser/printing/print_view_manager_base.h
index eaa0e162a339b..8e030d2ab3995 100644
--- chrome/browser/printing/print_view_manager_base.h

View File

@@ -1,5 +1,5 @@
diff --git content/browser/renderer_host/render_widget_host_view_aura.cc content/browser/renderer_host/render_widget_host_view_aura.cc
index 28e9a059a5c22..f9de44e10828f 100644
index 7170f19b652dd..6c5149f6c492f 100644
--- content/browser/renderer_host/render_widget_host_view_aura.cc
+++ content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -656,10 +656,12 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() {

View File

@@ -1,5 +1,5 @@
diff --git content/browser/storage_partition_impl.cc content/browser/storage_partition_impl.cc
index de63186ea911e..4beccce527c86 100644
index f3998e40b6d50..761c1615bd1f8 100644
--- content/browser/storage_partition_impl.cc
+++ content/browser/storage_partition_impl.cc
@@ -498,10 +498,6 @@ class LoginHandlerDelegate {
@@ -26,7 +26,7 @@ index de63186ea911e..4beccce527c86 100644
new LoginHandlerDelegate(
std::move(auth_challenge_responder), std::move(web_contents_getter),
auth_info, is_request_for_main_frame, process_id, request_id, url,
@@ -2689,8 +2679,12 @@ void StoragePartitionImpl::GetQuotaSettings(
@@ -2692,8 +2682,12 @@ void StoragePartitionImpl::GetQuotaSettings(
return;
}
@@ -40,7 +40,7 @@ index de63186ea911e..4beccce527c86 100644
storage::GetDefaultDeviceInfoHelper(), std::move(callback));
}
@@ -2703,6 +2697,11 @@ void StoragePartitionImpl::InitNetworkContext() {
@@ -2706,6 +2700,11 @@ void StoragePartitionImpl::InitNetworkContext() {
GetContentClient()->browser()->ConfigureNetworkContextParams(
browser_context_, is_in_memory(), relative_partition_path_,
context_params.get(), cert_verifier_creation_params.get());

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