Compare commits

..

27 Commits
6834 ... 6778

Author SHA1 Message Date
Marshall Greenblatt
2104c4823d Pin depot_tools version for out-of-support branch 2025-02-14 15:13:22 -05:00
Marshall Greenblatt
437feba009 Update copyright year on generated files 2025-01-08 11:59:15 -05:00
Marshall Greenblatt
5e2867c4d8 Update to Chromium version 131.0.6778.265 2025-01-08 16:22:41 +00:00
Marshall Greenblatt
573cec5b7b Update to Chromium version 131.0.6778.205 2024-12-19 14:42:10 +00:00
Marshall Greenblatt
7ecebf0afb ceftests: Fix type conversion error (see #3664) 2024-12-12 13:37:14 -05:00
Marshall Greenblatt
e38eaeb817 win: ceftests: Fix type conversion error (see #3664) 2024-12-12 12:10:59 -05:00
Marshall Greenblatt
ba9f4a4c6e Update to Chromium version 131.0.6778.140 2024-12-11 15:32:34 +00:00
Marshall Greenblatt
cb062dfd35 win: Disable crash metrics collection (fixes #3847) 2024-12-04 13:13:00 -05:00
Marshall Greenblatt
e89192a860 Improve timing of frame attach/detach (see #3664)
- Move frame attachment from RenderFrameCreated to
  DidCommitProvisionalLoad. This has a number of advantages:
  - Significantly reduces the frequency of disconnects by avoiding
    the GetInterface/DidCommitNavigation race condition.
  - Stops connecting temporary frames (created during cross-origin
    navigation), making callback behavior more consistent.
- Split frame detach and destruction notifications into separate
  callbacks. OnFrameDetached now reflects a potentially recoverable
  state. Add a new OnFrameDestroyed callback for the unrecoverable
  destruction state.
2024-12-04 10:53:48 -05:00
Marshall Greenblatt
b5c740eb60 Reduce the frequency of connection-related renderer crashes (see #3664)
- Use ResetWithReason to report intentional browser side disconnects of
  existing Mojo connections. Don't retry for those disconnects.
- Add set_disconnect_with_reason_and_result_handler in Chromium/Mojo to
  expose the MojoResult code for failed connections, allowing
  identification of connections that are intentionally unbound on the
  browser side.
- Optimize initial reconnect delay for known disconnect cases such as
  navigation-related and bfcache changes.
- Remove connection timeout and increase total connection deadline by
  100% to further reduce crash rates on slower machines.
- Only fail fatally for main frames (not sub-frames) in cases where the
  connection fails or disconnects for unknown reasons.
- Improve connection debug logging when running with
  `--enable-logging --vmodule=*frame*=1 --log-file=C:\temp\log.txt`
2024-12-04 10:53:48 -05:00
Marshall Greenblatt
e1f6e57f17 mac: Add applicationSupportsSecureRestorableState
Requests that any state restoration archive be created with secure
encoding (macOS 12+ only). See https://crrev.com/c737387656 for
details. This also fixes an issue with macOS default behavior
incorrectly restoring windows after hard reset (holding down the
power button).
2024-12-04 10:53:48 -05:00
Marshall Greenblatt
491de8d29c Update to Chromium version 131.0.6778.109 2024-12-04 14:05:21 +00:00
Marshall Greenblatt
9a14dc9ff7 Disable prerendering (see #3664)
This is not currently supported by CEF's frame tracking model.
2024-11-21 15:33:39 -05:00
Marshall Greenblatt
e0927d8460 Improve logging of fatal renderer connection errors (see #3664) 2024-11-20 18:56:24 -05:00
Marshall Greenblatt
b351deedda Update to Chromium version 131.0.6778.86 2024-11-20 15:42:19 +00:00
Marshall Greenblatt
b7543e4217 cefclient: Fix accidental usage of C++20 map::contains (see #3611) 2024-11-18 10:52:02 -05:00
Marshall Greenblatt
023a05b84a osr: Fix crash in RenderWidgetHostImpl::WasHidden (fixes #3834) 2024-11-15 12:56:46 -05:00
Marshall Greenblatt
790ec1e1c2 Update to Chromium version 131.0.6778.70 2024-11-14 12:59:38 -05:00
Marshall Greenblatt
e0817536a5 tests: Fix flaky FrameHandlerTest.Order* tests (fixes #3817)
The OnFrameAttached callback relies on a round-trip to the
renderer process and may not be synchronized with OnLoadStart/
OnLoadEnd/OnMainFrameChanged callbacks.
2024-11-13 16:25:07 -05:00
Marshall Greenblatt
1a99a3abc5 Add notification for aborted popups (fixes #3776)
Pass a new |popup_id| parameter to OnBeforePopup and call a new
OnBeforePopupAborted callback if the popup is aborted before
OnAfterCreated is called for the popup browser. Add new
CefBrowserHost::GetBrowserByIdentifier and GetOpenerIdentifier
methods to assist with retrieval of associated browsers.

In cefclient, clean up state when a popup is aborted and close
any associated popup browsers when the opener browser is closed.
This also works when running with `--use-default-popup`.
2024-11-13 16:24:44 -05:00
Marshall Greenblatt
b91be9fcc9 views: Fix Chrome style browser RequestFocus behavior (fixes #3819)
Fix implementation of CefBrowserView::RequestFocus for Chrome style
browsers. Match Alloy style behavior of requesting browser focus
(calling OnSetFocus) after initial navigation. Add CefView::HasFocus
and CefWindow::GetFocusedView that can be used in combination with
CefWindow::IsActive to determine global keyboard focus.

Update sample applications for the new behavior.

In cefclient:
- Browser receives initial focus via ViewsWindow::RequestBrowserFocus.
- When running with `--show-overlay-browser` (see #3790):
  - Give initial focus to the overlay browser.
  - Change the overlay popout shortcut to CTRL+SHIFT+O to avoid
    assigning focus to the menu in the main window.
  - Switching from overlay in the main window to popout browser
    window will give focus to the popout browser.
  - Switching from popout browser to overlay will leave current focus
    unchanged (e.g. in the overlay browser, or somewhere else). User
    gesture to activate the main window may be required on Mac/Linux.
- When running with `--no-active` don't give initial focus to either
  browser.

In cefsimple:
- Browser receives initial focus via default handling.
2024-11-07 11:11:36 -05:00
Marshall Greenblatt
9d40fa604d win: Reland screen_1443650 changes (fixes #3489)
Use ScaleToRoundedRect instead of ScaleToEnclosedRect.
2024-11-05 12:36:58 -05:00
Marshall Greenblatt
e23264eedc cefclient: Add RootWindowManager tracking of other browsers (see #3790)
The message loop should not quit until all browsers have closed,
including browsers that are not directly associated with a RootWindow.
2024-11-04 17:17:43 -05:00
Marshall Greenblatt
47d60f3a60 Free CefMenuRunnerViews on BrowserView destruction (see #3790)
CefMenuRunnerViews holds a raw_ptr<CefBrowserViewImpl> that must be
cleared during CefBrowserViewImpl destruction.
2024-11-04 17:17:32 -05:00
Marshall Greenblatt
41fbe6f0c2 mac: Fix accelerators in overlay BrowserView (see #3188)
CefWindowImpl::CanHandleAccelerators was returning false for
accelerators triggered in the overlay BrowserView due to
IsWindowKey (called from NativeWidgetMac::IsActive) returning
false. View::CanHandleAccelerators, on the other hand, only
checks IsActive for Aura (non-MacOS) windows. We therefore
delegate to the View implementation for consistent handling.
2024-11-04 17:17:22 -05:00
Marshall Greenblatt
0860ec2f3d Execute HandleExternalProtocolHelper on the UI thread (fixes #3821) 2024-11-04 11:47:32 -05:00
Marshall Greenblatt
f8ad36e72c Update to Chromium version 131.0.6778.13 2024-10-25 14:22:00 -04:00
105 changed files with 949 additions and 1185 deletions

View File

@@ -1147,19 +1147,6 @@ config("libcef_dll_wrapper_config") {
ldflags = [ "/STACK:0x800000" ]
}
}
# Build using the minimum C++ version supported by the CEF binary distribution.
# Chromium (and libcef) may build with a newer C++ version so this helps to
# avoid accidental usage of new/unsupported language features in sample apps.
# For Chromium defaults see //build/config/compiler/BUILD.gn.
if (is_win) {
cflags_cc = [ "/std:c++17" ]
} else {
cflags_cc = [ "-std=c++17" ]
}
if (is_mac) {
cflags_objcc = [ "-std=c++17" ]
}
}
# libcef_dll_wrapper target.

View File

@@ -7,6 +7,6 @@
# https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
{
'chromium_checkout': 'refs/tags/132.0.6834.161',
'chromium_checkout': 'refs/tags/131.0.6778.265',
'depot_tools_checkout': 'c9552ffad5'
}

View File

@@ -47,10 +47,10 @@ def declare_exe(name, srcs, manifest_srcs, rc_file, resources_srcs, resources_de
srcs = srcs,
deps = [
"@cef//:cef_wrapper",
"@cef//:cef",
"@cef//:cef_sandbox",
] + deps,
linkopts = [
"$(location @cef//:cef_lib)",
"$(location :{})".format(res_target),
] + COMMON_LINKOPTS + linkopts,
copts = COMMON_COPTS + select({
@@ -62,7 +62,6 @@ def declare_exe(name, srcs, manifest_srcs, rc_file, resources_srcs, resources_de
"//conditions:default": COMMON_DEFINES_RELEASE,
}) + local_defines,
additional_linker_inputs = [
"@cef//:cef_lib",
":{}".format(res_target),
] + additional_linker_inputs,
data = [

View File

@@ -6,10 +6,10 @@
# Distribution DLLs.
#
# NOTE: libcef.dll is included via the //:cef dependency.
DLLS = [
"chrome_elf.dll",
"d3dcompiler_47.dll",
"libcef.dll",
"libEGL.dll",
"libGLESv2.dll",
"vk_swiftshader.dll",

View File

@@ -55,11 +55,10 @@
'include/internal/cef_time.h',
'include/internal/cef_trace_event_internal.h',
'include/internal/cef_types.h',
'include/internal/cef_types_color.h',
'include/internal/cef_types_content_settings.h',
'include/internal/cef_types_geometry.h',
'include/internal/cef_types_osr.h',
'include/internal/cef_types_runtime.h',
'include/internal/cef_types_color.h',
],
'includes_capi': [
'include/capi/cef_base_capi.h',

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 "3e3393f10c4b95f7516521c8643b9a735fd0c3f3"
#define CEF_API_HASH_UNIVERSAL "7ce563b3df3a227c06d331774d5fa51c8421a7f1"
#if defined(OS_WIN)
#define CEF_API_HASH_PLATFORM "aafe004dac5cf8b7f0b5ef12518c4a16e150f510"
#define CEF_API_HASH_PLATFORM "0b070263fe1c7304bd90bd7a8338fcc08410d299"
#elif defined(OS_MAC)
#define CEF_API_HASH_PLATFORM "9cd794a0ab4506060ca2d7b3c335778d026337a4"
#define CEF_API_HASH_PLATFORM "e99938b49f333ccda55ea34dfb36dd65a6b2cacd"
#elif defined(OS_LINUX)
#define CEF_API_HASH_PLATFORM "fab73fe3fddb82c0f75a404fb464935592880803"
#define CEF_API_HASH_PLATFORM "45669721b97760d8cda9ea29a5bd070d38267424"
#endif
#ifdef __cplusplus

View File

@@ -44,7 +44,6 @@ typedef struct _XDisplay XDisplay;
#include "include/internal/cef_string.h"
#include "include/internal/cef_types_color.h"
#include "include/internal/cef_types_geometry.h"
#include "include/internal/cef_types_osr.h"
#include "include/internal/cef_types_runtime.h"
// Handle types.
@@ -194,11 +193,6 @@ typedef struct _cef_accelerated_paint_info_t {
/// The pixel format of the texture.
///
cef_color_type_t format;
///
/// The extra common info.
///
cef_accelerated_paint_info_common_t extra;
} cef_accelerated_paint_info_t;
#ifdef __cplusplus

View File

@@ -37,7 +37,6 @@
#include "include/internal/cef_string.h"
#include "include/internal/cef_types_color.h"
#include "include/internal/cef_types_geometry.h"
#include "include/internal/cef_types_osr.h"
#include "include/internal/cef_types_runtime.h"
// Handle types.
@@ -163,11 +162,6 @@ typedef struct _cef_accelerated_paint_info_t {
/// The pixel format of the texture.
///
cef_color_type_t format;
///
/// The extra common info.
///
cef_accelerated_paint_info_common_t extra;
} cef_accelerated_paint_info_t;
#ifdef __cplusplus

View File

@@ -1,105 +0,0 @@
// Copyright (c) 2024 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.
#ifndef CEF_INCLUDE_INTERNAL_CEF_TYPES_OSR_H_
#define CEF_INCLUDE_INTERNAL_CEF_TYPES_OSR_H_
#pragma once
#include "include/internal/cef_types_geometry.h"
///
/// Structure containing shared texture common metadata.
/// For documentation on each field, please refer to
/// src/media/base/video_frame_metadata.h for actual details.
///
typedef struct _cef_accelerated_paint_info_common_t {
///
/// Timestamp of the frame in microseconds since capture start.
///
uint64_t timestamp;
///
/// The full dimensions of the video frame.
///
cef_size_t coded_size;
///
/// The visible area of the video frame.
///
cef_rect_t visible_rect;
///
/// The region of the video frame that capturer would like to populate.
///
cef_rect_t content_rect;
///
/// Full size of the source frame.
///
cef_size_t source_size;
///
/// Updated area of frame, can be considered as the `dirty` area.
///
cef_rect_t capture_update_rect;
///
/// May reflects where the frame's contents originate from if region
/// capture is used internally.
///
cef_rect_t region_capture_rect;
///
/// The increamental counter of the frame.
///
uint64_t capture_counter;
///
/// Optional flag of capture_update_rect
///
uint8_t has_capture_update_rect;
///
/// Optional flag of region_capture_rect
///
uint8_t has_region_capture_rect;
///
/// Optional flag of source_size
///
uint8_t has_source_size;
///
/// Optional flag of capture_counter
///
uint8_t has_capture_counter;
} cef_accelerated_paint_info_common_t;
#endif // CEF_INCLUDE_INTERNAL_CEF_TYPES_OSR_H_

View File

@@ -39,7 +39,6 @@
#include "include/internal/cef_string.h"
#include "include/internal/cef_types_color.h"
#include "include/internal/cef_types_geometry.h"
#include "include/internal/cef_types_osr.h"
#include "include/internal/cef_types_runtime.h"
// Handle types.
@@ -131,11 +130,6 @@ typedef struct _cef_accelerated_paint_info_t {
/// The pixel format of the texture.
///
cef_color_type_t format;
///
/// The extra common info.
///
cef_accelerated_paint_info_common_t extra;
} cef_accelerated_paint_info_t;
#ifdef __cplusplus

View File

@@ -24,7 +24,7 @@
#include "content/public/browser/render_widget_host_view.h"
#include "services/network/public/mojom/url_response_head.mojom.h"
#include "third_party/blink/public/mojom/favicon/favicon_url.mojom.h"
#include "third_party/blink/public/mojom/input/focus_type.mojom.h"
#include "third_party/blink/public/mojom/input/focus_type.mojom-blink.h"
#include "third_party/blink/public/mojom/page/draggable_region.mojom.h"
#include "third_party/blink/public/mojom/widget/platform_widget.mojom-test-utils.h"
@@ -621,7 +621,7 @@ void CefBrowserContentsDelegate::OnWebContentsFocused(
void CefBrowserContentsDelegate::OnFocusChangedInPage(
content::FocusedNodeDetails* details) {
focus_on_editable_field_ =
details->focus_type != blink::mojom::FocusType::kNone &&
details->focus_type != blink::mojom::blink::FocusType::kNone &&
details->is_editable_node;
}

View File

@@ -47,8 +47,9 @@ SkAlphaType GetSkAlphaType(cef_alpha_type_t alpha_type) {
}
// Compress as PNG. Requires post-multiplied alpha.
std::optional<std::vector<uint8_t>> PNGMethod(bool with_transparency,
const SkBitmap& bitmap) {
bool PNGMethod(bool with_transparency,
const SkBitmap& bitmap,
std::vector<unsigned char>* compressed) {
return gfx::PNGCodec::Encode(
reinterpret_cast<unsigned char*>(bitmap.getPixels()),
bitmap.colorType() == kBGRA_8888_SkColorType ? gfx::PNGCodec::FORMAT_BGRA
@@ -56,14 +57,15 @@ std::optional<std::vector<uint8_t>> PNGMethod(bool with_transparency,
gfx::Size(bitmap.width(), bitmap.height()),
static_cast<int>(bitmap.rowBytes()),
bitmap.alphaType() == kOpaque_SkAlphaType || !with_transparency,
std::vector<gfx::PNGCodec::Comment>());
std::vector<gfx::PNGCodec::Comment>(), compressed);
}
// Compress as JPEG. This internally uses JCS_EXT_RGBX or JCS_EXT_BGRX which
// causes the alpha channel to be ignored. Requires post-multiplied alpha.
std::optional<std::vector<uint8_t>> JPEGMethod(int quality,
const SkBitmap& bitmap) {
return gfx::JPEGCodec::Encode(bitmap, quality);
bool JPEGMethod(int quality,
const SkBitmap& bitmap,
std::vector<unsigned char>* compressed) {
return gfx::JPEGCodec::Encode(bitmap, quality, compressed);
}
} // namespace
@@ -130,9 +132,9 @@ bool CefImageImpl::AddBitmap(float scale_factor,
bool CefImageImpl::AddPNG(float scale_factor,
const void* png_data,
size_t png_data_size) {
const SkBitmap& bitmap = gfx::PNGCodec::Decode(
base::span(static_cast<const unsigned char*>(png_data), png_data_size));
if (bitmap.isNull()) {
SkBitmap bitmap;
if (!gfx::PNGCodec::Decode(static_cast<const unsigned char*>(png_data),
png_data_size, &bitmap)) {
return false;
}
@@ -142,13 +144,13 @@ bool CefImageImpl::AddPNG(float scale_factor,
bool CefImageImpl::AddJPEG(float scale_factor,
const void* jpeg_data,
size_t jpeg_data_size) {
const SkBitmap& bitmap = gfx::JPEGCodec::Decode(
base::span(static_cast<const unsigned char*>(jpeg_data), jpeg_data_size));
if (bitmap.isNull()) {
std::unique_ptr<SkBitmap> bitmap(gfx::JPEGCodec::Decode(
static_cast<const unsigned char*>(jpeg_data), jpeg_data_size));
if (!bitmap.get()) {
return false;
}
return AddBitmap(scale_factor, bitmap);
return AddBitmap(scale_factor, *bitmap);
}
size_t CefImageImpl::GetWidth() {
@@ -241,11 +243,10 @@ CefRefPtr<CefBinaryValue> CefImageImpl::GetAsPNG(float scale_factor,
return nullptr;
}
const auto& result = WritePNG(*bitmap, with_transparency);
if (!result.has_value()) {
std::vector<unsigned char> compressed;
if (!WritePNG(*bitmap, &compressed, with_transparency)) {
return nullptr;
}
const auto& compressed = *result;
pixel_width = bitmap->width();
pixel_height = bitmap->height();
@@ -263,11 +264,10 @@ CefRefPtr<CefBinaryValue> CefImageImpl::GetAsJPEG(float scale_factor,
return nullptr;
}
const auto& result = WriteJPEG(*bitmap, quality);
if (!result.has_value()) {
std::vector<unsigned char> compressed;
if (!WriteJPEG(*bitmap, &compressed, quality)) {
return nullptr;
}
const auto& compressed = *result;
pixel_width = bitmap->width();
pixel_height = bitmap->height();
@@ -385,16 +385,16 @@ bool CefImageImpl::ConvertBitmap(const SkBitmap& src_bitmap,
}
// static
std::optional<std::vector<uint8_t>> CefImageImpl::WriteCompressedFormat(
const SkBitmap& bitmap,
CompressionMethod method) {
bool CefImageImpl::WriteCompressedFormat(const SkBitmap& bitmap,
std::vector<unsigned char>* compressed,
CompressionMethod method) {
const SkBitmap* bitmap_ptr = nullptr;
SkBitmap bitmap_postalpha;
if (bitmap.alphaType() == kPremul_SkAlphaType) {
// Compression methods require post-multiplied alpha values.
if (!ConvertBitmap(bitmap, &bitmap_postalpha, bitmap.colorType(),
kUnpremul_SkAlphaType)) {
return std::nullopt;
return false;
}
bitmap_ptr = &bitmap_postalpha;
} else {
@@ -407,20 +407,21 @@ std::optional<std::vector<uint8_t>> CefImageImpl::WriteCompressedFormat(
DCHECK(bitmap_ptr->alphaType() == kOpaque_SkAlphaType ||
bitmap_ptr->alphaType() == kUnpremul_SkAlphaType);
return std::move(method).Run(*bitmap_ptr);
return std::move(method).Run(*bitmap_ptr, compressed);
}
// static
std::optional<std::vector<uint8_t>> CefImageImpl::WritePNG(
const SkBitmap& bitmap,
bool with_transparency) {
return WriteCompressedFormat(bitmap,
bool CefImageImpl::WritePNG(const SkBitmap& bitmap,
std::vector<unsigned char>* compressed,
bool with_transparency) {
return WriteCompressedFormat(bitmap, compressed,
base::BindOnce(PNGMethod, with_transparency));
}
// static
std::optional<std::vector<uint8_t>> CefImageImpl::WriteJPEG(
const SkBitmap& bitmap,
int quality) {
return WriteCompressedFormat(bitmap, base::BindOnce(JPEGMethod, quality));
bool CefImageImpl::WriteJPEG(const SkBitmap& bitmap,
std::vector<unsigned char>* compressed,
int quality) {
return WriteCompressedFormat(bitmap, compressed,
base::BindOnce(JPEGMethod, quality));
}

View File

@@ -6,9 +6,6 @@
#define CEF_LIBCEF_BROWSER_IMAGE_IMPL_H_
#pragma once
#include <optional>
#include <vector>
#include "cef/include/cef_image.h"
#include "cef/libcef/browser/thread_util.h"
#include "third_party/skia/include/core/SkBitmap.h"
@@ -99,26 +96,26 @@ class CefImageImpl : public CefImage {
SkAlphaType target_at);
// The |bitmap| argument will be RGBA or BGRA and either opaque or transparent
// with post-multiplied alpha. Returns the compressed output or std::nullopt.
// with post-multiplied alpha. Writes the compressed output into |compressed|.
using CompressionMethod =
base::OnceCallback<std::optional<std::vector<uint8_t>>(
const SkBitmap& /*bitmap*/)>;
base::OnceCallback<bool(const SkBitmap& /*bitmap*/,
std::vector<unsigned char>* /*compressed*/)>;
// Write |bitmap| using |method|. Returns the compressed output or
// std::nullopt.
static std::optional<std::vector<uint8_t>> WriteCompressedFormat(
const SkBitmap& bitmap,
CompressionMethod method);
// Write |bitmap| into |compressed| using |method|.
static bool WriteCompressedFormat(const SkBitmap& bitmap,
std::vector<unsigned char>* compressed,
CompressionMethod method);
// Write |bitmap|using PNG encoding. Returns the compressed output or
// std::nullopt.
static std::optional<std::vector<uint8_t>> WritePNG(const SkBitmap& bitmap,
bool with_transparency);
// Write |bitmap| into |compressed| using PNG encoding.
static bool WritePNG(const SkBitmap& bitmap,
std::vector<unsigned char>* compressed,
bool with_transparency);
// Write |bitmap| using JPEG encoding. The alpha channel will be ignored.
// Returns the compressed output or std::nullopt.
static std::optional<std::vector<uint8_t>> WriteJPEG(const SkBitmap& bitmap,
int quality);
// Write |bitmap| into |compressed| using JPEG encoding. The alpha channel
// will be ignored.
static bool WriteJPEG(const SkBitmap& bitmap,
std::vector<unsigned char>* compressed,
int quality);
mutable base::Lock lock_;

View File

@@ -7,8 +7,8 @@
#import "base/mac/scoped_sending_event.h"
#include "base/task/current_thread.h"
#include "cef/libcef/browser/alloy/alloy_browser_host_impl.h"
#import "ui/base/cocoa/menu_controller.h"
#include "ui/gfx/geometry/point.h"
#import "ui/menus/cocoa/menu_controller.h"
CefMenuRunnerMac::CefMenuRunnerMac() {}

View File

@@ -8,7 +8,6 @@
#include "base/strings/string_util.h"
#include "cef/libcef/browser/alloy/alloy_browser_host_impl.h"
#include "ui/base/mojom/menu_source_type.mojom.h"
#include "ui/gfx/geometry/point.h"
CefMenuRunnerViewsAura::CefMenuRunnerViewsAura() = default;
@@ -36,8 +35,7 @@ bool CefMenuRunnerViewsAura::RunContextMenu(
gfx::Point(params.x, params.y), /*want_dip_coords=*/true);
menu_->RunMenuAt(widget, nullptr, gfx::Rect(screen_point, gfx::Size()),
views::MenuAnchorPosition::kTopRight,
ui::mojom::MenuSourceType::kNone,
views::MenuAnchorPosition::kTopRight, ui::MENU_SOURCE_NONE,
/*native_view_for_gestures=*/nullptr, parent_widget);
return true;

View File

@@ -43,10 +43,11 @@ const void* const kResourceContextUserDataKey = &kResourceContextUserDataKey;
std::optional<std::string> GetHeaderString(
const net::HttpResponseHeaders* headers,
const std::string& header_name) {
if (headers) {
return headers->GetNormalizedHeader(header_name);
std::string header_value;
if (!headers || !headers->GetNormalizedHeader(header_name, &header_value)) {
return std::nullopt;
}
return std::nullopt;
return header_value;
}
void CreateProxyHelper(

View File

@@ -24,7 +24,6 @@
#include "cef/libcef/browser/thread_util.h"
#include "components/input/cursor_manager.h"
#include "components/input/render_widget_host_input_event_router.h"
#include "components/input/switches.h"
#include "components/viz/common/features.h"
#include "components/viz/common/frame_sinks/begin_frame_args.h"
#include "components/viz/common/frame_sinks/copy_output_request.h"
@@ -39,6 +38,7 @@
#include "content/browser/renderer_host/input/synthetic_gesture_target_base.h"
#include "content/browser/renderer_host/render_widget_host_delegate.h"
#include "content/browser/renderer_host/render_widget_host_impl.h"
#include "content/common/content_switches_internal.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/context_factory.h"
@@ -210,7 +210,7 @@ CefRenderWidgetHostViewOSR::CefRenderWidgetHostViewOSR(
render_widget_host_(content::RenderWidgetHostImpl::From(widget)),
has_parent_(parent_host_view != nullptr),
parent_host_view_(parent_host_view),
pinch_zoom_enabled_(input::switches::IsPinchToZoomEnabled()),
pinch_zoom_enabled_(content::IsPinchToZoomEnabled()),
mouse_wheel_phase_handler_(this),
gesture_provider_(CreateGestureProviderConfig(), this),
weak_ptr_factory_(this) {

View File

@@ -17,10 +17,9 @@
#include "content/public/browser/render_view_host.h"
#include "ui/base/clipboard/clipboard.h"
#include "ui/base/data_transfer_policy/data_transfer_endpoint.h"
#include "ui/base/mojom/menu_source_type.mojom-forward.h"
#include "ui/base/pointer/touch_editing_controller.h"
#include "ui/gfx/geometry/point_conversions.h"
#include "ui/gfx/geometry/size_conversions.h"
#include "ui/touch_selection/touch_editing_controller.h"
namespace {
@@ -147,8 +146,8 @@ void CefTouchSelectionControllerClientOSR::OnScrollCompleted() {
bool CefTouchSelectionControllerClientOSR::HandleContextMenu(
const content::ContextMenuParams& params) {
if ((params.source_type == ui::mojom::MenuSourceType::kLongPress ||
params.source_type == ui::mojom::MenuSourceType::kLongTap) &&
if ((params.source_type == ui::MENU_SOURCE_LONG_PRESS ||
params.source_type == ui::MENU_SOURCE_LONG_TAP) &&
params.is_editable && params.selection_text.empty() &&
IsQuickMenuAvailable()) {
quick_menu_requested_ = true;
@@ -156,10 +155,9 @@ bool CefTouchSelectionControllerClientOSR::HandleContextMenu(
return true;
}
const bool from_touch =
params.source_type == ui::mojom::MenuSourceType::kLongPress ||
params.source_type == ui::mojom::MenuSourceType::kLongTap ||
params.source_type == ui::mojom::MenuSourceType::kTouch;
const bool from_touch = params.source_type == ui::MENU_SOURCE_LONG_PRESS ||
params.source_type == ui::MENU_SOURCE_LONG_TAP ||
params.source_type == ui::MENU_SOURCE_TOUCH;
if (from_touch && !params.selection_text.empty()) {
return true;
}
@@ -532,9 +530,8 @@ void CefTouchSelectionControllerClientOSR::RunContextMenu() {
rwhv_->selection_controller()->GetVisibleRectBetweenBounds();
const gfx::PointF anchor_point =
gfx::PointF(anchor_rect.CenterPoint().x(), anchor_rect.y());
rwhv_->host()->ShowContextMenuAtPoint(
gfx::ToRoundedPoint(anchor_point),
ui::mojom::MenuSourceType::kTouchEditMenu);
rwhv_->host()->ShowContextMenuAtPoint(gfx::ToRoundedPoint(anchor_point),
ui::MENU_SOURCE_TOUCH_EDIT_MENU);
// Hide selection handles after getting rect-between-bounds from touch
// selection controller; otherwise, rect would be empty and the above

View File

@@ -99,30 +99,6 @@ void CefVideoConsumerOSR::OnFrameCaptured(
callbacks) {
ScopedVideoFrameDone scoped_done(std::move(callbacks));
media::VideoFrameMetadata metadata = info->metadata;
gfx::Rect damage_rect;
if (bounds_in_pixels_) {
// Use the bounds passed to RequestRefreshFrame().
damage_rect = gfx::Rect(info->coded_size);
damage_rect.Intersect(*bounds_in_pixels_);
bounds_in_pixels_ = std::nullopt;
} else {
// Retrieve the rectangular region of the frame that has changed since the
// frame with the directly preceding CAPTURE_COUNTER. If that frame was not
// received, typically because it was dropped during transport from the
// producer, clients must assume that the entire frame has changed.
// This rectangle is relative to the full frame data, i.e. [0, 0,
// coded_size.width(), coded_size.height()]. It does not have to be
// fully contained within visible_rect.
if (metadata.capture_update_rect) {
damage_rect = *metadata.capture_update_rect;
}
if (damage_rect.IsEmpty()) {
damage_rect = gfx::Rect(info->coded_size);
}
}
// If it is GPU Texture OSR.
if (use_shared_texture_) {
CHECK(data->is_gpu_memory_buffer_handle() &&
@@ -136,61 +112,24 @@ void CefVideoConsumerOSR::OnFrameCaptured(
? CEF_COLOR_TYPE_RGBA_8888
: CEF_COLOR_TYPE_BGRA_8888;
// Build extra common info.
cef_accelerated_paint_info_common_t extra = {};
extra.timestamp = info->timestamp.InMicroseconds();
extra.coded_size = {info->coded_size.width(), info->coded_size.height()};
extra.visible_rect = {info->visible_rect.x(), info->visible_rect.y(),
info->visible_rect.width(),
info->visible_rect.height()};
extra.content_rect = {content_rect.x(), content_rect.y(),
content_rect.width(), content_rect.height()};
extra.timestamp = info->timestamp.InMicroseconds();
extra.has_capture_counter = info->metadata.capture_counter.has_value();
extra.has_capture_update_rect =
info->metadata.capture_update_rect.has_value();
extra.has_region_capture_rect =
info->metadata.region_capture_rect.has_value();
extra.has_source_size = info->metadata.source_size.has_value();
extra.capture_counter = info->metadata.capture_counter.value_or(0);
if (extra.has_capture_update_rect) {
auto rect = info->metadata.capture_update_rect.value();
extra.capture_update_rect = {rect.x(), rect.y(), rect.width(),
rect.height()};
}
if (extra.has_region_capture_rect) {
auto rect = info->metadata.region_capture_rect.value();
extra.region_capture_rect = {rect.x(), rect.y(), rect.width(),
rect.height()};
}
if (extra.has_source_size) {
auto size = info->metadata.source_size.value();
extra.source_size = {size.width(), size.height()};
}
#if BUILDFLAG(IS_WIN)
auto& gmb_handle = data->get_gpu_memory_buffer_handle();
cef_accelerated_paint_info_t paint_info;
paint_info.extra = extra;
paint_info.shared_texture_handle = gmb_handle.dxgi_handle.Get();
paint_info.format = pixel_format;
view_->OnAcceleratedPaint(damage_rect, info->coded_size, paint_info);
view_->OnAcceleratedPaint(content_rect, info->coded_size, paint_info);
#elif BUILDFLAG(IS_APPLE)
auto& gmb_handle = data->get_gpu_memory_buffer_handle();
cef_accelerated_paint_info_t paint_info;
paint_info.extra = extra;
paint_info.shared_texture_io_surface = gmb_handle.io_surface.get();
paint_info.format = pixel_format;
view_->OnAcceleratedPaint(damage_rect, info->coded_size, paint_info);
view_->OnAcceleratedPaint(content_rect, info->coded_size, paint_info);
#elif BUILDFLAG(IS_LINUX)
auto& gmb_handle = data->get_gpu_memory_buffer_handle();
auto& native_pixmap = gmb_handle.native_pixmap_handle;
CHECK(native_pixmap.planes.size() <= kAcceleratedPaintMaxPlanes);
cef_accelerated_paint_info_t paint_info;
paint_info.extra = extra;
paint_info.plane_count = native_pixmap.planes.size();
paint_info.modifier = native_pixmap.modifier;
paint_info.format = pixel_format;
@@ -204,12 +143,11 @@ void CefVideoConsumerOSR::OnFrameCaptured(
cef_plane.fd = plane.fd.get();
paint_info.planes[cef_plain_index++] = cef_plane;
}
view_->OnAcceleratedPaint(damage_rect, info->coded_size, paint_info);
view_->OnAcceleratedPaint(content_rect, info->coded_size, paint_info);
#endif
return;
}
// If it is CPU bitmap OSR.
if (info->pixel_format != media::PIXEL_FORMAT_ARGB) {
DLOG(ERROR) << "Unsupported pixel format " << info->pixel_format;
return;
@@ -241,5 +179,29 @@ void CefVideoConsumerOSR::OnFrameCaptured(
// API requires a non-const pointer. So, cast away the const.
void* const pixels = const_cast<void*>(mapping.memory());
media::VideoFrameMetadata metadata = info->metadata;
gfx::Rect damage_rect;
if (bounds_in_pixels_) {
// Use the bounds passed to RequestRefreshFrame().
damage_rect = gfx::Rect(info->coded_size);
damage_rect.Intersect(*bounds_in_pixels_);
bounds_in_pixels_ = std::nullopt;
} else {
// Retrieve the rectangular region of the frame that has changed since the
// frame with the directly preceding CAPTURE_COUNTER. If that frame was not
// received, typically because it was dropped during transport from the
// producer, clients must assume that the entire frame has changed.
// This rectangle is relative to the full frame data, i.e. [0, 0,
// coded_size.width(), coded_size.height()]. It does not have to be
// fully contained within visible_rect.
if (metadata.capture_update_rect) {
damage_rect = *metadata.capture_update_rect;
}
if (damage_rect.IsEmpty()) {
damage_rect = gfx::Rect(info->coded_size);
}
}
view_->OnPaint(damage_rect, info->coded_size, pixels);
}

View File

@@ -13,7 +13,7 @@
#include "base/memory/raw_ptr.h"
#include "base/threading/platform_thread.h"
#include "cef/include/cef_menu_model.h"
#include "ui/menus/simple_menu_model.h"
#include "ui/base/models/simple_menu_model.h"
// Implementation of CefMenuModel that wraps an existing ui::SimpleMenuModel.
class CefSimpleMenuModelImpl : public CefMenuModel {

View File

@@ -7,7 +7,6 @@
#include "base/files/file_path.h"
#include "base/path_service.h"
#include "cef/include/test/cef_test_helpers.h"
#include "net/base/features.h"
#include "services/network/public/cpp/features.h"
void CefSetDataDirectoryForTests(const CefString& dir) {
@@ -19,7 +18,6 @@ void CefSetDataDirectoryForTests(const CefString& dir) {
bool CefIsFeatureEnabledForTests(const CefString& feature_name) {
// Only includes values that are queried by unit tests.
const base::Feature* features[] = {
&net::features::kIgnoreHSTSForLocalhost,
&base::features::kUseRustJsonParser,
&network::features::kReduceAcceptLanguage,
};

View File

@@ -18,7 +18,6 @@
#include "cef/libcef/browser/views/widget.h"
#include "cef/libcef/browser/views/window_view.h"
#include "components/constrained_window/constrained_window_views.h"
#include "ui/base/mojom/menu_source_type.mojom.h"
#include "ui/base/test/ui_controls.h"
#include "ui/compositor/compositor.h"
#include "ui/gfx/geometry/rect.h"
@@ -555,7 +554,7 @@ void CefWindowImpl::ShowMenu(views::MenuButton* menu_button,
widget_, menu_button ? menu_button->button_controller() : nullptr,
gfx::Rect(gfx::Point(screen_point.x, screen_point.y), gfx::Size()),
static_cast<views::MenuAnchorPosition>(anchor_position),
ui::mojom::MenuSourceType::kNone);
ui::MENU_SOURCE_NONE);
}
void CefWindowImpl::MenuClosed() {

View File

@@ -24,11 +24,6 @@ gfx::Image CefResourceBundleDelegate::GetNativeImageNamed(int resource_id) {
return gfx::Image();
}
bool CefResourceBundleDelegate::HasDataResource(int resource_id) const {
// This has no impact on the loading of resources in ResourceBundle.
return false;
}
base::RefCountedMemory* CefResourceBundleDelegate::LoadDataResourceBytes(
int resource_id,
ui::ResourceScaleFactor scale_factor) {

View File

@@ -26,7 +26,6 @@ class CefResourceBundleDelegate : public ui::ResourceBundle::Delegate {
const std::string& locale) override;
gfx::Image GetImageNamed(int resource_id) override;
gfx::Image GetNativeImageNamed(int resource_id) override;
bool HasDataResource(int resource_id) const override;
base::RefCountedMemory* LoadDataResourceBytes(
int resource_id,
ui::ResourceScaleFactor scale_factor) override;

View File

@@ -35,6 +35,8 @@
#include "cef/libcef/renderer/thread_util.h"
#include "cef/libcef/renderer/v8_impl.h"
#include "content/renderer/render_frame_impl.h"
#include "third_party/blink/public/mojom/frame/frame.mojom-blink.h"
#include "third_party/blink/public/mojom/frame/lifecycle.mojom-blink.h"
#include "third_party/blink/public/platform/scheduler/web_agent_group_scheduler.h"
#include "third_party/blink/public/platform/web_data.h"
#include "third_party/blink/public/platform/web_string.h"

View File

@@ -512,10 +512,6 @@ patches = [
# win: Add SHA256 implementation for Sid::FromNamedCapability using the
# Crypto API.
# https://github.com/chromiumembedded/cef/issues/3791
#
# win: Disable use of Rust for JSON parsing with cef_sandbox.
# Enables the fallback to C++ that was removed in
# https://crrev.com/9ddc1624637c8cfa8ef50a95abd779e0ba4d67f6
'name': 'base_sandbox_2743',
},
{
@@ -553,6 +549,14 @@ patches = [
# https://github.com/chromiumembedded/cef/issues/3105
'name': 'browser_security_policy_1081397',
},
{
# Fix build errors with enable_background_mode=false.
# https://bugs.chromium.org/p/chromium/issues/detail?id=1100085
#
# Changes to support the Chrome runtime in CEF (app_controller_mac.mm).
# https://github.com/chromiumembedded/cef/issues/2969
'name': 'chrome_browser_background_mode_1100085',
},
{
# Linux: Fix ATK assertion error when generating ARM build config.
# https://bugs.chromium.org/p/chromium/issues/detail?id=1123214
@@ -743,17 +747,6 @@ patches = [
# https://github.com/chromiumembedded/cef/issues/3616
'name': 'third_party_sentencepiece_3616'
},
{
# linux: Fix error: invalid operands to binary expression.
'name': 'ui_base_x11_util'
},
{
# Add v8_used_in_shared_library GN arg to configure the
# V8_TLS_USED_IN_LIBRARY define.
# https://issues.chromium.org/issues/336738728
'name': 'v8_build',
'path': 'v8'
},
{
# Expose Mojo Connector error state to Receiver disconnect handlers.
# https://github.com/chromiumembedded/cef/issues/3664

View File

@@ -1,8 +1,8 @@
diff --git base/BUILD.gn base/BUILD.gn
index 5dee8a9226d24..a8215969e3494 100644
index 4c0e4645f64e3..4ace56138209d 100644
--- base/BUILD.gn
+++ base/BUILD.gn
@@ -43,6 +43,7 @@ import("//build/rust/rust_static_library.gni")
@@ -41,6 +41,7 @@ import("//build/nocompile.gni")
import("//build/timestamp.gni")
import("//build/util/process_version.gni")
import("//build_overrides/build.gni")
@@ -10,7 +10,7 @@ index 5dee8a9226d24..a8215969e3494 100644
import("//testing/libfuzzer/fuzzer_test.gni")
import("//testing/test.gni")
@@ -1483,7 +1484,11 @@ component("base") {
@@ -1503,7 +1504,11 @@ component("base") {
"hash/md5_constexpr_internal.h",
"hash/sha1.h",
]
@@ -23,7 +23,7 @@ index 5dee8a9226d24..a8215969e3494 100644
sources += [
"hash/md5_nacl.cc",
"hash/md5_nacl.h",
@@ -1916,6 +1921,12 @@ component("base") {
@@ -1934,6 +1939,12 @@ component("base") {
defines += [ "COM_INIT_CHECK_HOOK_DISABLED" ]
}
@@ -87,116 +87,6 @@ index 2158b648ca58a..8a8cb13b2fd74 100644
#include "base/hash/sha1_nacl.h"
#else
#include "base/hash/sha1_boringssl.h"
diff --git base/json/json_reader.cc base/json/json_reader.cc
index b3db0dea0fff6..e53ff0049559a 100644
--- base/json/json_reader.cc
+++ base/json/json_reader.cc
@@ -12,8 +12,9 @@
#include "base/logging.h"
#include "base/metrics/histogram_macros.h"
#include "build/build_config.h"
+#include "cef/libcef/features/features.h"
-#if !BUILDFLAG(IS_NACL)
+#if !(BUILDFLAG(IS_NACL) || BUILDFLAG(IS_CEF_SANDBOX_BUILD))
#include "base/strings/string_view_rust.h"
#include "third_party/rust/serde_json_lenient/v0_2/wrapper/functions.h"
#include "third_party/rust/serde_json_lenient/v0_2/wrapper/lib.rs.h"
@@ -23,7 +24,7 @@ namespace base {
// TODO(crbug.com/40811643): Move the C++ parser into components/nacl to just
// run in-process there. Don't compile base::JSONReader on NaCL at all.
-#if !BUILDFLAG(IS_NACL)
+#if !(BUILDFLAG(IS_NACL) || BUILDFLAG(IS_CEF_SANDBOX_BUILD))
namespace {
using serde_json_lenient::ContextPointer;
@@ -134,16 +135,16 @@ JSONReader::Result DecodeJSONInRust(std::string_view json,
} // anonymous namespace
-#endif // !BUILDFLAG(IS_NACL)
+#endif // !(BUILDFLAG(IS_NACL) || BUILDFLAG(IS_CEF_SANDBOX_BUILD))
// static
std::optional<Value> JSONReader::Read(std::string_view json,
int options,
size_t max_depth) {
-#if BUILDFLAG(IS_NACL)
+#if (BUILDFLAG(IS_NACL) || BUILDFLAG(IS_CEF_SANDBOX_BUILD))
internal::JSONParser parser(options, max_depth);
return parser.Parse(json);
-#else // BUILDFLAG(IS_NACL)
+#else // (BUILDFLAG(IS_NACL) || BUILDFLAG(IS_CEF_SANDBOX_BUILD))
SCOPED_UMA_HISTOGRAM_TIMER_MICROS(kSecurityJsonParsingTime);
if (UsingRust()) {
JSONReader::Result result = DecodeJSONInRust(json, options, max_depth);
@@ -155,7 +156,7 @@ std::optional<Value> JSONReader::Read(std::string_view json,
internal::JSONParser parser(options, max_depth);
return parser.Parse(json);
}
-#endif // BUILDFLAG(IS_NACL)
+#endif // (BUILDFLAG(IS_NACL) || BUILDFLAG(IS_CEF_SANDBOX_BUILD))
}
// static
@@ -173,7 +174,7 @@ std::optional<Value::Dict> JSONReader::ReadDict(std::string_view json,
JSONReader::Result JSONReader::ReadAndReturnValueWithError(
std::string_view json,
int options) {
-#if BUILDFLAG(IS_NACL)
+#if (BUILDFLAG(IS_NACL) || BUILDFLAG(IS_CEF_SANDBOX_BUILD))
internal::JSONParser parser(options);
auto value = parser.Parse(json);
if (!value) {
@@ -185,7 +186,7 @@ JSONReader::Result JSONReader::ReadAndReturnValueWithError(
}
return std::move(*value);
-#else // BUILDFLAG(IS_NACL)
+#else // (BUILDFLAG(IS_NACL) || BUILDFLAG(IS_CEF_SANDBOX_BUILD))
SCOPED_UMA_HISTOGRAM_TIMER_MICROS(kSecurityJsonParsingTime);
if (UsingRust()) {
return DecodeJSONInRust(json, options, internal::kAbsoluteMaxDepth);
@@ -202,7 +203,7 @@ JSONReader::Result JSONReader::ReadAndReturnValueWithError(
return std::move(*value);
}
-#endif // BUILDFLAG(IS_NACL)
+#endif // (BUILDFLAG(IS_NACL) || BUILDFLAG(IS_CEF_SANDBOX_BUILD))
}
// static
@@ -213,7 +214,7 @@ bool JSONReader::UsingRust() {
if (!base::FeatureList::GetInstance()) {
return false;
}
-#if BUILDFLAG(IS_NACL)
+#if (BUILDFLAG(IS_NACL) || BUILDFLAG(IS_CEF_SANDBOX_BUILD))
return false;
#else
return base::FeatureList::IsEnabled(base::features::kUseRustJsonParser);
diff --git base/logging.cc base/logging.cc
index 508ce135131aa..4158b7d5273b0 100644
--- base/logging.cc
+++ base/logging.cc
@@ -60,6 +60,7 @@
#include "base/vlog.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
+#include "cef/libcef/features/features.h"
#include "third_party/abseil-cpp/absl/base/internal/raw_logging.h"
#include "third_party/abseil-cpp/absl/cleanup/cleanup.h"
@@ -526,7 +527,7 @@ bool BaseInitLoggingImpl(const LoggingSettings& settings) {
}
#endif
-#if !BUILDFLAG(IS_NACL)
+#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_CEF_SANDBOX_BUILD)
// Connects Rust logging with the //base logging functionality.
internal::init_rust_log_crate();
#endif
diff --git base/metrics/crc32.cc base/metrics/crc32.cc
index 83e3cee2579ab..8238767ab9126 100644
--- base/metrics/crc32.cc
@@ -220,7 +110,7 @@ index 83e3cee2579ab..8238767ab9126 100644
if (data.empty()) {
return sum;
diff --git base/rand_util.h base/rand_util.h
index b198a7198aab9..01bc8e9b6ad1f 100644
index 746166bf75df7..7192a939e4fec 100644
--- base/rand_util.h
+++ base/rand_util.h
@@ -17,8 +17,9 @@
@@ -234,7 +124,7 @@ index b198a7198aab9..01bc8e9b6ad1f 100644
#include "third_party/boringssl/src/include/openssl/rand.h"
#endif
@@ -117,7 +118,7 @@ class RandomBitGenerator {
@@ -123,7 +124,7 @@ class RandomBitGenerator {
~RandomBitGenerator() = default;
};

View File

@@ -1,8 +1,8 @@
diff --git base/test/BUILD.gn base/test/BUILD.gn
index ddf58b1d496e0..8a6c409b452f3 100644
index c37ba6534270c..e1a9443a746cd 100644
--- base/test/BUILD.gn
+++ base/test/BUILD.gn
@@ -210,11 +210,6 @@ static_library("test_support") {
@@ -199,11 +199,6 @@ static_library("test_support") {
if (enable_base_tracing) {
public_deps += [ "//third_party/perfetto:perfetto_test_support" ]
@@ -14,7 +14,7 @@ index ddf58b1d496e0..8a6c409b452f3 100644
deps += [
":amalgamated_perfetto_sql_stdlib",
":gen_cc_chrome_track_event_descriptor",
@@ -609,7 +604,7 @@ if (enable_base_tracing) {
@@ -597,7 +592,7 @@ if (enable_base_tracing) {
# processor depends on dev_sqlite. The two share the same symbols but have
# different implementations, so we need to hide dev_sqlite in this shared
# library even in non-component builds to prevent duplicate symbols.
@@ -23,7 +23,7 @@ index ddf58b1d496e0..8a6c409b452f3 100644
if (is_ios) {
_target_type = "ios_framework_bundle"
}
@@ -618,6 +613,8 @@ if (enable_base_tracing) {
@@ -606,6 +601,8 @@ if (enable_base_tracing) {
defines = [ "TEST_TRACE_PROCESSOR_IMPL" ]
testonly = true
sources = [
@@ -32,7 +32,7 @@ index ddf58b1d496e0..8a6c409b452f3 100644
"test_trace_processor_export.h",
"test_trace_processor_impl.cc",
"test_trace_processor_impl.h",
@@ -635,33 +632,6 @@ if (enable_base_tracing) {
@@ -623,33 +620,6 @@ if (enable_base_tracing) {
output_name = "TestTraceProcessor"
bundle_deps_filter = [ "//third_party/icu:icudata" ]
}
@@ -88,10 +88,10 @@ index f5191b804bc07..aadb7d66ba4c3 100644
+
#endif // BASE_TEST_TEST_TRACE_PROCESSOR_EXPORT_H_
diff --git content/shell/BUILD.gn content/shell/BUILD.gn
index 14192d15579a2..d6affd97970d5 100644
index 7adc7cdd12c30..0e93b2dfe2f25 100644
--- content/shell/BUILD.gn
+++ content/shell/BUILD.gn
@@ -914,7 +914,6 @@ if (is_mac) {
@@ -913,7 +913,6 @@ if (is_mac) {
# Specify a sensible install_name for static builds. The library is
# dlopen()ed so this is not used to resolve the module.
ldflags = [ "-Wl,-install_name,@executable_path/../Frameworks/$output_name.framework/$output_name" ]

View File

@@ -1,8 +1,8 @@
diff --git content/browser/scheduler/browser_task_executor.cc content/browser/scheduler/browser_task_executor.cc
index 0cc947d5ba1c6..4cb8ee3b1544b 100644
index 9572bef1de74f..8d67dc7ceca2e 100644
--- content/browser/scheduler/browser_task_executor.cc
+++ content/browser/scheduler/browser_task_executor.cc
@@ -208,7 +208,7 @@ BrowserTaskExecutor::OnUserInputStart() {
@@ -209,7 +209,7 @@ BrowserTaskExecutor::OnUserInputStart() {
// static
void BrowserTaskExecutor::Shutdown() {

View File

@@ -1,8 +1,8 @@
diff --git content/browser/child_process_security_policy_impl.cc content/browser/child_process_security_policy_impl.cc
index d4d1572304587..35fa3abc12213 100644
index eae60792ce033..6f6641e3fd3dd 100644
--- content/browser/child_process_security_policy_impl.cc
+++ content/browser/child_process_security_policy_impl.cc
@@ -2134,6 +2134,16 @@ bool ChildProcessSecurityPolicyImpl::PerformJailAndCitadelChecks(
@@ -2043,6 +2043,16 @@ bool ChildProcessSecurityPolicyImpl::PerformJailAndCitadelChecks(
if (actual_process_lock.matches_scheme(url::kDataScheme)) {
return true;
}
@@ -20,10 +20,10 @@ index d4d1572304587..35fa3abc12213 100644
// Make an exception to allow most visited tiles to commit in third-party
diff --git content/browser/renderer_host/navigation_request.cc content/browser/renderer_host/navigation_request.cc
index 4f76cfa33ea68..1cc33c7bb9e4f 100644
index 6f46f45b41597..d303f579b414c 100644
--- content/browser/renderer_host/navigation_request.cc
+++ content/browser/renderer_host/navigation_request.cc
@@ -8259,10 +8259,22 @@ NavigationRequest::GetOriginForURLLoaderFactoryBeforeResponseWithDebugInfo(
@@ -8245,10 +8245,22 @@ NavigationRequest::GetOriginForURLLoaderFactoryBeforeResponseWithDebugInfo(
bool use_opaque_origin =
(sandbox_flags & network::mojom::WebSandboxFlags::kOrigin) ==
network::mojom::WebSandboxFlags::kOrigin;
@@ -47,7 +47,7 @@ index 4f76cfa33ea68..1cc33c7bb9e4f 100644
}
return origin_and_debug_info;
@@ -8370,11 +8382,20 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() {
@@ -8356,11 +8368,20 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() {
DetermineInitiatorRelationship(initiator_rfh,
frame_tree_node_->current_frame_host()));

View File

@@ -1,5 +1,5 @@
diff --git build/config/compiler/BUILD.gn build/config/compiler/BUILD.gn
index f58320b88f207..261181781fc72 100644
index f1627512b3212..b9bdd63daae7d 100644
--- build/config/compiler/BUILD.gn
+++ build/config/compiler/BUILD.gn
@@ -133,6 +133,9 @@ declare_args() {
@@ -12,15 +12,13 @@ index f58320b88f207..261181781fc72 100644
# Initialize all local variables with a pattern. This flag will fill
# uninitialized floating-point types (and 32-bit pointers) with 0xFF and the
# rest with 0xAA. This makes behavior of uninitialized memory bugs consistent,
@@ -2306,6 +2309,7 @@ config("export_dynamic") {
# 2. Remove the thin_archive config, so that the .a file actually contains all
# .o files, instead of just references to .o files in the build directoy
@@ -2268,11 +2271,13 @@ config("export_dynamic") {
config("thin_archive") {
# The macOS and iOS default linker ld64 does not support reading thin
# archives.
+ if (use_thin_archives) {
if ((is_apple && use_lld) || (is_linux && !is_clang)) {
# The macOS and iOS linker ld64.ldd doesn't support thin archive without
# symbol table, gcc on linux also throws the error `archive has no index`.
@@ -2323,6 +2327,7 @@ config("thin_archive") {
if ((is_posix && !is_nacl && (!is_apple || use_lld)) || is_fuchsia) {
arflags = [ "-T" ]
} else if (is_win && use_lld) {
arflags = [ "/llvmlibthin" ]
}

View File

@@ -1,5 +1,5 @@
diff --git chrome/browser/BUILD.gn chrome/browser/BUILD.gn
index c2c22a92bccb2..c9af15f453f34 100644
index 8aa3f2bd53970..17eace191e566 100644
--- chrome/browser/BUILD.gn
+++ chrome/browser/BUILD.gn
@@ -12,6 +12,7 @@ import("//build/config/compiler/pgo/pgo.gni")
@@ -10,7 +10,7 @@ index c2c22a92bccb2..c9af15f453f34 100644
import("//chrome/browser/buildflags.gni")
import("//chrome/browser/downgrade/buildflags.gni")
import("//chrome/browser/request_header_integrity/buildflags.gni")
@@ -1835,6 +1836,7 @@ static_library("browser") {
@@ -1852,6 +1853,7 @@ static_library("browser") {
"//build/config/chromebox_for_meetings:buildflags",
"//build/config/compiler:compiler_buildflags",
"//cc",
@@ -18,8 +18,8 @@ index c2c22a92bccb2..c9af15f453f34 100644
"//chrome:extra_resources",
"//chrome:resources",
"//chrome:strings",
@@ -2507,6 +2509,10 @@ static_library("browser") {
sources += [ "net/net_error_diagnostics_dialog_stub.cc" ]
@@ -2525,6 +2527,10 @@ static_library("browser") {
]
}
+ if (enable_cef) {

View File

@@ -0,0 +1,73 @@
diff --git chrome/browser/browser_process.h chrome/browser/browser_process.h
index b7abca02f48f8..b595e9daa40eb 100644
--- chrome/browser/browser_process.h
+++ chrome/browser/browser_process.h
@@ -221,9 +221,9 @@ class BrowserProcess {
virtual DownloadStatusUpdater* download_status_updater() = 0;
virtual DownloadRequestLimiter* download_request_limiter() = 0;
+#if BUILDFLAG(ENABLE_BACKGROUND_MODE)
// Returns the object that manages background applications.
virtual BackgroundModeManager* background_mode_manager() = 0;
-#if BUILDFLAG(ENABLE_BACKGROUND_MODE)
virtual void set_background_mode_manager_for_test(
std::unique_ptr<BackgroundModeManager> manager) = 0;
#endif
diff --git chrome/browser/browser_process_impl.cc chrome/browser/browser_process_impl.cc
index 1c3e30115e006..c9b25fce563e6 100644
--- chrome/browser/browser_process_impl.cc
+++ chrome/browser/browser_process_impl.cc
@@ -1142,18 +1142,14 @@ DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() {
return download_request_limiter_.get();
}
-BackgroundModeManager* BrowserProcessImpl::background_mode_manager() {
#if BUILDFLAG(ENABLE_BACKGROUND_MODE)
+BackgroundModeManager* BrowserProcessImpl::background_mode_manager() {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
if (!background_mode_manager_)
CreateBackgroundModeManager();
return background_mode_manager_.get();
-#else
- return nullptr;
-#endif
}
-#if BUILDFLAG(ENABLE_BACKGROUND_MODE)
void BrowserProcessImpl::set_background_mode_manager_for_test(
std::unique_ptr<BackgroundModeManager> manager) {
background_mode_manager_ = std::move(manager);
diff --git chrome/browser/browser_process_impl.h chrome/browser/browser_process_impl.h
index 9b6380d7fe36c..839558f24a06e 100644
--- chrome/browser/browser_process_impl.h
+++ chrome/browser/browser_process_impl.h
@@ -193,8 +193,8 @@ class BrowserProcessImpl : public BrowserProcess,
void SetApplicationLocale(const std::string& actual_locale) override;
DownloadStatusUpdater* download_status_updater() override;
DownloadRequestLimiter* download_request_limiter() override;
- BackgroundModeManager* background_mode_manager() override;
#if BUILDFLAG(ENABLE_BACKGROUND_MODE)
+ BackgroundModeManager* background_mode_manager() override;
void set_background_mode_manager_for_test(
std::unique_ptr<BackgroundModeManager> manager) override;
#endif
diff --git chrome/browser/lifetime/browser_close_manager.cc chrome/browser/lifetime/browser_close_manager.cc
index 173f85fa144a1..43b8f2e2a18db 100644
--- chrome/browser/lifetime/browser_close_manager.cc
+++ chrome/browser/lifetime/browser_close_manager.cc
@@ -158,6 +158,7 @@ void BrowserCloseManager::CloseBrowsers() {
// exit can restore all browsers open before exiting.
ProfileManager::ShutdownSessionServices();
#endif
+#if BUILDFLAG(ENABLE_BACKGROUND_MODE)
if (!browser_shutdown::IsTryingToQuit()) {
BackgroundModeManager* background_mode_manager =
g_browser_process->background_mode_manager();
@@ -165,6 +166,7 @@ void BrowserCloseManager::CloseBrowsers() {
background_mode_manager->SuspendBackgroundMode();
}
}
+#endif
// Make a copy of the BrowserList to simplify the case where we need to
// destroy a Browser during the loop.

View File

@@ -13,7 +13,7 @@ index 2480282a19d12..dbd1fbf8a15b5 100644
return false;
}
diff --git chrome/browser/devtools/devtools_window.cc chrome/browser/devtools/devtools_window.cc
index faead4388ac00..ce1cc050c94b0 100644
index 787a485764b9c..2da2fd82787a0 100644
--- chrome/browser/devtools/devtools_window.cc
+++ chrome/browser/devtools/devtools_window.cc
@@ -38,6 +38,7 @@
@@ -38,7 +38,7 @@ index faead4388ac00..ce1cc050c94b0 100644
}
// Create WebContents with devtools.
@@ -1689,9 +1697,13 @@ void DevToolsWindow::OpenInNewTab(const GURL& url) {
@@ -1691,9 +1699,13 @@ void DevToolsWindow::OpenInNewTab(const GURL& url) {
if (!inspected_web_contents ||
!inspected_web_contents->OpenURL(params,
/*navigation_handle_callback=*/{})) {
@@ -52,7 +52,7 @@ index faead4388ac00..ce1cc050c94b0 100644
}
}
@@ -1854,12 +1866,28 @@ void DevToolsWindow::CreateDevToolsBrowser() {
@@ -1856,12 +1868,28 @@ void DevToolsWindow::CreateDevToolsBrowser() {
Browser::CreationStatus::kOk) {
return;
}
@@ -88,7 +88,7 @@ index faead4388ac00..ce1cc050c94b0 100644
}
diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn
index df9b0eed07761..a984511be272a 100644
index 4c9e41d73cedd..eed762cd05bf9 100644
--- chrome/browser/ui/BUILD.gn
+++ chrome/browser/ui/BUILD.gn
@@ -8,6 +8,7 @@ import("//build/config/compiler/compiler.gni")
@@ -99,7 +99,7 @@ index df9b0eed07761..a984511be272a 100644
import("//chrome/browser/buildflags.gni")
import("//chrome/common/features.gni")
import("//chromeos/ash/components/assistant/assistant.gni")
@@ -297,6 +298,10 @@ static_library("ui") {
@@ -311,6 +312,10 @@ static_library("ui") {
"//build/config/compiler:wexit_time_destructors",
]
@@ -110,7 +110,7 @@ index df9b0eed07761..a984511be272a 100644
public_deps = [
# WARNING WARNING WARNING
# New dependencies outside of //chrome/browser should be added to
@@ -323,6 +328,7 @@ static_library("ui") {
@@ -337,6 +342,7 @@ static_library("ui") {
"//build:chromeos_buildflags",
"//build/config/chromebox_for_meetings:buildflags",
"//cc/paint",
@@ -118,7 +118,7 @@ index df9b0eed07761..a984511be272a 100644
"//chrome:resources",
"//chrome:strings",
"//chrome/app:chrome_dll_resources",
@@ -688,6 +694,10 @@ static_library("ui") {
@@ -694,6 +700,10 @@ static_library("ui") {
deps += [ "//components/plus_addresses/resources:vector_icons" ]
}
@@ -129,7 +129,7 @@ index df9b0eed07761..a984511be272a 100644
# TODO(crbug.com/41437292): Remove this circular dependency.
# Any circular includes must depend on the target "//chrome/browser:browser_public_dependencies".
# These are all-platform circular includes.
@@ -5479,6 +5489,7 @@ static_library("ui") {
@@ -5512,6 +5522,7 @@ static_library("ui") {
if (enable_printing) {
deps += [
"//components/printing/browser",
@@ -138,10 +138,10 @@ index df9b0eed07761..a984511be272a 100644
]
}
diff --git chrome/browser/ui/browser.cc chrome/browser/ui/browser.cc
index f313979ca1b0a..c1f63c4a1cda5 100644
index 3ea7f6115a0e5..df9e31681ec7c 100644
--- chrome/browser/ui/browser.cc
+++ chrome/browser/ui/browser.cc
@@ -270,6 +270,25 @@
@@ -272,6 +272,25 @@
#include "components/captive_portal/content/captive_portal_tab_helper.h"
#endif
@@ -167,7 +167,7 @@ index f313979ca1b0a..c1f63c4a1cda5 100644
#if BUILDFLAG(ENABLE_EXTENSIONS)
#include "chrome/browser/extensions/extension_browser_window_helper.h"
#endif
@@ -559,6 +578,10 @@ Browser::Browser(const CreateParams& params)
@@ -535,6 +554,10 @@ Browser::Browser(const CreateParams& params)
type_(params.type),
profile_(params.profile),
window_(nullptr),
@@ -178,7 +178,7 @@ index f313979ca1b0a..c1f63c4a1cda5 100644
tab_strip_model_delegate_(
std::make_unique<chrome::BrowserTabStripModelDelegate>(this)),
tab_strip_model_(std::make_unique<TabStripModel>(
@@ -789,6 +812,12 @@ Browser::~Browser() {
@@ -765,6 +788,12 @@ Browser::~Browser() {
// away so they don't try and call back to us.
if (select_file_dialog_.get())
select_file_dialog_->ListenerDestroyed();
@@ -191,7 +191,7 @@ index f313979ca1b0a..c1f63c4a1cda5 100644
}
///////////////////////////////////////////////////////////////////////////////
@@ -1375,6 +1404,8 @@ void Browser::WindowFullscreenStateChanged() {
@@ -1316,6 +1345,8 @@ void Browser::WindowFullscreenStateChanged() {
->WindowFullscreenStateChanged();
command_controller_->FullscreenStateChanged();
UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TOGGLE_FULLSCREEN);
@@ -200,7 +200,7 @@ index f313979ca1b0a..c1f63c4a1cda5 100644
}
void Browser::FullscreenTopUIStateChanged() {
@@ -1694,6 +1725,14 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent(
@@ -1635,6 +1666,14 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent(
if (exclusive_access_manager_->HandleUserKeyEvent(event))
return content::KeyboardEventProcessingResult::HANDLED;
@@ -215,7 +215,7 @@ index f313979ca1b0a..c1f63c4a1cda5 100644
return window()->PreHandleKeyboardEvent(event);
}
@@ -1701,8 +1740,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source,
@@ -1642,8 +1681,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source,
const NativeWebKeyboardEvent& event) {
DevToolsWindow* devtools_window =
DevToolsWindow::GetInstanceForInspectedWebContents(source);
@@ -236,7 +236,7 @@ index f313979ca1b0a..c1f63c4a1cda5 100644
}
bool Browser::TabsNeedBeforeUnloadFired() const {
@@ -1795,9 +1844,14 @@ bool Browser::IsBackForwardCacheSupported(content::WebContents& web_contents) {
@@ -1736,9 +1785,14 @@ bool Browser::IsBackForwardCacheSupported(content::WebContents& web_contents) {
content::PreloadingEligibility Browser::IsPrerender2Supported(
content::WebContents& web_contents) {
@@ -251,7 +251,7 @@ index f313979ca1b0a..c1f63c4a1cda5 100644
}
bool Browser::ShouldShowStaleContentOnEviction(content::WebContents* source) {
@@ -1857,6 +1911,14 @@ WebContents* Browser::OpenURLFromTab(
@@ -1798,6 +1852,14 @@ WebContents* Browser::OpenURLFromTab(
std::move(navigation_handle_callback));
}
@@ -266,7 +266,7 @@ index f313979ca1b0a..c1f63c4a1cda5 100644
NavigateParams nav_params(this, params.url, params.transition);
nav_params.FillNavigateParamsFromOpenURLParams(params);
nav_params.source_contents = source;
@@ -2023,6 +2085,8 @@ void Browser::LoadingStateChanged(WebContents* source,
@@ -1964,6 +2026,8 @@ void Browser::LoadingStateChanged(WebContents* source,
bool should_show_loading_ui) {
ScheduleUIUpdate(source, content::INVALIDATE_TYPE_LOAD);
UpdateWindowForLoadingStateChanged(source, should_show_loading_ui);
@@ -275,7 +275,7 @@ index f313979ca1b0a..c1f63c4a1cda5 100644
}
void Browser::CloseContents(WebContents* source) {
@@ -2051,6 +2115,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) {
@@ -1992,6 +2056,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) {
}
void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
@@ -284,7 +284,7 @@ index f313979ca1b0a..c1f63c4a1cda5 100644
if (!GetStatusBubble())
return;
@@ -2058,6 +2124,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
@@ -1999,6 +2065,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
GetStatusBubble()->SetURL(url);
}
@@ -302,7 +302,7 @@ index f313979ca1b0a..c1f63c4a1cda5 100644
void Browser::ContentsMouseEvent(WebContents* source, const ui::Event& event) {
const ui::EventType type = event.type();
const bool exited = type == ui::EventType::kMouseExited;
@@ -2086,6 +2163,19 @@ bool Browser::TakeFocus(content::WebContents* source, bool reverse) {
@@ -2027,6 +2104,19 @@ bool Browser::TakeFocus(content::WebContents* source, bool reverse) {
return false;
}
@@ -322,7 +322,7 @@ index f313979ca1b0a..c1f63c4a1cda5 100644
void Browser::BeforeUnloadFired(WebContents* web_contents,
bool proceed,
bool* proceed_to_fire_unload) {
@@ -2185,12 +2275,24 @@ void Browser::WebContentsCreated(WebContents* source_contents,
@@ -2126,12 +2216,24 @@ void Browser::WebContentsCreated(WebContents* source_contents,
// Make the tab show up in the task manager.
task_manager::WebContentsTags::CreateForTabContents(new_contents);
@@ -347,7 +347,7 @@ index f313979ca1b0a..c1f63c4a1cda5 100644
// Don't show the page hung dialog when a HTML popup hangs because
// the dialog will take the focus and immediately close the popup.
RenderWidgetHostView* view = render_widget_host->GetView();
@@ -2203,6 +2305,13 @@ void Browser::RendererUnresponsive(
@@ -2144,6 +2246,13 @@ void Browser::RendererUnresponsive(
void Browser::RendererResponsive(
WebContents* source,
content::RenderWidgetHost* render_widget_host) {
@@ -361,7 +361,7 @@ index f313979ca1b0a..c1f63c4a1cda5 100644
RenderWidgetHostView* view = render_widget_host->GetView();
if (view && !render_widget_host->GetView()->IsHTMLFormPopup()) {
TabDialogs::FromWebContents(source)->HideHungRendererDialog(
@@ -2212,6 +2321,15 @@ void Browser::RendererResponsive(
@@ -2153,6 +2262,15 @@ void Browser::RendererResponsive(
content::JavaScriptDialogManager* Browser::GetJavaScriptDialogManager(
WebContents* source) {
@@ -377,7 +377,7 @@ index f313979ca1b0a..c1f63c4a1cda5 100644
return javascript_dialogs::TabModalDialogManager::FromWebContents(source);
}
@@ -2247,6 +2365,11 @@ void Browser::DraggableRegionsChanged(
@@ -2188,6 +2306,11 @@ void Browser::DraggableRegionsChanged(
if (app_controller_) {
app_controller_->DraggableRegionsChanged(regions, contents);
}
@@ -389,7 +389,7 @@ index f313979ca1b0a..c1f63c4a1cda5 100644
}
void Browser::DidFinishNavigation(
@@ -2327,11 +2450,15 @@ void Browser::EnterFullscreenModeForTab(
@@ -2268,11 +2391,15 @@ void Browser::EnterFullscreenModeForTab(
const blink::mojom::FullscreenOptions& options) {
exclusive_access_manager_->fullscreen_controller()->EnterFullscreenModeForTab(
requesting_frame, options.display_id);
@@ -405,7 +405,7 @@ index f313979ca1b0a..c1f63c4a1cda5 100644
}
bool Browser::IsFullscreenForTabOrPending(const WebContents* web_contents) {
@@ -2534,6 +2661,15 @@ void Browser::RequestMediaAccessPermission(
@@ -2475,6 +2602,15 @@ void Browser::RequestMediaAccessPermission(
content::WebContents* web_contents,
const content::MediaStreamRequest& request,
content::MediaResponseCallback callback) {
@@ -421,7 +421,7 @@ index f313979ca1b0a..c1f63c4a1cda5 100644
const extensions::Extension* extension =
GetExtensionForOrigin(profile_, request.security_origin);
MediaCaptureDevicesDispatcher::GetInstance()->ProcessMediaAccessRequest(
@@ -3086,9 +3222,10 @@ void Browser::RemoveScheduledUpdatesFor(WebContents* contents) {
@@ -3035,9 +3171,10 @@ void Browser::RemoveScheduledUpdatesFor(WebContents* contents) {
// Browser, Getters for UI (private):
StatusBubble* Browser::GetStatusBubble() {
@@ -433,7 +433,7 @@ index f313979ca1b0a..c1f63c4a1cda5 100644
}
// We hide the status bar for web apps windows as this matches native
@@ -3096,6 +3233,12 @@ StatusBubble* Browser::GetStatusBubble() {
@@ -3045,6 +3182,12 @@ StatusBubble* Browser::GetStatusBubble() {
// mode, as the minimal browser UI includes the status bar.
if (web_app::AppBrowserController::IsWebApp(this) &&
!app_controller()->HasMinimalUiButtons()) {
@@ -446,7 +446,7 @@ index f313979ca1b0a..c1f63c4a1cda5 100644
return nullptr;
}
@@ -3241,6 +3384,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) {
@@ -3194,6 +3337,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) {
BookmarkTabHelper::FromWebContents(web_contents)->RemoveObserver(this);
web_contents_collection_.StopObserving(web_contents);
}
@@ -455,7 +455,7 @@ index f313979ca1b0a..c1f63c4a1cda5 100644
}
void Browser::TabDetachedAtImpl(content::WebContents* contents,
@@ -3398,6 +3543,14 @@ bool Browser::PictureInPictureBrowserSupportsWindowFeature(
@@ -3348,6 +3493,14 @@ bool Browser::PictureInPictureBrowserSupportsWindowFeature(
bool Browser::SupportsWindowFeatureImpl(WindowFeature feature,
bool check_can_support) const {
@@ -471,11 +471,11 @@ index f313979ca1b0a..c1f63c4a1cda5 100644
case TYPE_NORMAL:
return NormalBrowserSupportsWindowFeature(feature, check_can_support);
diff --git chrome/browser/ui/browser.h chrome/browser/ui/browser.h
index 8057f6fcc87c4..14bf2073b170b 100644
index ff7d70e948c27..f3822e34df4b7 100644
--- chrome/browser/ui/browser.h
+++ chrome/browser/ui/browser.h
@@ -25,6 +25,7 @@
#include "base/types/expected.h"
@@ -24,6 +24,7 @@
#include "base/timer/elapsed_timer.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
+#include "cef/libcef/features/features.h"
@@ -493,7 +493,7 @@ index 8057f6fcc87c4..14bf2073b170b 100644
#if BUILDFLAG(IS_ANDROID)
#error This file should only be included on desktop.
#endif
@@ -339,6 +344,15 @@ class Browser : public TabStripModelObserver,
@@ -340,6 +345,15 @@ class Browser : public TabStripModelObserver,
// Document Picture in Picture options, specific to TYPE_PICTURE_IN_PICTURE.
std::optional<blink::mojom::PictureInPictureWindowOptions> pip_options;
@@ -509,7 +509,7 @@ index 8057f6fcc87c4..14bf2073b170b 100644
private:
friend class Browser;
friend class WindowSizerChromeOSTest;
@@ -422,6 +436,13 @@ class Browser : public TabStripModelObserver,
@@ -423,6 +437,13 @@ class Browser : public TabStripModelObserver,
update_ui_immediately_for_testing_ = true;
}
@@ -523,7 +523,7 @@ index 8057f6fcc87c4..14bf2073b170b 100644
// Accessors ////////////////////////////////////////////////////////////////
const CreateParams& create_params() const { return create_params_; }
@@ -523,6 +544,12 @@ class Browser : public TabStripModelObserver,
@@ -524,6 +545,12 @@ class Browser : public TabStripModelObserver,
base::WeakPtr<Browser> AsWeakPtr();
base::WeakPtr<const Browser> AsWeakPtr() const;
@@ -536,7 +536,7 @@ index 8057f6fcc87c4..14bf2073b170b 100644
// Get the FindBarController for this browser, creating it if it does not
// yet exist.
FindBarController* GetFindBarController();
@@ -961,10 +988,18 @@ class Browser : public TabStripModelObserver,
@@ -958,10 +985,18 @@ class Browser : public TabStripModelObserver,
void SetContentsBounds(content::WebContents* source,
const gfx::Rect& bounds) override;
void UpdateTargetURL(content::WebContents* source, const GURL& url) override;
@@ -555,7 +555,7 @@ index 8057f6fcc87c4..14bf2073b170b 100644
void BeforeUnloadFired(content::WebContents* source,
bool proceed,
bool* proceed_to_fire_unload) override;
@@ -1303,6 +1338,10 @@ class Browser : public TabStripModelObserver,
@@ -1298,6 +1333,10 @@ class Browser : public TabStripModelObserver,
// This Browser's window.
raw_ptr<BrowserWindow, DanglingUntriaged> window_;
@@ -566,7 +566,7 @@ index 8057f6fcc87c4..14bf2073b170b 100644
std::unique_ptr<TabStripModelDelegate> const tab_strip_model_delegate_;
std::unique_ptr<TabStripModel> const tab_strip_model_;
@@ -1369,6 +1408,8 @@ class Browser : public TabStripModelObserver,
@@ -1364,6 +1403,8 @@ class Browser : public TabStripModelObserver,
const std::string initial_workspace_;
bool initial_visible_on_all_workspaces_state_;
@@ -576,7 +576,7 @@ index 8057f6fcc87c4..14bf2073b170b 100644
UnloadController unload_controller_;
diff --git chrome/browser/ui/browser_navigator.cc chrome/browser/ui/browser_navigator.cc
index 61a46e74464e0..d5978661b222e 100644
index f180b15994c6c..f69d72a70d850 100644
--- chrome/browser/ui/browser_navigator.cc
+++ chrome/browser/ui/browser_navigator.cc
@@ -271,6 +271,10 @@ std::tuple<Browser*, int> GetBrowserAndTabForDisposition(
@@ -590,7 +590,7 @@ index 61a46e74464e0..d5978661b222e 100644
const BrowserWindow* const browser_window = params.browser->window();
const gfx::NativeWindow native_window =
browser_window ? browser_window->GetNativeWindow()
@@ -561,6 +565,13 @@ std::unique_ptr<content::WebContents> CreateTargetContents(
@@ -559,6 +563,13 @@ std::unique_ptr<content::WebContents> CreateTargetContents(
std::unique_ptr<WebContents> target_contents =
WebContents::Create(create_params);
@@ -605,7 +605,7 @@ index 61a46e74464e0..d5978661b222e 100644
// tab helpers, so the entire set of tab helpers needs to be set up
// immediately.
diff --git chrome/browser/ui/browser_tabstrip.cc chrome/browser/ui/browser_tabstrip.cc
index 1f84235515463..82942fb06b5f3 100644
index e4b6094c5197e..4d2d12ae5725e 100644
--- chrome/browser/ui/browser_tabstrip.cc
+++ chrome/browser/ui/browser_tabstrip.cc
@@ -33,9 +33,13 @@ content::WebContents* AddAndReturnTabAt(
@@ -623,7 +623,7 @@ index 1f84235515463..82942fb06b5f3 100644
params.disposition = foreground ? WindowOpenDisposition::NEW_FOREGROUND_TAB
: WindowOpenDisposition::NEW_BACKGROUND_TAB;
params.tabstrip_index = idx;
@@ -84,6 +88,16 @@ content::WebContents* AddWebContents(
@@ -82,6 +86,16 @@ content::WebContents* AddWebContents(
// Can't create a new contents for the current tab - invalid case.
DCHECK(disposition != WindowOpenDisposition::CURRENT_TAB);

View File

@@ -1,8 +1,8 @@
diff --git chrome/browser/renderer_context_menu/render_view_context_menu.cc chrome/browser/renderer_context_menu/render_view_context_menu.cc
index 3a897a52f50ca..4b8cc9027c6af 100644
index eda9a7b2662b1..4142e4bff7c03 100644
--- chrome/browser/renderer_context_menu/render_view_context_menu.cc
+++ chrome/browser/renderer_context_menu/render_view_context_menu.cc
@@ -360,6 +360,18 @@ base::OnceCallback<void(RenderViewContextMenu*)>* GetMenuShownCallback() {
@@ -361,6 +361,18 @@ base::OnceCallback<void(RenderViewContextMenu*)>* GetMenuShownCallback() {
return callback.get();
}
@@ -88,7 +88,7 @@ index 3a897a52f50ca..4b8cc9027c6af 100644
RenderViewContextMenu::GetHandlersForLinkUrl() {
custom_handlers::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 b9ab5b1295599..7ad5bcb00ff8b 100644
index 0bb9353cb7da0..04e430b33665e 100644
--- chrome/browser/renderer_context_menu/render_view_context_menu.h
+++ chrome/browser/renderer_context_menu/render_view_context_menu.h
@@ -153,7 +153,21 @@ class RenderViewContextMenu
@@ -113,7 +113,7 @@ index b9ab5b1295599..7ad5bcb00ff8b 100644
Profile* GetProfile() const;
// This may return nullptr (e.g. for WebUI dialogs). Virtual to allow tests to
@@ -475,6 +489,9 @@ class RenderViewContextMenu
@@ -476,6 +490,9 @@ class RenderViewContextMenu
// built.
bool is_protocol_submenu_valid_ = false;
@@ -136,7 +136,7 @@ index cb51224f9892c..b5a3946999d8f 100644
private:
// RenderViewContextMenuViewsMac:
diff --git chrome/browser/ui/cocoa/renderer_context_menu/render_view_context_menu_mac_cocoa.mm chrome/browser/ui/cocoa/renderer_context_menu/render_view_context_menu_mac_cocoa.mm
index 9070be4403de1..a449c46246acd 100644
index b130e9768c2d6..3e46b2fe18d0a 100644
--- chrome/browser/ui/cocoa/renderer_context_menu/render_view_context_menu_mac_cocoa.mm
+++ chrome/browser/ui/cocoa/renderer_context_menu/render_view_context_menu_mac_cocoa.mm
@@ -68,6 +68,10 @@ RenderViewContextMenuMacCocoa::~RenderViewContextMenuMacCocoa() {
@@ -189,10 +189,10 @@ index 9f6c5fd44f206..dc50bc909897f 100644
runner_->Cancel();
}
diff --git chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc
index a269d358300b8..bf31a3cecdee7 100644
index 5e34ee23fa791..36be094844276 100644
--- chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc
+++ chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc
@@ -150,6 +150,9 @@ void RenderViewContextMenuViews::RunMenuAt(views::Widget* parent,
@@ -149,6 +149,9 @@ void RenderViewContextMenuViews::RunMenuAt(views::Widget* parent,
bool RenderViewContextMenuViews::GetAcceleratorForCommandId(
int command_id,
ui::Accelerator* accel) const {
@@ -202,7 +202,7 @@ index a269d358300b8..bf31a3cecdee7 100644
// There are no formally defined accelerators we can query so we assume
// that Ctrl+C, Ctrl+V, Ctrl+X, Ctrl-A, etc do what they normally do.
switch (command_id) {
@@ -386,6 +389,10 @@ void RenderViewContextMenuViews::AppendPlatformEditableItems() {
@@ -385,6 +388,10 @@ void RenderViewContextMenuViews::AppendPlatformEditableItems() {
}
void RenderViewContextMenuViews::Show() {
@@ -213,7 +213,7 @@ index a269d358300b8..bf31a3cecdee7 100644
if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kKioskMode))
return;
@@ -428,6 +435,11 @@ void RenderViewContextMenuViews::Show() {
@@ -427,6 +434,11 @@ void RenderViewContextMenuViews::Show() {
}
}
@@ -226,7 +226,7 @@ index a269d358300b8..bf31a3cecdee7 100644
return views::Widget::GetTopLevelWidgetForNativeView(GetActiveNativeView());
}
diff --git chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.h chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.h
index 8433cdc9c88b7..aea62cda5cd22 100644
index 55ba34c417e4a..e92f668868e74 100644
--- chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.h
+++ chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.h
@@ -45,6 +45,7 @@ class RenderViewContextMenuViews : public RenderViewContextMenu {
@@ -305,10 +305,10 @@ index 042428f77f4ad..e4efd98ca45d5 100644
raw_ptr<content::WebContents> web_contents_ = nullptr;
};
diff --git components/renderer_context_menu/render_view_context_menu_base.cc components/renderer_context_menu/render_view_context_menu_base.cc
index edf3c0f19409e..3a194411201fe 100644
index 01a7fe089662d..5b67b639e3f09 100644
--- components/renderer_context_menu/render_view_context_menu_base.cc
+++ components/renderer_context_menu/render_view_context_menu_base.cc
@@ -392,6 +392,17 @@ bool RenderViewContextMenuBase::IsCommandIdChecked(int id) const {
@@ -380,6 +380,17 @@ bool RenderViewContextMenuBase::IsCommandIdChecked(int id) const {
return false;
}
@@ -327,7 +327,7 @@ index edf3c0f19409e..3a194411201fe 100644
command_executed_ = true;
RecordUsedItem(id);
diff --git components/renderer_context_menu/render_view_context_menu_base.h components/renderer_context_menu/render_view_context_menu_base.h
index cd028ee83b6e8..c5d382eb8a2ce 100644
index b607544ab0a48..a389e96cf5182 100644
--- components/renderer_context_menu/render_view_context_menu_base.h
+++ components/renderer_context_menu/render_view_context_menu_base.h
@@ -85,8 +85,13 @@ class RenderViewContextMenuBase : public ui::SimpleMenuModel::Delegate,
@@ -392,10 +392,10 @@ index 05efbd822ab0a..f3dff27cdfd19 100644
// only called when the observer returns true for IsCommandIdSupported()
// for that |command_id|.
diff --git components/renderer_context_menu/views/toolkit_delegate_views.cc components/renderer_context_menu/views/toolkit_delegate_views.cc
index 0be2640c8173c..8bfdc6185690f 100644
index 823f044316527..85439bf7ad2eb 100644
--- components/renderer_context_menu/views/toolkit_delegate_views.cc
+++ components/renderer_context_menu/views/toolkit_delegate_views.cc
@@ -31,6 +31,10 @@ void ToolkitDelegateViews::RunMenuAt(views::Widget* parent,
@@ -30,6 +30,10 @@ void ToolkitDelegateViews::RunMenuAt(views::Widget* parent,
anchor_position, type);
}
@@ -407,12 +407,12 @@ index 0be2640c8173c..8bfdc6185690f 100644
menu_adapter_ = std::make_unique<views::MenuModelAdapter>(menu_model);
std::unique_ptr<views::MenuItemView> menu_view = menu_adapter_->CreateMenu();
diff --git components/renderer_context_menu/views/toolkit_delegate_views.h components/renderer_context_menu/views/toolkit_delegate_views.h
index 7762b3e6673d9..5bd1544aaaa62 100644
index eacdc12813204..9084effdaa121 100644
--- components/renderer_context_menu/views/toolkit_delegate_views.h
+++ components/renderer_context_menu/views/toolkit_delegate_views.h
@@ -39,6 +39,7 @@ class ToolkitDelegateViews : public RenderViewContextMenuBase::ToolkitDelegate {
const gfx::Point& point,
ui::mojom::MenuSourceType type);
ui::MenuSourceType type);
views::MenuItemView* menu_view() { return menu_view_; }
+ bool IsMenuRunning() const;

View File

@@ -1,5 +1,5 @@
diff --git chrome/browser/devtools/chrome_devtools_manager_delegate.cc chrome/browser/devtools/chrome_devtools_manager_delegate.cc
index 8c8d53b351c2f..c1fa3cd901335 100644
index e84932c53009d..0e64ca8105f82 100644
--- chrome/browser/devtools/chrome_devtools_manager_delegate.cc
+++ chrome/browser/devtools/chrome_devtools_manager_delegate.cc
@@ -15,6 +15,7 @@
@@ -21,7 +21,7 @@ index 8c8d53b351c2f..c1fa3cd901335 100644
using content::DevToolsAgentHost;
const char ChromeDevToolsManagerDelegate::kTypeApp[] = "app";
@@ -283,6 +288,12 @@ std::string ChromeDevToolsManagerDelegate::GetTargetType(
@@ -285,6 +290,12 @@ std::string ChromeDevToolsManagerDelegate::GetTargetType(
return DevToolsAgentHost::kTypePage;
}

View File

@@ -1,21 +1,22 @@
diff --git chrome/browser/file_select_helper.cc chrome/browser/file_select_helper.cc
index 5d563a5311ec1..7c8c70393ed4b 100644
index 50fca3503b2a9..89a58b139af4a 100644
--- chrome/browser/file_select_helper.cc
+++ chrome/browser/file_select_helper.cc
@@ -313,6 +313,12 @@ void FileSelectHelper::OnListDone(int error) {
}
if (dialog_type_ == ui::SelectFileDialog::SELECT_UPLOAD_FOLDER) {
+ if (run_from_cef_) {
+ // Don't show the upload confirmation dialog when triggered via CEF
+ // (initially or recursively).
+ PerformContentAnalysisIfNeeded(std::move(chooser_files));
+ return;
+ }
auto model = CreateConfirmationDialog(
entry->display_name_, std::move(chooser_files),
base::BindOnce(&FileSelectHelper::PerformContentAnalysisIfNeeded,
@@ -511,31 +517,51 @@ FileSelectHelper::GetFileTypesFromAcceptType(
@@ -239,6 +239,13 @@ void FileSelectHelper::OnListFile(
void FileSelectHelper::LaunchConfirmationDialog(
const base::FilePath& path,
std::vector<ui::SelectedFileInfo> selected_files) {
+ if (run_from_cef_) {
+ // Don't show the upload confirmation dialog when triggered via CEF
+ // (initially or recursively).
+ ConvertToFileChooserFileInfoList(selected_files);
+ return;
+ }
+
ShowFolderUploadConfirmationDialog(
path,
base::BindOnce(&FileSelectHelper::ConvertToFileChooserFileInfoList, this),
@@ -466,31 +473,51 @@ FileSelectHelper::GetFileTypesFromAcceptType(
std::vector<base::FilePath::StringType>* extensions =
&file_type->extensions.back();
@@ -71,7 +72,7 @@ index 5d563a5311ec1..7c8c70393ed4b 100644
if (extensions->size() > old_extension_size)
valid_type_count++;
}
@@ -552,12 +578,28 @@ FileSelectHelper::GetFileTypesFromAcceptType(
@@ -507,12 +534,28 @@ FileSelectHelper::GetFileTypesFromAcceptType(
// dialog uses the first extension in the list to form the description,
// like "EHTML Files". This is not what we want.
if (valid_type_count > 1 ||
@@ -104,7 +105,7 @@ index 5d563a5311ec1..7c8c70393ed4b 100644
}
return file_type;
@@ -567,7 +609,8 @@ FileSelectHelper::GetFileTypesFromAcceptType(
@@ -522,7 +565,8 @@ FileSelectHelper::GetFileTypesFromAcceptType(
void FileSelectHelper::RunFileChooser(
content::RenderFrameHost* render_frame_host,
scoped_refptr<content::FileSelectListener> listener,
@@ -114,7 +115,7 @@ index 5d563a5311ec1..7c8c70393ed4b 100644
Profile* profile = Profile::FromBrowserContext(
render_frame_host->GetProcess()->GetBrowserContext());
@@ -575,6 +618,7 @@ void FileSelectHelper::RunFileChooser(
@@ -530,6 +574,7 @@ void FileSelectHelper::RunFileChooser(
// message.
scoped_refptr<FileSelectHelper> file_select_helper(
new FileSelectHelper(profile));
@@ -123,10 +124,10 @@ index 5d563a5311ec1..7c8c70393ed4b 100644
params.Clone());
}
diff --git chrome/browser/file_select_helper.h chrome/browser/file_select_helper.h
index 921b36076c3f3..d61248be1997b 100644
index 138889a07790b..73d480d4f2525 100644
--- chrome/browser/file_select_helper.h
+++ chrome/browser/file_select_helper.h
@@ -64,7 +64,8 @@ class FileSelectHelper : public base::RefCountedThreadSafe<
@@ -63,7 +63,8 @@ class FileSelectHelper : public base::RefCountedThreadSafe<
static void RunFileChooser(
content::RenderFrameHost* render_frame_host,
scoped_refptr<content::FileSelectListener> listener,
@@ -136,7 +137,7 @@ index 921b36076c3f3..d61248be1997b 100644
// Enumerates all the files in directory.
static void EnumerateDirectory(
@@ -336,6 +337,9 @@ class FileSelectHelper : public base::RefCountedThreadSafe<
@@ -330,6 +331,9 @@ class FileSelectHelper : public base::RefCountedThreadSafe<
scoped_disallow_picture_in_picture_;
#endif // !BUILDFLAG(IS_ANDROID)
@@ -256,7 +257,7 @@ index c7acd9b05fbb8..3e95e4125fa24 100644
} // namespace ui
diff --git ui/shell_dialogs/select_file_dialog_mac.mm ui/shell_dialogs/select_file_dialog_mac.mm
index 416c1bb5503ef..a6705c94c0dc2 100644
index 72f687be6fb42..4fa78758dd4df 100644
--- ui/shell_dialogs/select_file_dialog_mac.mm
+++ ui/shell_dialogs/select_file_dialog_mac.mm
@@ -104,6 +104,10 @@ void SelectFileDialogImpl::SelectFileImpl(
@@ -271,7 +272,7 @@ index 416c1bb5503ef..a6705c94c0dc2 100644
std::make_unique<remote_cocoa::SelectFileDialogBridge>(ns_window),
std::move(receiver));
diff --git ui/shell_dialogs/select_file_dialog_win.cc ui/shell_dialogs/select_file_dialog_win.cc
index e3bd03f336edd..afc421d99112f 100644
index ed343dc032789..a7105f4c78a1c 100644
--- ui/shell_dialogs/select_file_dialog_win.cc
+++ ui/shell_dialogs/select_file_dialog_win.cc
@@ -251,6 +251,8 @@ void SelectFileDialogImpl::SelectFileImpl(

View File

@@ -279,7 +279,7 @@ index bc119f10f749e..d81c1ce4e786f 100644
// Web-modal (ui::mojom::ModalType::kChild) dialogs with parents are marked as
// child widgets to prevent top-level window behavior (independent movement,
diff --git ui/views/window/dialog_delegate.h ui/views/window/dialog_delegate.h
index 0777e2fe71f04..546994cad2b14 100644
index d64117586a5c3..c37d7a59c134e 100644
--- ui/views/window/dialog_delegate.h
+++ ui/views/window/dialog_delegate.h
@@ -106,13 +106,18 @@ class VIEWS_EXPORT DialogDelegate : public WidgetDelegate {

View File

@@ -1,5 +1,5 @@
diff --git chrome/browser/download/chrome_download_manager_delegate.cc chrome/browser/download/chrome_download_manager_delegate.cc
index 16f38b6c8d6f9..97f54931c02dd 100644
index 0ca641ab809b7..aeebc9b676486 100644
--- chrome/browser/download/chrome_download_manager_delegate.cc
+++ chrome/browser/download/chrome_download_manager_delegate.cc
@@ -31,6 +31,7 @@
@@ -21,7 +21,7 @@ index 16f38b6c8d6f9..97f54931c02dd 100644
using content::BrowserThread;
using content::DownloadManager;
using download::DownloadItem;
@@ -517,6 +522,11 @@ ChromeDownloadManagerDelegate::ChromeDownloadManagerDelegate(Profile* profile)
@@ -520,6 +525,11 @@ ChromeDownloadManagerDelegate::ChromeDownloadManagerDelegate(Profile* profile)
download_dialog_bridge_ = std::make_unique<DownloadDialogBridge>();
download_message_bridge_ = std::make_unique<DownloadMessageBridge>();
#endif
@@ -33,7 +33,7 @@ index 16f38b6c8d6f9..97f54931c02dd 100644
}
ChromeDownloadManagerDelegate::~ChromeDownloadManagerDelegate() {
@@ -576,6 +586,9 @@ void ChromeDownloadManagerDelegate::Shutdown() {
@@ -579,6 +589,9 @@ void ChromeDownloadManagerDelegate::Shutdown() {
download_manager_->RemoveObserver(this);
download_manager_ = nullptr;
}
@@ -43,7 +43,7 @@ index 16f38b6c8d6f9..97f54931c02dd 100644
}
void ChromeDownloadManagerDelegate::OnDownloadCanceledAtShutdown(
@@ -644,6 +657,12 @@ bool ChromeDownloadManagerDelegate::DetermineDownloadTarget(
@@ -647,6 +660,12 @@ bool ChromeDownloadManagerDelegate::DetermineDownloadTarget(
ReportPDFLoadStatus(PDFLoadStatus::kTriggeredNoGestureDriveByDownload);
}
@@ -56,7 +56,7 @@ index 16f38b6c8d6f9..97f54931c02dd 100644
DownloadTargetDeterminer::CompletionCallback target_determined_callback =
base::BindOnce(&ChromeDownloadManagerDelegate::OnDownloadTargetDetermined,
weak_ptr_factory_.GetWeakPtr(), download->GetId(),
@@ -1120,8 +1139,11 @@ void ChromeDownloadManagerDelegate::OpenDownload(DownloadItem* download) {
@@ -1122,8 +1141,11 @@ void ChromeDownloadManagerDelegate::OpenDownload(DownloadItem* download) {
Browser* browser =
web_contents ? chrome::FindBrowserWithTab(web_contents) : nullptr;
std::unique_ptr<chrome::ScopedTabbedBrowserDisplayer> browser_displayer;

View File

@@ -1,5 +1,5 @@
diff --git chrome/browser/extensions/api/chrome_extensions_api_client.cc chrome/browser/extensions/api/chrome_extensions_api_client.cc
index da9c9d7c0f458..a97fc4e019775 100644
index 66ea000f8c048..02eeb15adceed 100644
--- chrome/browser/extensions/api/chrome_extensions_api_client.cc
+++ chrome/browser/extensions/api/chrome_extensions_api_client.cc
@@ -15,6 +15,7 @@
@@ -34,10 +34,10 @@ index da9c9d7c0f458..a97fc4e019775 100644
WebViewGuestDelegate* ChromeExtensionsAPIClient::CreateWebViewGuestDelegate(
diff --git chrome/browser/extensions/api/tabs/tabs_api.cc chrome/browser/extensions/api/tabs/tabs_api.cc
index 615e06c5e4086..826c4acfa32a7 100644
index bc9187e767fd3..f4e45472f5352 100644
--- chrome/browser/extensions/api/tabs/tabs_api.cc
+++ chrome/browser/extensions/api/tabs/tabs_api.cc
@@ -1652,7 +1652,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
@@ -1603,7 +1603,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
return RespondNow(Error(ExtensionTabUtil::kTabStripNotEditableError));
}
@@ -46,7 +46,7 @@ index 615e06c5e4086..826c4acfa32a7 100644
tab_strip->ActivateTabAt(tab_index);
DCHECK_EQ(contents, tab_strip->GetActiveWebContents());
}
@@ -1666,7 +1666,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
@@ -1617,7 +1617,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
}
bool highlighted = *params->update_properties.highlighted;
@@ -55,7 +55,7 @@ index 615e06c5e4086..826c4acfa32a7 100644
tab_strip->ToggleSelectionAt(tab_index);
}
}
@@ -1678,7 +1678,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
@@ -1629,7 +1629,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
kCannotUpdateMuteCaptured, base::NumberToString(tab_id))));
}
@@ -64,7 +64,7 @@ index 615e06c5e4086..826c4acfa32a7 100644
int opener_id = *params->update_properties.opener_tab_id;
WebContents* opener_contents = nullptr;
if (opener_id == tab_id) {
@@ -1713,7 +1713,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
@@ -1664,7 +1664,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
->SetAutoDiscardable(state);
}
@@ -73,7 +73,7 @@ index 615e06c5e4086..826c4acfa32a7 100644
// Bug fix for crbug.com/1197888. Don't let the extension update the tab if
// the user is dragging tabs.
if (!ExtensionTabUtil::IsTabStripEditable()) {
@@ -1734,7 +1734,8 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
@@ -1685,7 +1685,8 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
// Navigate the tab to a new location if the url is different.
if (params->update_properties.url) {
std::string updated_url = *params->update_properties.url;
@@ -83,7 +83,7 @@ index 615e06c5e4086..826c4acfa32a7 100644
!IsURLAllowedInIncognito(GURL(updated_url))) {
return RespondNow(Error(ErrorUtils::FormatErrorMessage(
tabs_constants::kURLsNotAllowedInIncognitoError, updated_url)));
@@ -1749,7 +1750,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
@@ -1700,7 +1701,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
return RespondNow(Error(std::move(error)));
}
@@ -93,7 +93,7 @@ index 615e06c5e4086..826c4acfa32a7 100644
current_url, updated_url, js_callstack());
}
diff --git chrome/browser/extensions/extension_tab_util.cc chrome/browser/extensions/extension_tab_util.cc
index d5de30544c734..b7a82553471a0 100644
index a896cb1079d97..6681661f788f6 100644
--- chrome/browser/extensions/extension_tab_util.cc
+++ chrome/browser/extensions/extension_tab_util.cc
@@ -20,6 +20,7 @@
@@ -104,7 +104,7 @@ index d5de30544c734..b7a82553471a0 100644
#include "chrome/browser/browser_process.h"
#include "chrome/browser/extensions/browser_extension_window_controller.h"
#include "chrome/browser/extensions/chrome_extension_function_details.h"
@@ -74,6 +75,10 @@
@@ -73,6 +74,10 @@
#include "third_party/blink/public/common/features.h"
#include "url/gurl.h"
@@ -115,14 +115,20 @@ index d5de30544c734..b7a82553471a0 100644
using content::NavigationEntry;
using content::WebContents;
using extensions::mojom::APIPermissionID;
@@ -720,6 +725,14 @@ bool ExtensionTabUtil::GetTabById(int tab_id,
@@ -696,6 +701,20 @@ bool ExtensionTabUtil::GetTabById(int tab_id,
}
}
+#if BUILDFLAG(ENABLE_CEF)
+ if (cef::GetAlloyTabById(tab_id, profile, include_incognito, out_contents)) {
+ // |out_window| and |out_tab_index| are tied to a specific Browser window,
+ // which doesn't exist for an Alloy style browser.
+ if (cef::GetAlloyTabById(tab_id, profile, include_incognito, contents)) {
+ // |tab_strip| and |tab_index| are tied to a specific Browser window, which
+ // doesn't exist for an Alloy style browser.
+ if (tab_strip) {
+ *tab_strip = nullptr;
+ }
+ if (tab_index) {
+ *tab_index = api::tabs::TAB_INDEX_NONE;
+ }
+ return true;
+ }
+#endif // BUILDFLAG(ENABLE_CEF)

View File

@@ -105,7 +105,7 @@ index d8fda08453256..466718e824503 100644
}
diff --git chrome/browser/policy/chrome_browser_policy_connector.cc chrome/browser/policy/chrome_browser_policy_connector.cc
index 440b8aaca8f0f..fec585790788d 100644
index cf3c9a1871a35..0577e8f8b60ec 100644
--- chrome/browser/policy/chrome_browser_policy_connector.cc
+++ chrome/browser/policy/chrome_browser_policy_connector.cc
@@ -13,11 +13,14 @@
@@ -123,7 +123,7 @@ index 440b8aaca8f0f..fec585790788d 100644
#include "chrome/browser/browser_process.h"
#include "chrome/browser/enterprise/browser_management/management_service_factory.h"
#include "chrome/browser/policy/configuration_policy_handler_list_factory.h"
@@ -75,6 +78,11 @@
@@ -82,6 +85,11 @@
namespace policy {
namespace {
bool g_command_line_enabled_for_testing = false;
@@ -135,7 +135,7 @@ index 440b8aaca8f0f..fec585790788d 100644
} // namespace
ChromeBrowserPolicyConnector::ChromeBrowserPolicyConnector()
@@ -255,6 +263,73 @@ void ChromeBrowserPolicyConnector::EnableCommandLineSupportForTesting() {
@@ -278,6 +286,73 @@ void ChromeBrowserPolicyConnector::EnableCommandLineSupportForTesting() {
g_command_line_enabled_for_testing = true;
}
@@ -209,7 +209,7 @@ index 440b8aaca8f0f..fec585790788d 100644
base::flat_set<std::string>
ChromeBrowserPolicyConnector::device_affiliation_ids() const {
if (!device_affiliation_ids_for_testing_.empty()) {
@@ -318,25 +393,22 @@ ChromeBrowserPolicyConnector::CreatePolicyProviders() {
@@ -357,25 +432,22 @@ ChromeBrowserPolicyConnector::CreatePolicyProviders() {
std::unique_ptr<ConfigurationPolicyProvider>
ChromeBrowserPolicyConnector::CreatePlatformProvider() {
#if BUILDFLAG(IS_WIN)
@@ -244,7 +244,7 @@ index 440b8aaca8f0f..fec585790788d 100644
auto loader = std::make_unique<PolicyLoaderMac>(
base::ThreadPool::CreateSequencedTaskRunner(
{base::MayBlock(), base::TaskPriority::BEST_EFFORT}),
@@ -346,7 +418,7 @@ ChromeBrowserPolicyConnector::CreatePlatformProvider() {
@@ -385,7 +457,7 @@ ChromeBrowserPolicyConnector::CreatePlatformProvider() {
std::move(loader));
#elif BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS)
base::FilePath config_dir_path;
@@ -254,12 +254,12 @@ index 440b8aaca8f0f..fec585790788d 100644
base::ThreadPool::CreateSequencedTaskRunner(
{base::MayBlock(), base::TaskPriority::BEST_EFFORT}),
diff --git chrome/browser/policy/chrome_browser_policy_connector.h chrome/browser/policy/chrome_browser_policy_connector.h
index 40ce1cf15d277..e98c6e999fb5b 100644
index e4c6792766ae4..0a0c054d9e4d1 100644
--- chrome/browser/policy/chrome_browser_policy_connector.h
+++ chrome/browser/policy/chrome_browser_policy_connector.h
@@ -23,6 +23,10 @@
#include "components/policy/core/browser/android/policy_cache_updater_android.h"
#endif
@@ -28,6 +28,10 @@
#include "components/policy/core/common/policy_loader_lacros.h"
#endif // BUILDFLAG(IS_CHROMEOS_LACROS)
+#if BUILDFLAG(IS_MAC)
+#include "base/apple/scoped_cftyperef.h"
@@ -268,7 +268,7 @@ index 40ce1cf15d277..e98c6e999fb5b 100644
class PrefService;
namespace policy {
@@ -128,6 +132,25 @@ class ChromeBrowserPolicyConnector : public BrowserPolicyConnector {
@@ -135,6 +139,25 @@ class ChromeBrowserPolicyConnector : public BrowserPolicyConnector {
static void EnableCommandLineSupportForTesting();
@@ -357,13 +357,13 @@ index 8dbf958c189dd..6eaccc6688eca 100644
*dir = base::FilePath(policy::path_parser::ExpandPathVariables(value));
return true;
diff --git chrome/common/chrome_paths.cc chrome/common/chrome_paths.cc
index a467b25145684..8727050b93a35 100644
index ec09803ffabcf..9a39e6172293f 100644
--- chrome/common/chrome_paths.cc
+++ chrome/common/chrome_paths.cc
@@ -525,7 +525,8 @@ bool PathProvider(int key, base::FilePath* result) {
@@ -535,7 +535,8 @@ bool PathProvider(int key, base::FilePath* result) {
return false;
}
break;
}
#endif
-#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_OPENBSD)
+#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_OPENBSD) && \
+ !BUILDFLAG(ENABLE_CEF)
@@ -371,7 +371,7 @@ index a467b25145684..8727050b93a35 100644
cur = base::FilePath(policy::kPolicyPath);
break;
diff --git chrome/common/chrome_paths.h chrome/common/chrome_paths.h
index fbfe597d09d9a..b8067f8d9ecd7 100644
index 13abfd26b92b3..acb4d58f02650 100644
--- chrome/common/chrome_paths.h
+++ chrome/common/chrome_paths.h
@@ -8,6 +8,7 @@
@@ -382,17 +382,17 @@ index fbfe597d09d9a..b8067f8d9ecd7 100644
#include "extensions/buildflags/buildflags.h"
#include "third_party/widevine/cdm/buildflags.h"
@@ -51,7 +52,7 @@ enum {
#if BUILDFLAG(IS_MAC)
DIR_OUTER_BUNDLE, // Directory that is the outermost Chromium bundle.
#endif
@@ -48,7 +49,7 @@ enum {
DIR_INTERNAL_PLUGINS, // Directory where internal plugins reside.
DIR_COMPONENTS, // Directory where built-in implementations of
// component-updated libraries or data reside.
-#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC)
+#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(ENABLE_CEF)
DIR_POLICY_FILES, // Directory for system-wide read-only
// policy files that allow sys-admins
// to set policies for chrome. This directory
diff --git components/policy/tools/generate_policy_source.py components/policy/tools/generate_policy_source.py
index 41f2f032eeaa6..cd191b61b9c1e 100755
index be1553785d5b5..2446e30bea57e 100755
--- components/policy/tools/generate_policy_source.py
+++ components/policy/tools/generate_policy_source.py
@@ -465,6 +465,7 @@ def _WritePolicyConstantHeader(all_policies, policy_atomic_groups,

View File

@@ -1,5 +1,5 @@
diff --git chrome/browser/printing/print_backend_service_manager.cc chrome/browser/printing/print_backend_service_manager.cc
index 9f3d26990651f..e89f779746ac5 100644
index 9fbce2cb49a9f..0d870a0d293d0 100644
--- chrome/browser/printing/print_backend_service_manager.cc
+++ chrome/browser/printing/print_backend_service_manager.cc
@@ -75,7 +75,15 @@ PrintBackendServiceManager* g_print_backend_service_manager_singleton = nullptr;
@@ -17,5 +17,5 @@ index 9f3d26990651f..e89f779746ac5 100644
+ }
+ return base::win::HandleToUint32(hwnd);
#else
NOTREACHED();
#endif
NOTREACHED_IN_MIGRATION();
return 0;

View File

@@ -1,5 +1,5 @@
diff --git chrome/browser/ui/bookmarks/bookmark_stats.cc chrome/browser/ui/bookmarks/bookmark_stats.cc
index bd47b3f13aa2a..0f4f3c47d2647 100644
index 7ae18c5a960b0..d48ba838efe6f 100644
--- chrome/browser/ui/bookmarks/bookmark_stats.cc
+++ chrome/browser/ui/bookmarks/bookmark_stats.cc
@@ -21,7 +21,9 @@ bool IsBookmarkBarLocation(BookmarkLaunchLocation location) {
@@ -44,7 +44,7 @@ index caa20ec03434a..2a3ca921445c1 100644
avatar_toolbar_button, GetBrowser().profile(), type);
DCHECK_EQ(nullptr, bubble_tracker_.view());
diff --git chrome/browser/ui/views/profiles/incognito_menu_view.cc chrome/browser/ui/views/profiles/incognito_menu_view.cc
index 00510c991e657..830db4087c274 100644
index 791ab794c8750..ca9e0851e2689 100644
--- chrome/browser/ui/views/profiles/incognito_menu_view.cc
+++ chrome/browser/ui/views/profiles/incognito_menu_view.cc
@@ -36,7 +36,9 @@
@@ -59,13 +59,13 @@ index 00510c991e657..830db4087c274 100644
ax::mojom::NameFrom::kAttribute);
diff --git chrome/browser/ui/views/profiles/profile_menu_coordinator.cc chrome/browser/ui/views/profiles/profile_menu_coordinator.cc
index 58026d48e15a6..acb3b51f86943 100644
index ee9f399e4c010..2182e42981f9d 100644
--- chrome/browser/ui/views/profiles/profile_menu_coordinator.cc
+++ chrome/browser/ui/views/profiles/profile_menu_coordinator.cc
@@ -52,7 +52,9 @@ void ProfileMenuCoordinator::Show(bool is_source_accelerator) {
@@ -58,7 +58,9 @@ void ProfileMenuCoordinator::Show(bool is_source_accelerator) {
is_incognito &= !browser.profile()->IsGuestSession();
#endif
std::unique_ptr<ProfileMenuViewBase> bubble;
bool is_incognito = browser.profile()->IsIncognitoProfile();
- if (is_incognito) {
+ if (is_incognito ||
+ (browser.profile()->IsOffTheRecord() &&

View File

@@ -1,8 +1,8 @@
diff --git chrome/browser/profiles/off_the_record_profile_impl.cc chrome/browser/profiles/off_the_record_profile_impl.cc
index cf4597e671afe..a9693c4e10d8e 100644
index 0b7e60d6742de..94af5f4d226bf 100644
--- chrome/browser/profiles/off_the_record_profile_impl.cc
+++ chrome/browser/profiles/off_the_record_profile_impl.cc
@@ -647,7 +647,9 @@ std::unique_ptr<Profile> Profile::CreateOffTheRecordProfile(
@@ -643,7 +643,9 @@ std::unique_ptr<Profile> Profile::CreateOffTheRecordProfile(
#endif
if (!profile)
profile = std::make_unique<OffTheRecordProfileImpl>(parent, otr_profile_id);
@@ -14,10 +14,10 @@ index cf4597e671afe..a9693c4e10d8e 100644
}
diff --git chrome/browser/profiles/profile.cc chrome/browser/profiles/profile.cc
index 4385d5d90f9c8..88aca5519660e 100644
index 89254771117da..eb35e4595d1ad 100644
--- chrome/browser/profiles/profile.cc
+++ chrome/browser/profiles/profile.cc
@@ -84,6 +84,7 @@ base::LazyInstance<std::set<content::BrowserContext*>>::Leaky
@@ -81,6 +81,7 @@ base::LazyInstance<std::set<content::BrowserContext*>>::Leaky
namespace {
@@ -25,7 +25,7 @@ index 4385d5d90f9c8..88aca5519660e 100644
const char kDevToolsOTRProfileIDPrefix[] = "Devtools::BrowserContext";
const char kMediaRouterOTRProfileIDPrefix[] = "MediaRouter::Presentation";
const char kTestOTRProfileIDPrefix[] = "Test::OTR";
@@ -104,6 +105,8 @@ bool Profile::OTRProfileID::AllowsBrowserWindows() const {
@@ -101,6 +102,8 @@ bool Profile::OTRProfileID::AllowsBrowserWindows() const {
// DevTools::BrowserContext, MediaRouter::Presentation, and
// CaptivePortal::Signin are exceptions to this ban.
if (*this == PrimaryID() ||
@@ -34,7 +34,7 @@ index 4385d5d90f9c8..88aca5519660e 100644
base::StartsWith(profile_id_, kDevToolsOTRProfileIDPrefix,
base::CompareCase::SENSITIVE) ||
base::StartsWith(profile_id_, kMediaRouterOTRProfileIDPrefix,
@@ -141,6 +144,16 @@ Profile::OTRProfileID Profile::OTRProfileID::CreateUnique(
@@ -138,6 +141,16 @@ Profile::OTRProfileID Profile::OTRProfileID::CreateUnique(
base::Uuid::GenerateRandomV4().AsLowercaseString().c_str()));
}
@@ -52,7 +52,7 @@ index 4385d5d90f9c8..88aca5519660e 100644
Profile::OTRProfileID Profile::OTRProfileID::CreateUniqueForDevTools() {
return CreateUnique(kDevToolsOTRProfileIDPrefix);
diff --git chrome/browser/profiles/profile.h chrome/browser/profiles/profile.h
index 8e96e47754dc7..c65184775fba7 100644
index f79b0cd32e4fb..c797e6659a43f 100644
--- chrome/browser/profiles/profile.h
+++ chrome/browser/profiles/profile.h
@@ -94,6 +94,10 @@ class Profile : public content::BrowserContext {
@@ -66,7 +66,7 @@ index 8e96e47754dc7..c65184775fba7 100644
// Creates a unique OTR profile id to be used for DevTools browser contexts.
static OTRProfileID CreateUniqueForDevTools();
@@ -506,6 +510,9 @@ class Profile : public content::BrowserContext {
@@ -503,6 +507,9 @@ class Profile : public content::BrowserContext {
static Profile* FromJavaObject(const jni_zero::JavaRef<jobject>& obj);
jni_zero::ScopedJavaLocalRef<jobject> GetJavaObject() const;
#endif // BUILDFLAG(IS_ANDROID)
@@ -76,7 +76,7 @@ index 8e96e47754dc7..c65184775fba7 100644
protected:
// Creates an OffTheRecordProfile which points to this Profile.
static std::unique_ptr<Profile> CreateOffTheRecordProfile(
@@ -517,7 +524,6 @@ class Profile : public content::BrowserContext {
@@ -514,7 +521,6 @@ class Profile : public content::BrowserContext {
static PrefStore* CreateExtensionPrefStore(Profile*,
bool incognito_pref_store);
@@ -85,10 +85,10 @@ index 8e96e47754dc7..c65184775fba7 100644
// Returns whether the user has signed in this profile to an account.
diff --git chrome/browser/profiles/profile_impl.cc chrome/browser/profiles/profile_impl.cc
index 3dd5f9818cfa0..7b3e3697f4ce3 100644
index 26667af1eb648..79bb0289f6150 100644
--- chrome/browser/profiles/profile_impl.cc
+++ chrome/browser/profiles/profile_impl.cc
@@ -1038,7 +1038,9 @@ Profile* ProfileImpl::GetOffTheRecordProfile(const OTRProfileID& otr_profile_id,
@@ -1012,7 +1012,9 @@ Profile* ProfileImpl::GetOffTheRecordProfile(const OTRProfileID& otr_profile_id,
otr_profiles_[otr_profile_id] = std::move(otr_profile);

View File

@@ -1,5 +1,5 @@
diff --git chrome/browser/safe_browsing/BUILD.gn chrome/browser/safe_browsing/BUILD.gn
index ba573c282402e..216d702ee65b8 100644
index 19cc1b47ecf4a..56b0e471ff37a 100644
--- chrome/browser/safe_browsing/BUILD.gn
+++ chrome/browser/safe_browsing/BUILD.gn
@@ -39,6 +39,7 @@ static_library("safe_browsing") {

View File

@@ -1,5 +1,5 @@
diff --git chrome/browser/ui/startup/startup_browser_creator.cc chrome/browser/ui/startup/startup_browser_creator.cc
index ba443f5e8838d..a3f3c250f8006 100644
index 5e4078d747c74..e1c41cb1a8cda 100644
--- chrome/browser/ui/startup/startup_browser_creator.cc
+++ chrome/browser/ui/startup/startup_browser_creator.cc
@@ -616,6 +616,13 @@ std::optional<ash::KioskAppId> GetAppId(const base::CommandLine& command_line,
@@ -16,7 +16,7 @@ index ba443f5e8838d..a3f3c250f8006 100644
} // namespace
StartupProfileMode StartupProfileModeFromReason(
@@ -1479,6 +1486,12 @@ void StartupBrowserCreator::ProcessCommandLineWithProfile(
@@ -1481,6 +1488,12 @@ void StartupBrowserCreator::ProcessCommandLineWithProfile(
{profile, mode}, last_opened_profiles);
}
@@ -29,7 +29,7 @@ index ba443f5e8838d..a3f3c250f8006 100644
// static
void StartupBrowserCreator::ProcessCommandLineAlreadyRunning(
const base::CommandLine& command_line,
@@ -1488,6 +1501,11 @@ void StartupBrowserCreator::ProcessCommandLineAlreadyRunning(
@@ -1490,6 +1503,11 @@ void StartupBrowserCreator::ProcessCommandLineAlreadyRunning(
return;
}

View File

@@ -1,8 +1,8 @@
diff --git chrome/browser/ui/webui/about/about_ui.cc chrome/browser/ui/webui/about/about_ui.cc
index e28af86de9298..fb182fa3f7c32 100644
index 63e740fe81847..ea422ae7bbda4 100644
--- chrome/browser/ui/webui/about/about_ui.cc
+++ chrome/browser/ui/webui/about/about_ui.cc
@@ -89,6 +89,10 @@
@@ -92,6 +92,10 @@
#include "chrome/common/webui_url_constants.h"
#endif // BUILDFLAG(IS_CHROMEOS)
@@ -13,7 +13,7 @@ index e28af86de9298..fb182fa3f7c32 100644
using content::BrowserThread;
namespace {
@@ -620,6 +624,11 @@ ChromeURLsUIConfig::ChromeURLsUIConfig()
@@ -624,6 +628,11 @@ ChromeURLsUIConfig::ChromeURLsUIConfig()
CreditsUIConfig::CreditsUIConfig()
: AboutUIConfigBase(chrome::kChromeUICreditsHost) {}
@@ -25,7 +25,7 @@ index e28af86de9298..fb182fa3f7c32 100644
#if !BUILDFLAG(IS_ANDROID)
TermsUIConfig::TermsUIConfig()
: AboutUIConfigBase(chrome::kChromeUITermsHost) {}
@@ -721,6 +730,16 @@ void AboutUIHTMLSource::StartDataRequest(
@@ -725,6 +734,16 @@ void AboutUIHTMLSource::StartDataRequest(
IDS_TERMS_HTML);
#endif
}
@@ -69,7 +69,7 @@ index 6548d519c3da9..645163f69f822 100644
// chrome://terms
class TermsUIConfig : public AboutUIConfigBase {
diff --git chrome/browser/ui/webui/chrome_web_ui_configs.cc chrome/browser/ui/webui/chrome_web_ui_configs.cc
index 8b877339c4179..dcb347ef1878f 100644
index a1f43d79b6f9b..281ee1e2c8a41 100644
--- chrome/browser/ui/webui/chrome_web_ui_configs.cc
+++ chrome/browser/ui/webui/chrome_web_ui_configs.cc
@@ -6,6 +6,7 @@
@@ -77,21 +77,21 @@ index 8b877339c4179..dcb347ef1878f 100644
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
+#include "cef/libcef/features/features.h"
#include "chrome/browser/optimization_guide/optimization_guide_internals_ui.h"
#include "chrome/browser/ui/webui/about/about_ui.h"
#include "chrome/browser/ui/webui/accessibility/accessibility_ui.h"
@@ -215,6 +216,9 @@ void RegisterChromeWebUIConfigs() {
map.AddWebUIConfig(std::make_unique<BluetoothInternalsUIConfig>());
#include "chrome/browser/ui/webui/autofill_and_password_manager_internals/autofill_internals_ui.h"
@@ -211,6 +212,9 @@ void RegisterChromeWebUIConfigs() {
map.AddWebUIConfig(std::make_unique<BrowsingTopicsInternalsUIConfig>());
map.AddWebUIConfig(std::make_unique<chromeos::DeviceLogUIConfig>());
map.AddWebUIConfig(std::make_unique<ChromeURLsUIConfig>());
+#if BUILDFLAG(ENABLE_CEF)
+ map.AddWebUIConfig(std::make_unique<ChromeUILicenseConfig>());
+#endif
map.AddWebUIConfig(std::make_unique<ChromeURLsUIConfig>());
map.AddWebUIConfig(std::make_unique<CrashesUIConfig>());
map.AddWebUIConfig(std::make_unique<commerce::CommerceInternalsUIConfig>());
map.AddWebUIConfig(std::make_unique<ComponentsUIConfig>());
map.AddWebUIConfig(
std::make_unique<security_interstitials::ConnectionHelpUIConfig>());
diff --git chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
index f9ca5f61c9c1f..a99993720a7ea 100644
index 279f73938d406..c1bf263962e0c 100644
--- chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
+++ chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
@@ -18,6 +18,7 @@
@@ -101,8 +101,8 @@ index f9ca5f61c9c1f..a99993720a7ea 100644
+#include "cef/libcef/features/features.h"
#include "chrome/browser/about_flags.h"
#include "chrome/browser/buildflags.h"
#include "chrome/browser/devtools/devtools_ui_bindings.h"
@@ -485,6 +486,9 @@ ChromeWebUIControllerFactory::GetListOfAcceptableURLs() {
#include "chrome/browser/commerce/shopping_service_factory.h"
@@ -538,6 +539,9 @@ ChromeWebUIControllerFactory::GetListOfAcceptableURLs() {
GURL(chrome::kChromeUIGpuURL),
GURL(chrome::kChromeUIHistogramsURL),
GURL(chrome::kChromeUIInspectURL),
@@ -113,7 +113,7 @@ index f9ca5f61c9c1f..a99993720a7ea 100644
GURL(chrome::kChromeUINetExportURL),
GURL(chrome::kChromeUIPrefsInternalsURL),
diff --git chrome/common/webui_url_constants.cc chrome/common/webui_url_constants.cc
index 47932e80c59ea..805a9e8e3c3e6 100644
index 248b6795e8cbe..c957f9d55613d 100644
--- chrome/common/webui_url_constants.cc
+++ chrome/common/webui_url_constants.cc
@@ -99,6 +99,9 @@ base::span<const base::cstring_view> ChromeURLHosts() {

View File

@@ -1,8 +1,8 @@
diff --git chrome/browser/ui/webui/version/version_handler.cc chrome/browser/ui/webui/version/version_handler.cc
index 0ce1816cb372d..dfee4d62126b2 100644
index 55541159e5fc8..8021d1d963f59 100644
--- chrome/browser/ui/webui/version/version_handler.cc
+++ chrome/browser/ui/webui/version/version_handler.cc
@@ -28,12 +28,23 @@
@@ -27,12 +27,23 @@
#include "ui/base/l10n/l10n_util.h"
#include "url/gurl.h"
@@ -27,7 +27,7 @@ index 0ce1816cb372d..dfee4d62126b2 100644
base::ScopedBlockingCall scoped_blocking_call(FROM_HERE,
base::BlockingType::MAY_BLOCK);
@@ -49,6 +60,19 @@ void GetFilePaths(const base::FilePath& profile_path,
@@ -48,6 +59,19 @@ void GetFilePaths(const base::FilePath& profile_path,
*profile_path_out = profile_path.LossyDisplayName();
else
*profile_path_out = l10n_util::GetStringUTF16(IDS_VERSION_UI_PATH_NOTFOUND);
@@ -47,7 +47,7 @@ index 0ce1816cb372d..dfee4d62126b2 100644
}
} // namespace
@@ -115,23 +139,46 @@ void VersionHandler::HandleRequestPathInfo(const base::Value::List& args) {
@@ -111,23 +135,46 @@ void VersionHandler::HandleRequestPathInfo(const base::Value::List& args) {
// OnGotFilePaths.
std::u16string* exec_path_buffer = new std::u16string;
std::u16string* profile_path_buffer = new std::u16string;
@@ -124,7 +124,7 @@ index 2f8162d7491d1..b00f0d5bf26ae 100644
// Factory for the creating refs in callbacks.
base::WeakPtrFactory<VersionHandler> weak_ptr_factory_{this};
diff --git chrome/browser/ui/webui/version/version_ui.cc chrome/browser/ui/webui/version/version_ui.cc
index d046b78cb5825..096c0c806cf85 100644
index f12ad5b23e75c..0f07abc1b85f5 100644
--- chrome/browser/ui/webui/version/version_ui.cc
+++ chrome/browser/ui/webui/version/version_ui.cc
@@ -22,6 +22,7 @@
@@ -135,7 +135,7 @@ index d046b78cb5825..096c0c806cf85 100644
#include "chrome/browser/browser_process_impl.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/webui/version/version_handler.h"
@@ -70,6 +71,10 @@
@@ -69,6 +70,10 @@
#include "chrome/browser/ui/webui/version/version_util_win.h"
#endif
@@ -146,18 +146,18 @@ index d046b78cb5825..096c0c806cf85 100644
using content::WebUIDataSource;
namespace {
@@ -90,6 +95,10 @@ void CreateAndAddVersionUIDataSource(Profile* profile) {
{version_ui::kCommandLineName, IDS_VERSION_UI_COMMAND_LINE},
{version_ui::kExecutablePathName, IDS_VERSION_UI_EXECUTABLE_PATH},
{version_ui::kProfilePathName, IDS_VERSION_UI_PROFILE_PATH},
@@ -89,6 +94,10 @@ void CreateAndAddVersionUIDataSource(Profile* profile) {
{version_ui::kCommandLineName, IDS_VERSION_UI_COMMAND_LINE},
{version_ui::kExecutablePathName, IDS_VERSION_UI_EXECUTABLE_PATH},
{version_ui::kProfilePathName, IDS_VERSION_UI_PROFILE_PATH},
+#if BUILDFLAG(ENABLE_CEF)
+ {version_ui::kModulePathName, IDS_VERSION_UI_MODULE_PATH},
+ {version_ui::kUserDataPathName, IDS_VERSION_UI_USER_DATA_PATH},
+ {version_ui::kModulePathName, IDS_VERSION_UI_MODULE_PATH},
+ {version_ui::kUserDataPathName, IDS_VERSION_UI_USER_DATA_PATH},
+#endif
{version_ui::kVariationsName, IDS_VERSION_UI_VARIATIONS},
{version_ui::kVariationsCmdName, IDS_VERSION_UI_VARIATIONS_CMD},
{version_ui::kCopyVariationsLabel, IDS_VERSION_UI_COPY_VARIATIONS_LABEL},
@@ -130,6 +139,10 @@ void CreateAndAddVersionUIDataSource(Profile* profile) {
{version_ui::kVariationsName, IDS_VERSION_UI_VARIATIONS},
{version_ui::kVariationsCmdName, IDS_VERSION_UI_VARIATIONS_CMD},
{version_ui::kVariationsSeedName, IDS_VERSION_UI_VARIATIONS_SEED_NAME},
@@ -126,6 +135,10 @@ void CreateAndAddVersionUIDataSource(Profile* profile) {
IDR_PRODUCT_LOGO_WHITE);
#endif // BUILDFLAG(IS_ANDROID)
html_source->SetDefaultResource(IDR_VERSION_UI_ABOUT_VERSION_HTML);
@@ -168,7 +168,7 @@ index d046b78cb5825..096c0c806cf85 100644
}
std::string GetProductModifier() {
@@ -247,6 +260,10 @@ void VersionUI::AddVersionDetailStrings(content::WebUIDataSource* html_source) {
@@ -246,6 +259,10 @@ void VersionUI::AddVersionDetailStrings(content::WebUIDataSource* html_source) {
// blank.
html_source->AddString(version_ui::kExecutablePath, std::string());
html_source->AddString(version_ui::kProfilePath, std::string());
@@ -202,10 +202,10 @@ index 913cf913dca7a..d79c330989149 100644
+ }
}
diff --git components/version_ui/resources/about_version.css components/version_ui/resources/about_version.css
index 839526405ef3f..fb2d6f3a98c00 100644
index 6b753d716b55d..58d6419be0165 100644
--- components/version_ui/resources/about_version.css
+++ components/version_ui/resources/about_version.css
@@ -138,3 +138,7 @@ body {
@@ -135,3 +135,7 @@ body {
position: fixed;
width: 1px;
}
@@ -214,7 +214,7 @@ index 839526405ef3f..fb2d6f3a98c00 100644
+ font-size: 0.8em;
+}
diff --git components/version_ui/resources/about_version.html components/version_ui/resources/about_version.html
index c04197bd7b397..7e461101115b1 100644
index 508c4ecfd790f..fed6933908951 100644
--- components/version_ui/resources/about_version.html
+++ components/version_ui/resources/about_version.html
@@ -62,9 +62,21 @@ about:version template page
@@ -240,7 +240,7 @@ index c04197bd7b397..7e461101115b1 100644
<tr><td class="label">$i18n{application_label}</td>
<td class="version" id="version">
<span id="copy-content">
@@ -175,7 +187,15 @@ about:version template page
@@ -171,7 +183,15 @@ about:version template page
<tr><td class="label">$i18n{executable_path_name}</td>
<td class="version" id="executable_path">$i18n{executable_path}</td>
</tr>
@@ -257,7 +257,7 @@ index c04197bd7b397..7e461101115b1 100644
<td class="version" id="profile_path">$i18n{profile_path}</td>
</tr>
</if>
@@ -208,6 +228,17 @@ about:version template page
@@ -198,6 +218,17 @@ about:version template page
<td class="version" id="sanitizer">$i18n{sanitizer}</td>
</tr>
</table>
@@ -276,10 +276,10 @@ index c04197bd7b397..7e461101115b1 100644
<div id="messages" role="alert" aria-live="polite" aria-relevant="additions">
diff --git components/version_ui/resources/about_version.ts components/version_ui/resources/about_version.ts
index 687a4c066dbc4..1f782c120ba3a 100644
index fcd11ec05dc17..565657694f768 100644
--- components/version_ui/resources/about_version.ts
+++ components/version_ui/resources/about_version.ts
@@ -75,9 +75,21 @@ function handleVariationInfo(
@@ -50,9 +50,21 @@ function handleVariationInfo(
* @param profilePath The profile path to display.
*/
function handlePathInfo(
@@ -303,7 +303,7 @@ index 687a4c066dbc4..1f782c120ba3a 100644
// <if expr="chromeos_lacros or is_win">
diff --git components/version_ui/version_ui_constants.cc components/version_ui/version_ui_constants.cc
index 0a28810b49c9c..dfc56e70232ff 100644
index f33bd808d6d56..75515ffa256b7 100644
--- components/version_ui/version_ui_constants.cc
+++ components/version_ui/version_ui_constants.cc
@@ -6,6 +6,7 @@
@@ -314,7 +314,7 @@ index 0a28810b49c9c..dfc56e70232ff 100644
namespace version_ui {
@@ -93,4 +94,15 @@ const char kVersion[] = "version";
@@ -90,4 +91,15 @@ const char kVersion[] = "version";
const char kVersionModifier[] = "version_modifier";
const char kVersionProcessorVariation[] = "version_processor_variation";
@@ -331,7 +331,7 @@ index 0a28810b49c9c..dfc56e70232ff 100644
+
} // namespace version_ui
diff --git components/version_ui/version_ui_constants.h components/version_ui/version_ui_constants.h
index 036b6427f56ae..2e68bc18be8c1 100644
index 212f7e2114c75..d35549eb15310 100644
--- components/version_ui/version_ui_constants.h
+++ components/version_ui/version_ui_constants.h
@@ -7,6 +7,7 @@
@@ -342,7 +342,7 @@ index 036b6427f56ae..2e68bc18be8c1 100644
namespace version_ui {
@@ -95,6 +96,17 @@ extern const char kVersion[];
@@ -92,6 +93,17 @@ extern const char kVersion[];
extern const char kVersionModifier[];
extern const char kVersionProcessorVariation[];
@@ -361,7 +361,7 @@ index 036b6427f56ae..2e68bc18be8c1 100644
#endif // COMPONENTS_VERSION_UI_VERSION_UI_CONSTANTS_H_
diff --git components/version_ui_strings.grdp components/version_ui_strings.grdp
index 738a21ef1e4ef..7d4775a8b7ae0 100644
index 9f236e6217ee9..d2b7964c3a09f 100644
--- components/version_ui_strings.grdp
+++ components/version_ui_strings.grdp
@@ -76,6 +76,14 @@

View File

@@ -1,5 +1,5 @@
diff --git chrome/common/features.gni chrome/common/features.gni
index 418e78ecb356b..8fe49cf32a374 100644
index 276e7fbde552c..1fddfa229eeed 100644
--- chrome/common/features.gni
+++ chrome/common/features.gni
@@ -7,6 +7,7 @@ import("//build/config/chromeos/ui_mode.gni")
@@ -10,7 +10,7 @@ index 418e78ecb356b..8fe49cf32a374 100644
import("//components/compose/features.gni")
import("//components/nacl/features.gni")
import("//components/safe_browsing/buildflags.gni")
@@ -32,7 +33,7 @@ assert(use_blink, "Chromium without blink shouldn't use anything in //chrome")
@@ -31,7 +32,7 @@ assert(use_blink, "Chromium without blink shouldn't use anything in //chrome")
declare_args() {
# Enables the build to have logging enabled by default.
# This is intended for use only in developer builds.
@@ -19,7 +19,7 @@ index 418e78ecb356b..8fe49cf32a374 100644
# Platforms for which Chrome supports a certificate management UI that
# shows the Chrome Root Store. This is specific to the v2 UI that is
@@ -64,11 +65,13 @@ declare_args() {
@@ -63,11 +64,13 @@ declare_args() {
# optimize_webui was moved to ui/base/ui_features.gni
}

View File

@@ -1,5 +1,5 @@
diff --git chrome/renderer/BUILD.gn chrome/renderer/BUILD.gn
index 2e4dc8c6f3e4a..f79b276435e6a 100644
index ce023fa1c9ef0..10717d8ec7a90 100644
--- chrome/renderer/BUILD.gn
+++ chrome/renderer/BUILD.gn
@@ -5,6 +5,7 @@
@@ -10,7 +10,7 @@ index 2e4dc8c6f3e4a..f79b276435e6a 100644
import("//chrome/common/features.gni")
import("//components/nacl/features.gni")
import("//components/offline_pages/buildflags/features.gni")
@@ -136,6 +137,7 @@ static_library("renderer") {
@@ -138,6 +139,7 @@ static_library("renderer") {
":process_state",
"//base/allocator:buildflags",
"//build:chromeos_buildflags",
@@ -18,7 +18,7 @@ index 2e4dc8c6f3e4a..f79b276435e6a 100644
"//chrome:resources",
"//chrome:strings",
"//chrome/common",
@@ -251,6 +253,10 @@ static_library("renderer") {
@@ -256,6 +258,10 @@ static_library("renderer") {
]
}

View File

@@ -1,5 +1,5 @@
diff --git chrome/app/chrome_main_delegate.cc chrome/app/chrome_main_delegate.cc
index 4569ff21cd37e..33749b8187efa 100644
index a419367526923..d06e0e2f5b09a 100644
--- chrome/app/chrome_main_delegate.cc
+++ chrome/app/chrome_main_delegate.cc
@@ -42,6 +42,7 @@
@@ -10,7 +10,7 @@ index 4569ff21cd37e..33749b8187efa 100644
#include "chrome/browser/buildflags.h"
#include "chrome/browser/chrome_content_browser_client.h"
#include "chrome/browser/chrome_resource_bundle_helper.h"
@@ -572,6 +573,7 @@ struct MainFunction {
@@ -573,6 +574,7 @@ struct MainFunction {
int (*function)(content::MainFunctionParams);
};
@@ -18,7 +18,7 @@ index 4569ff21cd37e..33749b8187efa 100644
// Initializes the user data dir. Must be called before InitializeLocalState().
void InitializeUserDataDir(base::CommandLine* command_line) {
#if BUILDFLAG(IS_CHROMEOS_LACROS)
@@ -655,6 +657,7 @@ void InitializeUserDataDir(base::CommandLine* command_line) {
@@ -656,6 +658,7 @@ void InitializeUserDataDir(base::CommandLine* command_line) {
command_line->AppendSwitchPath(switches::kUserDataDir, user_data_dir);
#endif // BUILDFLAG(IS_WIN)
}
@@ -26,7 +26,7 @@ index 4569ff21cd37e..33749b8187efa 100644
#if !BUILDFLAG(IS_ANDROID)
void InitLogging(const std::string& process_type) {
@@ -790,6 +793,10 @@ ChromeMainDelegate::~ChromeMainDelegate() {
@@ -788,6 +791,10 @@ ChromeMainDelegate::~ChromeMainDelegate() {
ChromeMainDelegate::~ChromeMainDelegate() = default;
#endif // !BUILDFLAG(IS_ANDROID)
@@ -37,7 +37,7 @@ index 4569ff21cd37e..33749b8187efa 100644
std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
InvokedIn invoked_in) {
DUMP_WILL_BE_CHECK(base::ThreadPoolInstance::Get());
@@ -815,7 +822,7 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
@@ -813,7 +820,7 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
// future session's metrics.
DeferBrowserMetrics(user_data_dir);
@@ -46,7 +46,7 @@ index 4569ff21cd37e..33749b8187efa 100644
// In the case the process is not the singleton process, the uninstall tasks
// need to be executed here. A window will be displayed asking to close all
// running instances.
@@ -962,7 +969,8 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
@@ -960,7 +967,8 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
// Initializes the resource bundle and determines the locale.
std::string actual_locale = LoadLocalState(
@@ -56,7 +56,7 @@ index 4569ff21cd37e..33749b8187efa 100644
chrome_feature_list_creator->SetApplicationLocale(actual_locale);
chrome_feature_list_creator->OverrideCachedUIStrings();
@@ -979,6 +987,8 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
@@ -977,6 +985,8 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
new net::NetworkChangeNotifierFactoryAndroid());
#endif
@@ -65,7 +65,7 @@ index 4569ff21cd37e..33749b8187efa 100644
if (base::FeatureList::IsEnabled(
features::kWriteBasicSystemProfileToPersistentHistogramsFile)) {
bool record = true;
@@ -989,6 +999,7 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
@@ -987,6 +997,7 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
if (record)
chrome_content_browser_client_->startup_data()->RecordCoreSystemProfile();
}
@@ -73,7 +73,7 @@ index 4569ff21cd37e..33749b8187efa 100644
#if BUILDFLAG(IS_ANDROID)
UmaSessionStats::OnStartup();
@@ -1032,8 +1043,8 @@ void ChromeMainDelegate::CreateThreadPool(std::string_view name) {
@@ -1030,8 +1041,8 @@ void ChromeMainDelegate::CreateThreadPool(std::string_view name) {
std::make_unique<ChromeThreadProfilerClient>());
// `ChromeMainDelegateAndroid::PreSandboxStartup` creates the profiler a little
@@ -84,7 +84,7 @@ index 4569ff21cd37e..33749b8187efa 100644
// Start the sampling profiler as early as possible - namely, once the thread
// pool has been created.
sampling_profiler_ = std::make_unique<MainThreadStackSamplingProfiler>();
@@ -1431,6 +1442,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
@@ -1438,6 +1449,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
std::string process_type =
command_line.GetSwitchValueASCII(switches::kProcessType);
@@ -92,15 +92,15 @@ index 4569ff21cd37e..33749b8187efa 100644
crash_reporter::InitializeCrashKeys();
#if BUILDFLAG(IS_POSIX)
@@ -1446,6 +1458,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
@@ -1453,6 +1465,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
if (chrome::ProcessNeedsProfileDir(process_type)) {
InitializeUserDataDir(base::CommandLine::ForCurrentProcess());
}
+#endif // !BUILDFLAG(ENABLE_CEF)
// Register component_updater PathProvider after DIR_USER_DATA overridden by
// command line flags. Maybe move the chrome PathProvider down here also?
@@ -1549,7 +1562,8 @@ void ChromeMainDelegate::PreSandboxStartup() {
#if BUILDFLAG(IS_CHROMEOS_LACROS)
// Generate shared resource file only on browser process. This is to avoid
@@ -1604,7 +1617,8 @@ void ChromeMainDelegate::PreSandboxStartup() {
#else
const std::string loaded_locale =
ui::ResourceBundle::InitSharedInstanceWithLocale(
@@ -110,7 +110,7 @@ index 4569ff21cd37e..33749b8187efa 100644
base::FilePath resources_pack_path;
base::PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path);
@@ -1559,6 +1573,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
@@ -1634,6 +1648,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
CHECK(!loaded_locale.empty()) << "Locale could not be found for " << locale;
}
@@ -118,7 +118,7 @@ index 4569ff21cd37e..33749b8187efa 100644
#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC)
// Zygote needs to call InitCrashReporter() in RunZygote().
if (process_type != switches::kZygoteProcess &&
@@ -1595,6 +1610,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
@@ -1670,6 +1685,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
// After all the platform Breakpads have been initialized, store the command
// line for crash reporting.
crash_keys::SetCrashKeysFromCommandLine(command_line);
@@ -126,7 +126,7 @@ index 4569ff21cd37e..33749b8187efa 100644
#if BUILDFLAG(ENABLE_PDF)
MaybePatchGdiGetFontData();
@@ -1713,6 +1729,7 @@ void ChromeMainDelegate::ZygoteForked() {
@@ -1790,6 +1806,7 @@ void ChromeMainDelegate::ZygoteForked() {
SetUpProfilingShutdownHandler();
}
@@ -134,7 +134,7 @@ index 4569ff21cd37e..33749b8187efa 100644
// Needs to be called after we have chrome::DIR_USER_DATA. BrowserMain sets
// this up for the browser process in a different manner.
const base::CommandLine* command_line =
@@ -1725,6 +1742,7 @@ void ChromeMainDelegate::ZygoteForked() {
@@ -1802,6 +1819,7 @@ void ChromeMainDelegate::ZygoteForked() {
// Reset the command line for the newly spawned process.
crash_keys::SetCrashKeysFromCommandLine(*command_line);
@@ -142,7 +142,7 @@ index 4569ff21cd37e..33749b8187efa 100644
}
#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
@@ -1835,6 +1853,7 @@ void ChromeMainDelegate::InitializeMemorySystem() {
@@ -1912,6 +1930,7 @@ void ChromeMainDelegate::InitializeMemorySystem() {
: memory_system::DispatcherParameters::
AllocationTraceRecorderInclusion::kIgnore;
@@ -150,7 +150,7 @@ index 4569ff21cd37e..33749b8187efa 100644
memory_system::Initializer()
.SetGwpAsanParameters(gwp_asan_boost_sampling, process_type)
.SetProfilingClientParameters(chrome::GetChannel(),
@@ -1842,5 +1861,5 @@ void ChromeMainDelegate::InitializeMemorySystem() {
@@ -1919,5 +1938,5 @@ void ChromeMainDelegate::InitializeMemorySystem() {
.SetDispatcherParameters(memory_system::DispatcherParameters::
PoissonAllocationSamplerInclusion::kEnforce,
allocation_recorder_inclusion, process_type)
@@ -210,7 +210,7 @@ index db17714f74137..23f9f2eb3eb8b 100644
"//chrome/app:command_ids",
"//chrome/browser/renderer_host:history_swiper",
diff --git chrome/app_shim/chrome_main_app_mode_mac.mm chrome/app_shim/chrome_main_app_mode_mac.mm
index 8f5c477acba39..ff2f90a8bf27b 100644
index ac1361bd6bc2e..a303ca169c7f7 100644
--- chrome/app_shim/chrome_main_app_mode_mac.mm
+++ chrome/app_shim/chrome_main_app_mode_mac.mm
@@ -35,6 +35,7 @@
@@ -232,7 +232,7 @@ index 8f5c477acba39..ff2f90a8bf27b 100644
base::PathService::OverrideAndCreateIfNeeded(
diff --git chrome/browser/chrome_browser_main.cc chrome/browser/chrome_browser_main.cc
index d202767ab4f3f..41106d7b31e43 100644
index 5b89cf0e9a761..8bf832888bd53 100644
--- chrome/browser/chrome_browser_main.cc
+++ chrome/browser/chrome_browser_main.cc
@@ -52,6 +52,7 @@
@@ -243,7 +243,7 @@ index d202767ab4f3f..41106d7b31e43 100644
#include "chrome/browser/about_flags.h"
#include "chrome/browser/active_use_util.h"
#include "chrome/browser/after_startup_task_utils.h"
@@ -528,7 +529,7 @@ void ProcessSingletonNotificationCallbackImpl(
@@ -527,7 +528,7 @@ void ProcessSingletonNotificationCallbackImpl(
return;
}
@@ -252,7 +252,7 @@ index d202767ab4f3f..41106d7b31e43 100644
// The uninstall command-line switch is handled by the origin process; see
// ChromeMainDelegate::PostEarlyInitialization(...). The other process won't
// be able to become the singleton process and will display a window asking
@@ -843,7 +844,7 @@ int ChromeBrowserMainParts::PreEarlyInitialization() {
@@ -842,7 +843,7 @@ int ChromeBrowserMainParts::PreEarlyInitialization() {
return content::RESULT_CODE_NORMAL_EXIT;
}
@@ -261,7 +261,7 @@ index d202767ab4f3f..41106d7b31e43 100644
// If we are running stale binaries then relaunch and exit immediately.
if (upgrade_util::IsRunningOldChrome()) {
if (!upgrade_util::RelaunchChromeBrowser(
@@ -856,7 +857,7 @@ int ChromeBrowserMainParts::PreEarlyInitialization() {
@@ -855,7 +856,7 @@ int ChromeBrowserMainParts::PreEarlyInitialization() {
// result in browser startup bailing.
return chrome::RESULT_CODE_NORMAL_EXIT_UPGRADE_RELAUNCHED;
}
@@ -270,7 +270,7 @@ index d202767ab4f3f..41106d7b31e43 100644
return load_local_state_result;
}
@@ -961,7 +962,7 @@ int ChromeBrowserMainParts::OnLocalStateLoaded(
@@ -965,7 +966,7 @@ int ChromeBrowserMainParts::OnLocalStateLoaded(
browser_process_->local_state());
platform_management_service->RefreshCache(base::NullCallback());
@@ -279,7 +279,7 @@ index d202767ab4f3f..41106d7b31e43 100644
if (first_run::IsChromeFirstRun()) {
bool stats_default;
if (GoogleUpdateSettings::GetCollectStatsConsentDefault(&stats_default)) {
@@ -974,7 +975,7 @@ int ChromeBrowserMainParts::OnLocalStateLoaded(
@@ -978,7 +979,7 @@ int ChromeBrowserMainParts::OnLocalStateLoaded(
: metrics::EnableMetricsDefault::OPT_IN);
}
}
@@ -288,7 +288,7 @@ index d202767ab4f3f..41106d7b31e43 100644
std::string locale =
startup_data_->chrome_feature_list_creator()->actual_locale();
@@ -1007,6 +1008,7 @@ int ChromeBrowserMainParts::ApplyFirstRunPrefs() {
@@ -1011,6 +1012,7 @@ int ChromeBrowserMainParts::ApplyFirstRunPrefs() {
#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH)
master_prefs_ = std::make_unique<first_run::MasterPrefs>();
@@ -296,7 +296,7 @@ index d202767ab4f3f..41106d7b31e43 100644
std::unique_ptr<installer::InitialPreferences> installer_initial_prefs =
startup_data_->chrome_feature_list_creator()->TakeInitialPrefs();
if (!installer_initial_prefs)
@@ -1040,6 +1042,7 @@ int ChromeBrowserMainParts::ApplyFirstRunPrefs() {
@@ -1044,6 +1046,7 @@ int ChromeBrowserMainParts::ApplyFirstRunPrefs() {
master_prefs_->confirm_to_quit);
}
#endif // BUILDFLAG(IS_MAC)
@@ -304,7 +304,7 @@ index d202767ab4f3f..41106d7b31e43 100644
#endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH)
return content::RESULT_CODE_NORMAL_EXIT;
}
@@ -1112,6 +1115,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
@@ -1105,6 +1108,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
browser_process_->browser_policy_connector()->OnResourceBundleCreated();
@@ -312,7 +312,7 @@ index d202767ab4f3f..41106d7b31e43 100644
// Android does first run in Java instead of native.
// Chrome OS has its own out-of-box-experience code.
#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH)
@@ -1133,6 +1137,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
@@ -1126,6 +1130,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
#endif // BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
}
#endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH)
@@ -320,7 +320,7 @@ index d202767ab4f3f..41106d7b31e43 100644
#if BUILDFLAG(IS_MAC)
#if defined(ARCH_CPU_X86_64)
@@ -1504,6 +1509,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1497,6 +1502,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
browser_process_->PreMainMessageLoopRun();
#if BUILDFLAG(IS_WIN)
@@ -328,7 +328,7 @@ index d202767ab4f3f..41106d7b31e43 100644
// If the command line specifies 'uninstall' then we need to work here
// unless we detect another chrome browser running.
if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kUninstall)) {
@@ -1515,6 +1521,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1508,6 +1514,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
return ChromeBrowserMainPartsWin::HandleIconsCommands(
*base::CommandLine::ForCurrentProcess());
}
@@ -336,7 +336,7 @@ index d202767ab4f3f..41106d7b31e43 100644
ui::SelectFileDialog::SetFactory(
std::make_unique<ChromeSelectFileDialogFactory>());
@@ -1537,6 +1544,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1530,6 +1537,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
}
#endif // BUILDFLAG(CHROME_FOR_TESTING)
@@ -344,7 +344,7 @@ index d202767ab4f3f..41106d7b31e43 100644
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kMakeDefaultBrowser)) {
bool is_managed = g_browser_process->local_state()->IsManagedPreference(
@@ -1550,18 +1558,22 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1543,18 +1551,22 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
? static_cast<int>(content::RESULT_CODE_NORMAL_EXIT)
: static_cast<int>(chrome::RESULT_CODE_SHELL_INTEGRATION_FAILED);
}
@@ -367,7 +367,7 @@ index d202767ab4f3f..41106d7b31e43 100644
#if !BUILDFLAG(IS_ANDROID) && BUILDFLAG(ENABLE_DOWNGRADE_PROCESSING)
// Begin relaunch processing immediately if User Data migration is required
@@ -1600,7 +1612,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1593,7 +1605,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
}
#endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS)
@@ -376,7 +376,7 @@ index d202767ab4f3f..41106d7b31e43 100644
// Check if there is any machine level Chrome installed on the current
// machine. If yes and the current Chrome process is user level, we do not
// allow the user level Chrome to run. So we notify the user and uninstall
@@ -1609,7 +1621,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1602,7 +1614,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
// obtained but before potentially creating the first run sentinel).
if (ChromeBrowserMainPartsWin::CheckMachineLevelInstall())
return chrome::RESULT_CODE_MACHINE_LEVEL_INSTALL_EXISTS;
@@ -385,7 +385,7 @@ index d202767ab4f3f..41106d7b31e43 100644
// Desktop construction occurs here, (required before profile creation).
PreProfileInit();
@@ -1682,6 +1694,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1675,6 +1687,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
// Call `PostProfileInit()`and set it up for profiles created later.
profile_init_manager_ = std::make_unique<ProfileInitManager>(this, profile);
@@ -393,7 +393,7 @@ index d202767ab4f3f..41106d7b31e43 100644
#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH)
// Execute first run specific code after the PrefService has been initialized
// and preferences have been registered since some of the import code depends
@@ -1721,6 +1734,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1714,6 +1727,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
*base::CommandLine::ForCurrentProcess());
}
#endif // BUILDFLAG(IS_WIN)
@@ -401,7 +401,7 @@ index d202767ab4f3f..41106d7b31e43 100644
// Configure modules that need access to resources.
net::NetModule::SetResourceProvider(ChromeNetResourceProvider);
@@ -1812,6 +1826,11 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1805,6 +1819,11 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
g_browser_process->profile_manager()->GetLastOpenedProfiles();
}
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
@@ -413,7 +413,7 @@ index d202767ab4f3f..41106d7b31e43 100644
// This step is costly.
if (browser_creator_->Start(*base::CommandLine::ForCurrentProcess(),
base::FilePath(), profile_info,
@@ -1844,11 +1863,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1837,11 +1856,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
// Create the RunLoop for MainMessageLoopRun() to use and transfer
// ownership of the browser's lifetime to the BrowserProcess.
@@ -465,7 +465,7 @@ index e26e3625c99c8..c0d4a95607e37 100644
+#endif
}
diff --git chrome/browser/chrome_content_browser_client.cc chrome/browser/chrome_content_browser_client.cc
index 25b5c325f612d..76fdebb99df6c 100644
index bfbdf8fcc8fa0..1872ee98bef6e 100644
--- chrome/browser/chrome_content_browser_client.cc
+++ chrome/browser/chrome_content_browser_client.cc
@@ -48,6 +48,7 @@
@@ -476,7 +476,7 @@ index 25b5c325f612d..76fdebb99df6c 100644
#include "chrome/browser/after_startup_task_utils.h"
#include "chrome/browser/ai/ai_manager_keyed_service_factory.h"
#include "chrome/browser/app_mode/app_mode_utils.h"
@@ -1516,6 +1517,8 @@ ChromeContentBrowserClient::GetPopupNavigationDelegateFactoryForTesting() {
@@ -1521,6 +1522,8 @@ ChromeContentBrowserClient::GetPopupNavigationDelegateFactoryForTesting() {
}
ChromeContentBrowserClient::ChromeContentBrowserClient() {
@@ -485,7 +485,7 @@ index 25b5c325f612d..76fdebb99df6c 100644
#if BUILDFLAG(ENABLE_PLUGINS)
extra_parts_.push_back(
std::make_unique<ChromeContentBrowserClientPluginsPart>());
@@ -1553,6 +1556,11 @@ ChromeContentBrowserClient::~ChromeContentBrowserClient() {
@@ -1558,6 +1561,11 @@ ChromeContentBrowserClient::~ChromeContentBrowserClient() {
}
}
@@ -497,7 +497,7 @@ index 25b5c325f612d..76fdebb99df6c 100644
// static
void ChromeContentBrowserClient::RegisterLocalStatePrefs(
PrefRegistrySimple* registry) {
@@ -4017,28 +4025,25 @@ bool UpdatePreferredColorScheme(WebPreferences* web_prefs,
@@ -3988,28 +3996,25 @@ bool UpdatePreferredColorScheme(WebPreferences* web_prefs,
web_prefs->preferred_color_scheme;
}
#else
@@ -543,7 +543,7 @@ index 25b5c325f612d..76fdebb99df6c 100644
#endif // BUILDFLAG(IS_ANDROID)
// Reauth WebUI doesn't support dark mode yet because it shares the dialog
@@ -4794,9 +4799,11 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated(
@@ -4766,9 +4771,11 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated(
&search::HandleNewTabURLReverseRewrite);
#endif // BUILDFLAG(IS_ANDROID)
@@ -555,7 +555,7 @@ index 25b5c325f612d..76fdebb99df6c 100644
}
base::FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() {
@@ -6903,7 +6910,7 @@ void ChromeContentBrowserClient::OnNetworkServiceCreated(
@@ -6905,7 +6912,7 @@ void ChromeContentBrowserClient::OnNetworkServiceCreated(
#endif
}
@@ -564,7 +564,7 @@ index 25b5c325f612d..76fdebb99df6c 100644
content::BrowserContext* context,
bool in_memory,
const base::FilePath& relative_partition_path,
@@ -6921,6 +6928,8 @@ void ChromeContentBrowserClient::ConfigureNetworkContextParams(
@@ -6923,6 +6930,8 @@ void ChromeContentBrowserClient::ConfigureNetworkContextParams(
network_context_params->user_agent = GetUserAgentBasedOnPolicy(context);
network_context_params->accept_language = GetApplicationLocale();
}
@@ -573,7 +573,7 @@ index 25b5c325f612d..76fdebb99df6c 100644
}
std::vector<base::FilePath>
@@ -8087,11 +8096,11 @@ void ChromeContentBrowserClient::OnKeepaliveRequestStarted(
@@ -8085,11 +8094,11 @@ void ChromeContentBrowserClient::OnKeepaliveRequestStarted(
const auto now = base::TimeTicks::Now();
const auto timeout = GetKeepaliveTimerTimeout(context);
keepalive_deadline_ = std::max(keepalive_deadline_, now + timeout);
@@ -587,7 +587,7 @@ index 25b5c325f612d..76fdebb99df6c 100644
FROM_HERE, keepalive_deadline_ - now,
base::BindOnce(
&ChromeContentBrowserClient::OnKeepaliveTimerFired,
@@ -8113,7 +8122,8 @@ void ChromeContentBrowserClient::OnKeepaliveRequestFinished() {
@@ -8111,7 +8120,8 @@ void ChromeContentBrowserClient::OnKeepaliveRequestFinished() {
--num_keepalive_requests_;
if (num_keepalive_requests_ == 0) {
DVLOG(1) << "Stopping the keepalive timer";
@@ -597,7 +597,7 @@ index 25b5c325f612d..76fdebb99df6c 100644
// This deletes the keep alive handle attached to the timer function and
// unblock the shutdown sequence.
}
@@ -8288,7 +8298,7 @@ void ChromeContentBrowserClient::OnKeepaliveTimerFired(
@@ -8285,7 +8295,7 @@ void ChromeContentBrowserClient::OnKeepaliveTimerFired(
const auto now = base::TimeTicks::Now();
const auto then = keepalive_deadline_;
if (now < then) {
@@ -607,10 +607,10 @@ index 25b5c325f612d..76fdebb99df6c 100644
base::BindOnce(&ChromeContentBrowserClient::OnKeepaliveTimerFired,
weak_factory_.GetWeakPtr(),
diff --git chrome/browser/chrome_content_browser_client.h chrome/browser/chrome_content_browser_client.h
index 5d587e8473cb2..5fd83e7515ba5 100644
index d0985c14449a3..9785793aa5630 100644
--- chrome/browser/chrome_content_browser_client.h
+++ chrome/browser/chrome_content_browser_client.h
@@ -148,6 +148,8 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
@@ -149,6 +149,8 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
~ChromeContentBrowserClient() override;
@@ -619,7 +619,7 @@ index 5d587e8473cb2..5fd83e7515ba5 100644
// TODO(crbug.com/41356866): This file is about calls from content/ out
// to chrome/ to get values or notify about events, but both of these
// functions are from chrome/ to chrome/ and don't involve content/ at all.
@@ -716,7 +718,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
@@ -713,7 +715,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
override;
void OnNetworkServiceCreated(
network::mojom::NetworkService* network_service) override;
@@ -628,7 +628,7 @@ index 5d587e8473cb2..5fd83e7515ba5 100644
content::BrowserContext* context,
bool in_memory,
const base::FilePath& relative_partition_path,
@@ -1274,7 +1276,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
@@ -1276,7 +1278,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
#if !BUILDFLAG(IS_ANDROID)
uint64_t num_keepalive_requests_ = 0;
@@ -638,7 +638,7 @@ index 5d587e8473cb2..5fd83e7515ba5 100644
#endif
diff --git chrome/browser/prefs/browser_prefs.cc chrome/browser/prefs/browser_prefs.cc
index 7d352058fb59f..b8601eadec6e5 100644
index 3e27913d47dc7..b727904f17ae6 100644
--- chrome/browser/prefs/browser_prefs.cc
+++ chrome/browser/prefs/browser_prefs.cc
@@ -16,6 +16,7 @@
@@ -649,7 +649,7 @@ index 7d352058fb59f..b8601eadec6e5 100644
#include "chrome/browser/about_flags.h"
#include "chrome/browser/accessibility/accessibility_labels_service.h"
#include "chrome/browser/accessibility/invert_bubble_prefs.h"
@@ -209,6 +210,10 @@
@@ -212,6 +213,10 @@
#include "extensions/browser/pref_names.h"
#endif // BUILDFLAG(ENABLE_EXTENSIONS_CORE)
@@ -660,7 +660,7 @@ index 7d352058fb59f..b8601eadec6e5 100644
#if BUILDFLAG(ENABLE_EXTENSIONS)
#include "chrome/browser/accessibility/animation_policy_prefs.h"
#include "chrome/browser/apps/platform_apps/shortcut_manager.h"
@@ -1851,7 +1856,8 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
@@ -1888,7 +1893,8 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
#endif // BUILDFLAG(GOOGLE_CHROME_BRANDING)
#endif // BUILDFLAG(IS_WIN)
@@ -670,7 +670,7 @@ index 7d352058fb59f..b8601eadec6e5 100644
downgrade::RegisterPrefs(registry);
#endif
@@ -1904,6 +1910,11 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
@@ -1941,6 +1947,11 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
// This is intentionally last.
RegisterLocalStatePrefsForMigration(registry);
@@ -682,7 +682,7 @@ index 7d352058fb59f..b8601eadec6e5 100644
}
// Register prefs applicable to all profiles.
@@ -2354,6 +2365,10 @@ void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
@@ -2390,6 +2401,10 @@ void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
const std::string& locale) {
RegisterProfilePrefs(registry, locale);

View File

@@ -1,5 +1,5 @@
diff --git chrome/browser/ui/browser_command_controller.cc chrome/browser/ui/browser_command_controller.cc
index ec7c90dc23958..0fa7a7110cf43 100644
index 14e7065d7dbd6..b01501b4253a3 100644
--- chrome/browser/ui/browser_command_controller.cc
+++ chrome/browser/ui/browser_command_controller.cc
@@ -414,6 +414,7 @@ bool BrowserCommandController::ExecuteCommandWithDisposition(
@@ -24,7 +24,7 @@ index ec7c90dc23958..0fa7a7110cf43 100644
// The order of commands in this switch statement must match the function
// declaration order in browser.h!
switch (id) {
@@ -1203,11 +1211,13 @@ void BrowserCommandController::TabRestoreServiceLoaded(
@@ -1207,11 +1215,13 @@ void BrowserCommandController::TabRestoreServiceLoaded(
// BrowserCommandController, private:
bool BrowserCommandController::IsShowingMainUI() {
@@ -41,10 +41,10 @@ index ec7c90dc23958..0fa7a7110cf43 100644
void BrowserCommandController::InitCommandState() {
diff --git chrome/browser/ui/toolbar/app_menu_model.cc chrome/browser/ui/toolbar/app_menu_model.cc
index 7afe8d7942faf..17c0947c5576e 100644
index 32f5ef6e5ac36..6b82915434afe 100644
--- chrome/browser/ui/toolbar/app_menu_model.cc
+++ chrome/browser/ui/toolbar/app_menu_model.cc
@@ -715,10 +715,12 @@ FindAndEditSubMenuModel::FindAndEditSubMenuModel(
@@ -717,10 +717,12 @@ FindAndEditSubMenuModel::FindAndEditSubMenuModel(
ui::SimpleMenuModel::Delegate* delegate)
: SimpleMenuModel(delegate) {
AddItemWithStringIdAndVectorIcon(this, IDC_FIND, IDS_FIND, kSearchMenuIcon);
@@ -57,7 +57,7 @@ index 7afe8d7942faf..17c0947c5576e 100644
}
class SaveAndShareSubMenuModel : public ui::SimpleMenuModel {
@@ -783,6 +785,57 @@ SaveAndShareSubMenuModel::SaveAndShareSubMenuModel(
@@ -785,6 +787,57 @@ SaveAndShareSubMenuModel::SaveAndShareSubMenuModel(
}
}
@@ -115,7 +115,7 @@ index 7afe8d7942faf..17c0947c5576e 100644
} // namespace
////////////////////////////////////////////////////////////////////////////////
@@ -1700,7 +1753,7 @@ bool AppMenuModel::IsCommandIdChecked(int command_id) const {
@@ -1701,7 +1754,7 @@ bool AppMenuModel::IsCommandIdChecked(int command_id) const {
return false;
}
@@ -124,7 +124,7 @@ index 7afe8d7942faf..17c0947c5576e 100644
GlobalError* error =
GlobalErrorServiceFactory::GetForProfile(browser_->profile())
->GetGlobalErrorByMenuItemCommandID(command_id);
@@ -1716,6 +1769,30 @@ bool AppMenuModel::IsCommandIdEnabled(int command_id) const {
@@ -1717,6 +1770,30 @@ bool AppMenuModel::IsCommandIdEnabled(int command_id) const {
}
}
@@ -155,7 +155,7 @@ index 7afe8d7942faf..17c0947c5576e 100644
bool AppMenuModel::IsCommandIdAlerted(int command_id) const {
if (command_id == IDC_VIEW_PASSWORDS ||
command_id == IDC_SHOW_PASSWORD_MANAGER) {
@@ -1872,8 +1949,10 @@ void AppMenuModel::Build() {
@@ -1873,8 +1950,10 @@ void AppMenuModel::Build() {
IDS_CLEAR_BROWSING_DATA,
kTrashCanRefreshIcon);
@@ -166,7 +166,7 @@ index 7afe8d7942faf..17c0947c5576e 100644
AddSeparator(ui::NORMAL_SEPARATOR);
AddItemWithStringIdAndVectorIcon(this, IDC_PRINT, IDS_PRINT, kPrintMenuIcon);
@@ -1969,6 +2048,11 @@ void AppMenuModel::Build() {
@@ -1977,6 +2056,11 @@ void AppMenuModel::Build() {
}
#endif // !BUILDFLAG(IS_CHROMEOS_ASH)
@@ -179,10 +179,10 @@ index 7afe8d7942faf..17c0947c5576e 100644
}
diff --git chrome/browser/ui/toolbar/app_menu_model.h chrome/browser/ui/toolbar/app_menu_model.h
index 84787f30b7b01..df979d0f711a0 100644
index 426ca35c4c814..247cfd2d99731 100644
--- chrome/browser/ui/toolbar/app_menu_model.h
+++ chrome/browser/ui/toolbar/app_menu_model.h
@@ -231,6 +231,7 @@ class AppMenuModel : public ui::SimpleMenuModel,
@@ -232,6 +232,7 @@ class AppMenuModel : public ui::SimpleMenuModel,
void ExecuteCommand(int command_id, int event_flags) override;
bool IsCommandIdChecked(int command_id) const override;
bool IsCommandIdEnabled(int command_id) const override;
@@ -190,7 +190,7 @@ index 84787f30b7b01..df979d0f711a0 100644
bool IsCommandIdAlerted(int command_id) const override;
bool IsElementIdAlerted(ui::ElementIdentifier element_id) const override;
bool GetAcceleratorForCommandId(int command_id,
@@ -271,6 +272,8 @@ class AppMenuModel : public ui::SimpleMenuModel,
@@ -272,6 +273,8 @@ class AppMenuModel : public ui::SimpleMenuModel,
void LogSafetyHubInteractionMetrics(safety_hub::SafetyHubModuleType sh_module,
int event_flags);
@@ -219,10 +219,10 @@ index 81455e1765477..7357122b31b1d 100644
return gfx::Rect();
}
diff --git chrome/browser/ui/views/frame/browser_frame.cc chrome/browser/ui/views/frame/browser_frame.cc
index cc1dbe6666468..c41b6e9cc4803 100644
index 711d389229e08..780e1b9201c72 100644
--- chrome/browser/ui/views/frame/browser_frame.cc
+++ chrome/browser/ui/views/frame/browser_frame.cc
@@ -112,15 +112,25 @@ ui::ColorProviderKey::SchemeVariant GetSchemeVariant(
@@ -115,15 +115,25 @@ ui::ColorProviderKey::SchemeVariant GetSchemeVariant(
////////////////////////////////////////////////////////////////////////////////
// BrowserFrame, public:
@@ -250,7 +250,7 @@ index cc1dbe6666468..c41b6e9cc4803 100644
}
BrowserFrame::~BrowserFrame() {}
@@ -226,10 +236,20 @@ void BrowserFrame::LayoutWebAppWindowTitle(
@@ -229,10 +239,20 @@ void BrowserFrame::LayoutWebAppWindowTitle(
}
int BrowserFrame::GetTopInset() const {
@@ -271,7 +271,7 @@ index cc1dbe6666468..c41b6e9cc4803 100644
browser_frame_view_->UpdateThrobber(running);
}
@@ -238,6 +258,8 @@ BrowserNonClientFrameView* BrowserFrame::GetFrameView() const {
@@ -241,6 +261,8 @@ BrowserNonClientFrameView* BrowserFrame::GetFrameView() const {
}
bool BrowserFrame::UseCustomFrame() const {
@@ -280,7 +280,7 @@ index cc1dbe6666468..c41b6e9cc4803 100644
return native_browser_frame_->UseCustomFrame();
}
@@ -252,20 +274,30 @@ bool BrowserFrame::ShouldDrawFrameHeader() const {
@@ -255,20 +277,30 @@ bool BrowserFrame::ShouldDrawFrameHeader() const {
void BrowserFrame::GetWindowPlacement(
gfx::Rect* bounds,
ui::mojom::WindowShowState* show_state) const {
@@ -311,7 +311,7 @@ index cc1dbe6666468..c41b6e9cc4803 100644
browser_frame_view_->OnBrowserViewInitViewsComplete();
}
@@ -366,6 +398,8 @@ ui::ColorProviderKey::ThemeInitializerSupplier* BrowserFrame::GetCustomTheme()
@@ -369,6 +401,8 @@ ui::ColorProviderKey::ThemeInitializerSupplier* BrowserFrame::GetCustomTheme()
}
void BrowserFrame::OnNativeWidgetWorkspaceChanged() {
@@ -320,7 +320,7 @@ index cc1dbe6666468..c41b6e9cc4803 100644
chrome::SaveWindowWorkspace(browser_view_->browser(), GetWorkspace());
chrome::SaveWindowVisibleOnAllWorkspaces(browser_view_->browser(),
IsVisibleOnAllWorkspaces());
@@ -572,6 +606,13 @@ void BrowserFrame::SelectNativeTheme() {
@@ -575,6 +609,13 @@ void BrowserFrame::SelectNativeTheme() {
return;
}
@@ -334,7 +334,7 @@ index cc1dbe6666468..c41b6e9cc4803 100644
// Ignore the system theme for web apps with window-controls-overlay as the
// display_override so the web contents can blend with the overlay by using
// the developer-provided theme color for a better experience. Context:
@@ -637,5 +678,8 @@ bool BrowserFrame::RegenerateFrameOnThemeChange(
@@ -640,5 +681,8 @@ bool BrowserFrame::RegenerateFrameOnThemeChange(
}
bool BrowserFrame::IsIncognitoBrowser() const {
@@ -344,7 +344,7 @@ index cc1dbe6666468..c41b6e9cc4803 100644
return browser_view_->browser()->profile()->IsIncognitoProfile();
}
diff --git chrome/browser/ui/views/frame/browser_frame.h chrome/browser/ui/views/frame/browser_frame.h
index 3d8a15049d4d2..66c4789581fe1 100644
index 532705a04c47b..0272f27596df6 100644
--- chrome/browser/ui/views/frame/browser_frame.h
+++ chrome/browser/ui/views/frame/browser_frame.h
@@ -59,6 +59,7 @@ enum class TabDragKind {
@@ -364,7 +364,7 @@ index 3d8a15049d4d2..66c4789581fe1 100644
// views::Widget:
views::internal::RootView* CreateRootView() override;
@@ -172,22 +173,26 @@ class BrowserFrame : public views::Widget, public views::ContextMenuController {
@@ -171,22 +172,26 @@ class BrowserFrame : public views::Widget, public views::ContextMenuController {
void SetTabDragKind(TabDragKind tab_drag_kind);
TabDragKind tab_drag_kind() const { return tab_drag_kind_; }
@@ -397,10 +397,10 @@ index 3d8a15049d4d2..66c4789581fe1 100644
// regenerated.
bool RegenerateFrameOnThemeChange(BrowserThemeChangeType theme_change_type);
diff --git chrome/browser/ui/views/frame/browser_view.cc chrome/browser/ui/views/frame/browser_view.cc
index 3944e4463304d..9f09d246c0b6a 100644
index 6b2a34b446ccc..dac6671a44dab 100644
--- chrome/browser/ui/views/frame/browser_view.cc
+++ chrome/browser/ui/views/frame/browser_view.cc
@@ -361,10 +361,6 @@ constexpr base::FeatureParam<base::TimeDelta> kLoadingTabAnimationFrameDelay = {
@@ -366,10 +366,6 @@ constexpr base::FeatureParam<base::TimeDelta> kLoadingTabAnimationFrameDelay = {
&kChangeFrameRateOfLoadingTabAnimation, "loading_tab_animation_frame_delay",
base::Milliseconds(30)};
@@ -408,10 +408,10 @@ index 3944e4463304d..9f09d246c0b6a 100644
-// locate this object using just the handle.
-const char* const kBrowserViewKey = "__BROWSER_VIEW__";
-
#if BUILDFLAG(IS_CHROMEOS)
#if BUILDFLAG(IS_CHROMEOS_ASH)
// UMA histograms that record animation smoothness for tab loading animation.
constexpr char kTabLoadingSmoothnessHistogramName[] =
@@ -764,6 +760,14 @@ class BrowserViewLayoutDelegateImpl : public BrowserViewLayoutDelegate {
@@ -769,6 +765,14 @@ class BrowserViewLayoutDelegateImpl : public BrowserViewLayoutDelegate {
return browser_view_->frame()->GetTopInset() - browser_view_->y();
}
@@ -426,7 +426,7 @@ index 3944e4463304d..9f09d246c0b6a 100644
bool IsToolbarVisible() const override {
return browser_view_->IsToolbarVisible();
}
@@ -915,11 +919,21 @@ class BrowserView::AccessibilityModeObserver : public ui::AXModeObserver {
@@ -920,11 +924,21 @@ class BrowserView::AccessibilityModeObserver : public ui::AXModeObserver {
///////////////////////////////////////////////////////////////////////////////
// BrowserView, public:
@@ -449,7 +449,7 @@ index 3944e4463304d..9f09d246c0b6a 100644
SetShowIcon(
::ShouldShowWindowIcon(browser_.get(), AppUsesWindowControlsOverlay()));
@@ -1009,8 +1023,15 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
@@ -1014,8 +1028,15 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
contents_container->SetLayoutManager(std::make_unique<ContentsLayoutManager>(
devtools_web_view_, contents_web_view_, watermark_view_));
@@ -467,7 +467,7 @@ index 3944e4463304d..9f09d246c0b6a 100644
contents_separator_ =
top_container_->AddChildView(std::make_unique<ContentsSeparator>());
@@ -1094,7 +1115,9 @@ void BrowserView::ToggleCompactModeUI() {
@@ -1095,7 +1116,9 @@ void BrowserView::ToggleCompactModeUI() {
}
BrowserView::~BrowserView() {
@@ -477,7 +477,7 @@ index 3944e4463304d..9f09d246c0b6a 100644
// Destroy the top controls slide controller first as it depends on the
// tabstrip model and the browser frame.
@@ -1102,7 +1125,9 @@ BrowserView::~BrowserView() {
@@ -1103,7 +1126,9 @@ BrowserView::~BrowserView() {
// All the tabs should have been destroyed already. If we were closed by the
// OS with some tabs than the NativeBrowserFrame should have destroyed them.
@@ -487,7 +487,7 @@ index 3944e4463304d..9f09d246c0b6a 100644
// Stop the animation timer explicitly here to avoid running it in a nested
// message loop, which may run by Browser destructor.
@@ -1111,17 +1136,18 @@ BrowserView::~BrowserView() {
@@ -1112,17 +1137,18 @@ BrowserView::~BrowserView() {
// Immersive mode may need to reparent views before they are removed/deleted.
immersive_mode_controller_.reset();
@@ -510,7 +510,7 @@ index 3944e4463304d..9f09d246c0b6a 100644
// These are raw pointers to child views, so they need to be set to null
// before `RemoveAllChildViews()` is called to avoid dangling.
@@ -1702,6 +1728,16 @@ gfx::Point BrowserView::GetThemeOffsetFromBrowserView() const {
@@ -1703,6 +1729,16 @@ gfx::Point BrowserView::GetThemeOffsetFromBrowserView() const {
ThemeProperties::kFrameHeightAboveTabs - browser_view_origin.y());
}
@@ -527,7 +527,7 @@ index 3944e4463304d..9f09d246c0b6a 100644
// static:
BrowserView::DevToolsDockedPlacement BrowserView::GetDevToolsDockedPlacement(
const gfx::Rect& contents_webview_bounds,
@@ -2113,9 +2149,14 @@ void BrowserView::OnExclusiveAccessUserInput() {
@@ -2118,9 +2154,14 @@ void BrowserView::OnExclusiveAccessUserInput() {
bool BrowserView::ShouldHideUIForFullscreen() const {
// Immersive mode needs UI for the slide-down top panel.
@@ -543,7 +543,7 @@ index 3944e4463304d..9f09d246c0b6a 100644
return frame_->GetFrameView()->ShouldHideTopUIForFullscreen();
}
@@ -3297,7 +3338,8 @@ views::View* BrowserView::GetTopContainer() {
@@ -3308,7 +3349,8 @@ views::View* BrowserView::GetTopContainer() {
}
DownloadBubbleUIController* BrowserView::GetDownloadBubbleUIController() {
@@ -553,7 +553,7 @@ index 3944e4463304d..9f09d246c0b6a 100644
if (auto* download_button = toolbar_button_provider_->GetDownloadButton())
return download_button->bubble_controller();
return nullptr;
@@ -3865,7 +3907,8 @@ void BrowserView::ReparentTopContainerForEndOfImmersive() {
@@ -3876,7 +3918,8 @@ void BrowserView::ReparentTopContainerForEndOfImmersive() {
if (top_container()->parent() == this)
return;
@@ -563,7 +563,7 @@ index 3944e4463304d..9f09d246c0b6a 100644
top_container()->DestroyLayer();
AddChildViewAt(top_container(), 0);
EnsureFocusOrder();
@@ -4356,11 +4399,38 @@ void BrowserView::GetAccessiblePanes(std::vector<views::View*>* panes) {
@@ -4367,11 +4410,38 @@ void BrowserView::GetAccessiblePanes(std::vector<views::View*>* panes) {
bool BrowserView::ShouldDescendIntoChildForEventHandling(
gfx::NativeView child,
const gfx::Point& location) {
@@ -604,7 +604,7 @@ index 3944e4463304d..9f09d246c0b6a 100644
// Draggable regions are defined relative to the web contents.
gfx::Point point_in_contents_web_view_coords(location);
views::View::ConvertPointToTarget(GetWidget()->GetRootView(),
@@ -4369,7 +4439,7 @@ bool BrowserView::ShouldDescendIntoChildForEventHandling(
@@ -4380,7 +4450,7 @@ bool BrowserView::ShouldDescendIntoChildForEventHandling(
// Draggable regions should be ignored for clicks into any browser view's
// owned widgets, for example alerts, permission prompts or find bar.
@@ -613,7 +613,7 @@ index 3944e4463304d..9f09d246c0b6a 100644
point_in_contents_web_view_coords.x(),
point_in_contents_web_view_coords.y()) ||
WidgetOwnedByAnchorContainsPoint(point_in_contents_web_view_coords);
@@ -4480,8 +4550,10 @@ void BrowserView::Layout(PassKey) {
@@ -4491,8 +4561,10 @@ void BrowserView::Layout(PassKey) {
// TODO(jamescook): Why was this in the middle of layout code?
toolbar_->location_bar()->omnibox_view()->SetFocusBehavior(
@@ -626,7 +626,7 @@ index 3944e4463304d..9f09d246c0b6a 100644
// Some of the situations when the BrowserView is laid out are:
// - Enter/exit immersive fullscreen mode.
@@ -4547,6 +4619,11 @@ void BrowserView::AddedToWidget() {
@@ -4558,6 +4630,11 @@ void BrowserView::AddedToWidget() {
SetThemeProfileForWindow(GetNativeWindow(), browser_->profile());
#endif
@@ -638,7 +638,7 @@ index 3944e4463304d..9f09d246c0b6a 100644
toolbar_->Init();
// TODO(pbos): Investigate whether the side panels should be creatable when
@@ -4589,13 +4666,9 @@ void BrowserView::AddedToWidget() {
@@ -4600,13 +4677,9 @@ void BrowserView::AddedToWidget() {
EnsureFocusOrder();
@@ -654,7 +654,7 @@ index 3944e4463304d..9f09d246c0b6a 100644
using_native_frame_ = frame_->ShouldUseNativeFrame();
MaybeInitializeWebUITabStrip();
@@ -4964,7 +5037,8 @@ void BrowserView::ProcessFullscreen(bool fullscreen, const int64_t display_id) {
@@ -4979,7 +5052,8 @@ void BrowserView::ProcessFullscreen(bool fullscreen, const int64_t display_id) {
// Undo our anti-jankiness hacks and force a re-layout.
in_process_fullscreen_ = false;
ToolbarSizeChanged(false);
@@ -664,7 +664,7 @@ index 3944e4463304d..9f09d246c0b6a 100644
}
void BrowserView::RequestFullscreen(bool fullscreen, int64_t display_id) {
@@ -5448,6 +5522,8 @@ Profile* BrowserView::GetProfile() {
@@ -5485,6 +5559,8 @@ Profile* BrowserView::GetProfile() {
}
void BrowserView::UpdateUIForTabFullscreen() {
@@ -673,7 +673,7 @@ index 3944e4463304d..9f09d246c0b6a 100644
frame()->GetFrameView()->UpdateFullscreenTopUI();
}
@@ -5470,6 +5546,8 @@ void BrowserView::HideDownloadShelf() {
@@ -5507,6 +5583,8 @@ void BrowserView::HideDownloadShelf() {
}
bool BrowserView::CanUserExitFullscreen() const {
@@ -683,10 +683,10 @@ index 3944e4463304d..9f09d246c0b6a 100644
}
diff --git chrome/browser/ui/views/frame/browser_view.h chrome/browser/ui/views/frame/browser_view.h
index e02895e98e1ed..575b45ef62dab 100644
index b1d6f077fbd42..4a8929a509aaf 100644
--- chrome/browser/ui/views/frame/browser_view.h
+++ chrome/browser/ui/views/frame/browser_view.h
@@ -137,11 +137,16 @@ class BrowserView : public BrowserWindow,
@@ -139,11 +139,16 @@ class BrowserView : public BrowserWindow,
METADATA_HEADER(BrowserView, views::ClientView)
public:
@@ -703,7 +703,7 @@ index e02895e98e1ed..575b45ef62dab 100644
void set_frame(BrowserFrame* frame) {
frame_ = frame;
paint_as_active_subscription_ =
@@ -839,6 +844,10 @@ class BrowserView : public BrowserWindow,
@@ -840,6 +845,10 @@ class BrowserView : public BrowserWindow,
void Copy();
void Paste();
@@ -714,7 +714,7 @@ index e02895e98e1ed..575b45ef62dab 100644
protected:
// Enumerates where the devtools are docked relative to the browser's main
// web contents.
@@ -862,6 +871,8 @@ class BrowserView : public BrowserWindow,
@@ -863,6 +872,8 @@ class BrowserView : public BrowserWindow,
const gfx::Rect& contents_webview_bounds,
const gfx::Rect& local_webview_container_bounds);
@@ -724,7 +724,7 @@ index e02895e98e1ed..575b45ef62dab 100644
// Do not friend BrowserViewLayout. Use the BrowserViewLayoutDelegate
// interface to keep these two classes decoupled and testable.
diff --git chrome/browser/ui/views/frame/browser_view_layout.cc chrome/browser/ui/views/frame/browser_view_layout.cc
index 38064da1c8818..98ecdff6ce089 100644
index 148c255ec04d3..edce177e093ac 100644
--- chrome/browser/ui/views/frame/browser_view_layout.cc
+++ chrome/browser/ui/views/frame/browser_view_layout.cc
@@ -53,6 +53,10 @@
@@ -842,12 +842,12 @@ index 71445bfab1824..c77750ea2a820 100644
ContentsWebView::~ContentsWebView() {
diff --git chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc
index 961b599ffc364..92faacd1be534 100644
index 3489ec2810cdf..db6881a0e2923 100644
--- chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc
+++ chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc
@@ -602,6 +602,11 @@ PictureInPictureBrowserFrameView::PictureInPictureBrowserFrameView(
frame_background_ = std::make_unique<views::FrameBackground>();
}
@@ -618,6 +618,11 @@ PictureInPictureBrowserFrameView::PictureInPictureBrowserFrameView(
return window->GetProperty(chromeos::kWindowStateTypeKey);
})));
#endif
+
+ if (!browser_view->browser()->SupportsWindowFeature(
@@ -857,7 +857,7 @@ index 961b599ffc364..92faacd1be534 100644
}
PictureInPictureBrowserFrameView::~PictureInPictureBrowserFrameView() {
@@ -729,18 +734,42 @@ gfx::Rect PictureInPictureBrowserFrameView::GetWindowBoundsForClientBounds(
@@ -745,18 +750,42 @@ gfx::Rect PictureInPictureBrowserFrameView::GetWindowBoundsForClientBounds(
int PictureInPictureBrowserFrameView::NonClientHitTest(
const gfx::Point& point) {
@@ -908,7 +908,7 @@ index 961b599ffc364..92faacd1be534 100644
// Allow dragging and resizing the window.
int window_component = GetHTComponentForFrame(
@@ -809,7 +838,8 @@ void PictureInPictureBrowserFrameView::Layout(PassKey) {
@@ -825,7 +854,8 @@ void PictureInPictureBrowserFrameView::Layout(PassKey) {
gfx::Rect content_area = GetLocalBounds();
content_area.Inset(FrameBorderInsets());
gfx::Rect top_bar = content_area;
@@ -918,7 +918,7 @@ index 961b599ffc364..92faacd1be534 100644
top_bar_container_view_->SetBoundsRect(top_bar);
#if !BUILDFLAG(IS_ANDROID)
if (auto_pip_setting_overlay_) {
@@ -1349,7 +1379,8 @@ gfx::Insets PictureInPictureBrowserFrameView::ResizeBorderInsets() const {
@@ -1371,7 +1401,8 @@ gfx::Insets PictureInPictureBrowserFrameView::ResizeBorderInsets() const {
}
int PictureInPictureBrowserFrameView::GetTopAreaHeight() const {
@@ -943,10 +943,10 @@ index 33c6444869375..d74818698d81a 100644
LocationBarView* location_bar_view = browser_view_->GetLocationBarView();
CHECK(location_bar_view);
diff --git chrome/browser/ui/views/page_action/page_action_icon_controller.cc chrome/browser/ui/views/page_action/page_action_icon_controller.cc
index ba726946aa3cd..e62fe9c21290a 100644
index 40993f5460555..3bf4fb49b71f3 100644
--- chrome/browser/ui/views/page_action/page_action_icon_controller.cc
+++ chrome/browser/ui/views/page_action/page_action_icon_controller.cc
@@ -97,6 +97,12 @@ void PageActionIconController::Init(const PageActionIconParams& params,
@@ -98,6 +98,12 @@ void PageActionIconController::Init(const PageActionIconParams& params,
};
for (PageActionIconType type : params.types_enabled) {
@@ -960,10 +960,10 @@ index ba726946aa3cd..e62fe9c21290a 100644
case PageActionIconType::kPaymentsOfferNotification:
add_page_action_icon(
diff --git chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
index 3cfed2fdd5acf..720b418456292 100644
index a80a496c99a26..7cb24bf8505de 100644
--- chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
+++ chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
@@ -605,29 +605,41 @@ gfx::Range BrowserTabStripController::ListTabsInGroup(
@@ -604,29 +604,41 @@ gfx::Range BrowserTabStripController::ListTabsInGroup(
}
bool BrowserTabStripController::IsFrameCondensed() const {
@@ -1006,10 +1006,10 @@ index 3cfed2fdd5acf..720b418456292 100644
}
diff --git chrome/browser/ui/views/toolbar/toolbar_view.cc chrome/browser/ui/views/toolbar/toolbar_view.cc
index b85883d5057b2..71835868d795b 100644
index 1b494d20b6342..c3eb67da3c3ba 100644
--- chrome/browser/ui/views/toolbar/toolbar_view.cc
+++ chrome/browser/ui/views/toolbar/toolbar_view.cc
@@ -186,7 +186,7 @@ class TabstripLikeBackground : public views::Background {
@@ -193,7 +193,7 @@ class TabstripLikeBackground : public views::Background {
void Paint(gfx::Canvas* canvas, views::View* view) const override {
bool painted = TopContainerBackground::PaintThemeCustomImage(canvas, view,
browser_view_);
@@ -1018,7 +1018,7 @@ index b85883d5057b2..71835868d795b 100644
SkColor frame_color =
browser_view_->frame()->GetFrameView()->GetFrameColor(
BrowserFrameActiveState::kUseCurrent);
@@ -217,12 +217,13 @@ END_METADATA
@@ -224,12 +224,13 @@ END_METADATA
////////////////////////////////////////////////////////////////////////////////
// ToolbarView, public:
@@ -1034,7 +1034,7 @@ index b85883d5057b2..71835868d795b 100644
SetID(VIEW_ID_TOOLBAR);
container_view_ = AddChildView(std::make_unique<ContainerView>());
@@ -251,9 +252,24 @@ ToolbarView::~ToolbarView() {
@@ -258,9 +259,24 @@ ToolbarView::~ToolbarView() {
for (const auto& view_and_command : GetViewCommandMap())
chrome::RemoveCommandObserver(browser_, view_and_command.second, this);
@@ -1059,7 +1059,7 @@ index b85883d5057b2..71835868d795b 100644
#if defined(USE_AURA)
// Avoid generating too many occlusion tracking calculation events before this
// function returns. The occlusion status will be computed only once once this
@@ -276,12 +292,12 @@ void ToolbarView::Init() {
@@ -283,12 +299,12 @@ void ToolbarView::Init() {
auto location_bar = std::make_unique<LocationBarView>(
browser_, browser_->profile(), browser_->command_controller(), this,
@@ -1074,7 +1074,7 @@ index b85883d5057b2..71835868d795b 100644
download_button =
std::make_unique<DownloadToolbarButtonView>(browser_view_);
}
@@ -363,7 +379,8 @@ void ToolbarView::Init() {
@@ -370,7 +386,8 @@ void ToolbarView::Init() {
std::unique_ptr<media_router::CastToolbarButton> cast;
if (!(features::IsToolbarPinningEnabled() &&
base::FeatureList::IsEnabled(features::kPinnedCastButton))) {
@@ -1084,7 +1084,7 @@ index b85883d5057b2..71835868d795b 100644
cast = media_router::CastToolbarButton::Create(browser_);
}
}
@@ -376,7 +393,8 @@ void ToolbarView::Init() {
@@ -383,7 +400,8 @@ void ToolbarView::Init() {
std::unique_ptr<send_tab_to_self::SendTabToSelfToolbarIconView>
send_tab_to_self_button;
@@ -1094,7 +1094,7 @@ index b85883d5057b2..71835868d795b 100644
send_tab_to_self_button =
std::make_unique<send_tab_to_self::SendTabToSelfToolbarIconView>(
browser_view_);
@@ -836,7 +854,8 @@ void ToolbarView::Layout(PassKey) {
@@ -845,7 +863,8 @@ void ToolbarView::Layout(PassKey) {
if (display_mode_ == DisplayMode::NORMAL) {
LayoutCommon();
@@ -1105,10 +1105,10 @@ index b85883d5057b2..71835868d795b 100644
if (toolbar_controller_) {
diff --git chrome/browser/ui/views/toolbar/toolbar_view.h chrome/browser/ui/views/toolbar/toolbar_view.h
index 01dfd343c678a..2cfa5dd830fba 100644
index b02224437ad20..81f639f5faf9f 100644
--- chrome/browser/ui/views/toolbar/toolbar_view.h
+++ chrome/browser/ui/views/toolbar/toolbar_view.h
@@ -93,7 +93,8 @@ class ToolbarView : public views::AccessiblePaneView,
@@ -94,7 +94,8 @@ class ToolbarView : public views::AccessiblePaneView,
// needs to be displayed.
};

View File

@@ -1,8 +1,8 @@
diff --git chrome/browser/ui/views/sad_tab_view.cc chrome/browser/ui/views/sad_tab_view.cc
index 4c0f4df68c943..45867d8e99adb 100644
index 28a1b08d6c699..22a43d559bec9 100644
--- chrome/browser/ui/views/sad_tab_view.cc
+++ chrome/browser/ui/views/sad_tab_view.cc
@@ -699,6 +699,11 @@ void SadTabView::OnBoundsChanged(const gfx::Rect& previous_bounds) {
@@ -687,6 +687,11 @@ void SadTabView::OnBoundsChanged(const gfx::Rect& previous_bounds) {
title_->SizeToFit(max_width);
}

View File

@@ -54,8 +54,21 @@ index 09d80f2ba678d..5dbff44c280a1 100644
public:
explicit SyntheticGestureTargetBase(RenderWidgetHostImpl* host);
diff --git content/common/content_switches_internal.h content/common/content_switches_internal.h
index 6af484f35f576..2462700b6d1fb 100644
--- content/common/content_switches_internal.h
+++ content/common/content_switches_internal.h
@@ -15,7 +15,7 @@ class CommandLine;
namespace content {
-bool IsPinchToZoomEnabled();
+CONTENT_EXPORT bool IsPinchToZoomEnabled();
blink::mojom::V8CacheOptions GetV8CacheOptions();
diff --git third_party/blink/renderer/controller/BUILD.gn third_party/blink/renderer/controller/BUILD.gn
index 624070f85e40b..2f0a5e6501f4d 100644
index 6ff75a6bb03e7..938113ef46a0d 100644
--- third_party/blink/renderer/controller/BUILD.gn
+++ third_party/blink/renderer/controller/BUILD.gn
@@ -38,6 +38,7 @@ component("controller") {
@@ -76,7 +89,7 @@ index 624070f85e40b..2f0a5e6501f4d 100644
if (is_linux || is_chromeos) {
diff --git ui/events/keycodes/BUILD.gn ui/events/keycodes/BUILD.gn
index 4f4fbfb769cf8..a794da2d8343b 100644
index 9cdd599f0d739..23d1ff5cc30fc 100644
--- ui/events/keycodes/BUILD.gn
+++ ui/events/keycodes/BUILD.gn
@@ -19,6 +19,8 @@ source_set("xkb") {
@@ -87,7 +100,7 @@ index 4f4fbfb769cf8..a794da2d8343b 100644
+
deps = [
"//base",
"//ui/events:dom_keycode_converter",
"//build:chromeos_buildflags",
diff --git ui/events/keycodes/keyboard_code_conversion_xkb.h ui/events/keycodes/keyboard_code_conversion_xkb.h
index 5693e3a1c4bc4..88c0cc6d59098 100644
--- ui/events/keycodes/keyboard_code_conversion_xkb.h

View File

@@ -1,5 +1,5 @@
diff --git content/browser/devtools/devtools_http_handler.cc content/browser/devtools/devtools_http_handler.cc
index ab719bac2aa24..b2b3b240bcd6c 100644
index 11c9cd82d0392..9c700bc625cd5 100644
--- content/browser/devtools/devtools_http_handler.cc
+++ content/browser/devtools/devtools_http_handler.cc
@@ -598,7 +598,7 @@ void DevToolsHttpHandler::OnJsonRequest(
@@ -12,10 +12,10 @@ index ab719bac2aa24..b2b3b240bcd6c 100644
version.Set("V8-Version", V8_VERSION_STRING);
std::string host = info.GetHeaderValue("host");
diff --git content/browser/loader/navigation_url_loader_impl.cc content/browser/loader/navigation_url_loader_impl.cc
index f9fd6c73e21d5..1cf4e38bebde7 100644
index 0852fba0c4352..173c5724c6e9c 100644
--- content/browser/loader/navigation_url_loader_impl.cc
+++ content/browser/loader/navigation_url_loader_impl.cc
@@ -862,7 +862,7 @@ NavigationURLLoaderImpl::CreateNonNetworkLoaderFactory(
@@ -863,7 +863,7 @@ NavigationURLLoaderImpl::CreateNonNetworkLoaderFactory(
mojo::PendingRemote<network::mojom::URLLoaderFactory>
terminal_external_protocol;
bool handled = GetContentClient()->browser()->HandleExternalProtocol(
@@ -24,7 +24,7 @@ index f9fd6c73e21d5..1cf4e38bebde7 100644
frame_tree_node->frame_tree_node_id(), navigation_ui_data,
request_info.is_primary_main_frame,
frame_tree_node->IsInFencedFrameTree(), request_info.sandbox_flags,
@@ -874,6 +874,21 @@ NavigationURLLoaderImpl::CreateNonNetworkLoaderFactory(
@@ -875,6 +875,21 @@ NavigationURLLoaderImpl::CreateNonNetworkLoaderFactory(
*request_info.initiator_document_token)
: nullptr,
request_info.isolation_info, &terminal_external_protocol);
@@ -47,10 +47,10 @@ index f9fd6c73e21d5..1cf4e38bebde7 100644
return std::make_pair(
/*is_cacheable=*/false,
diff --git content/public/browser/content_browser_client.cc content/public/browser/content_browser_client.cc
index a1b6aad3587e7..1ad9c4b2e50ad 100644
index b80b9e005c94e..313579c039744 100644
--- content/public/browser/content_browser_client.cc
+++ content/public/browser/content_browser_client.cc
@@ -1150,7 +1150,7 @@ ContentBrowserClient::CreateURLLoaderHandlerForServiceWorkerNavigationPreload(
@@ -1138,7 +1138,7 @@ ContentBrowserClient::CreateURLLoaderHandlerForServiceWorkerNavigationPreload(
void ContentBrowserClient::OnNetworkServiceCreated(
network::mojom::NetworkService* network_service) {}
@@ -59,7 +59,7 @@ index a1b6aad3587e7..1ad9c4b2e50ad 100644
BrowserContext* context,
bool in_memory,
const base::FilePath& relative_partition_path,
@@ -1159,6 +1159,7 @@ void ContentBrowserClient::ConfigureNetworkContextParams(
@@ -1147,6 +1147,7 @@ void ContentBrowserClient::ConfigureNetworkContextParams(
cert_verifier_creation_params) {
network_context_params->user_agent = GetUserAgentBasedOnPolicy(context);
network_context_params->accept_language = "en-us,en";
@@ -68,10 +68,10 @@ index a1b6aad3587e7..1ad9c4b2e50ad 100644
std::vector<base::FilePath>
diff --git content/public/browser/content_browser_client.h content/public/browser/content_browser_client.h
index 4d96255c40a8e..476bb6d52a68e 100644
index eadc4ffef8055..d23b45b3ecc74 100644
--- content/public/browser/content_browser_client.h
+++ content/public/browser/content_browser_client.h
@@ -1352,6 +1352,12 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -1329,6 +1329,12 @@ class CONTENT_EXPORT ContentBrowserClient {
bool opener_suppressed,
bool* no_javascript_access);
@@ -84,7 +84,7 @@ index 4d96255c40a8e..476bb6d52a68e 100644
// Allows the embedder to return a delegate for the SpeechRecognitionManager.
// The delegate will be owned by the manager. It's valid to return nullptr.
virtual SpeechRecognitionManagerDelegate*
@@ -2203,7 +2209,7 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -2188,7 +2194,7 @@ class CONTENT_EXPORT ContentBrowserClient {
//
// If |relative_partition_path| is the empty string, it means this needs to
// create the default NetworkContext for the BrowserContext.
@@ -93,7 +93,7 @@ index 4d96255c40a8e..476bb6d52a68e 100644
BrowserContext* context,
bool in_memory,
const base::FilePath& relative_partition_path,
@@ -2427,6 +2433,22 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -2412,6 +2418,22 @@ class CONTENT_EXPORT ContentBrowserClient {
const net::IsolationInfo& isolation_info,
mojo::PendingRemote<network::mojom::URLLoaderFactory>* out_factory);
@@ -116,7 +116,7 @@ index 4d96255c40a8e..476bb6d52a68e 100644
// Creates an OverlayWindow to be used for video or Picture-in-Picture.
// This window will house the content shown when in Picture-in-Picture mode.
// This will return a new OverlayWindow.
@@ -2487,6 +2509,10 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -2472,6 +2494,10 @@ class CONTENT_EXPORT ContentBrowserClient {
// Used as part of the user agent string.
virtual std::string GetProduct();
@@ -128,7 +128,7 @@ index 4d96255c40a8e..476bb6d52a68e 100644
// on blink::features::kUserAgentReduction. Content may cache this value.
virtual std::string GetUserAgent();
diff --git content/public/renderer/content_renderer_client.h content/public/renderer/content_renderer_client.h
index 42c94f71f09cf..853c508260f08 100644
index 784e0a5166d6b..1fd1e9ee107f3 100644
--- content/public/renderer/content_renderer_client.h
+++ content/public/renderer/content_renderer_client.h
@@ -109,6 +109,9 @@ class CONTENT_EXPORT ContentRendererClient {
@@ -141,7 +141,7 @@ index 42c94f71f09cf..853c508260f08 100644
// Notifies that a new RenderFrame has been created.
virtual void RenderFrameCreated(RenderFrame* render_frame) {}
@@ -358,6 +361,10 @@ class CONTENT_EXPORT ContentRendererClient {
@@ -355,6 +358,10 @@ class CONTENT_EXPORT ContentRendererClient {
// This method may invalidate the frame.
virtual void RunScriptsAtDocumentIdle(RenderFrame* render_frame) {}
@@ -153,10 +153,10 @@ index 42c94f71f09cf..853c508260f08 100644
// started.
virtual void SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() {}
diff --git content/renderer/render_thread_impl.cc content/renderer/render_thread_impl.cc
index c848b7f8f7650..34fbb26f068e5 100644
index 15e28effa2cbf..eb25a1adb7f6c 100644
--- content/renderer/render_thread_impl.cc
+++ content/renderer/render_thread_impl.cc
@@ -594,6 +594,8 @@ void RenderThreadImpl::Init() {
@@ -568,6 +568,8 @@ void RenderThreadImpl::Init() {
GetContentClient()->renderer()->CreateURLLoaderThrottleProvider(
blink::URLLoaderThrottleProviderType::kFrame);
@@ -166,10 +166,10 @@ index c848b7f8f7650..34fbb26f068e5 100644
base::BindRepeating(&RenderThreadImpl::OnRendererInterfaceReceiver,
base::Unretained(this)));
diff --git content/renderer/renderer_blink_platform_impl.cc content/renderer/renderer_blink_platform_impl.cc
index 4547a080e0675..78f4530d1406a 100644
index c668742dfc869..9bb7b446e7fb8 100644
--- content/renderer/renderer_blink_platform_impl.cc
+++ content/renderer/renderer_blink_platform_impl.cc
@@ -1031,6 +1031,15 @@ SkBitmap* RendererBlinkPlatformImpl::GetSadPageBitmap() {
@@ -1032,6 +1032,15 @@ SkBitmap* RendererBlinkPlatformImpl::GetSadPageBitmap() {
//------------------------------------------------------------------------------
@@ -200,10 +200,10 @@ index 17c01a1f03ad4..33a484f412bba 100644
// plus eTLD+1, such as https://google.com), or to a more specific origin.
void SetIsLockedToSite();
diff --git content/shell/browser/shell_content_browser_client.cc content/shell/browser/shell_content_browser_client.cc
index 1390ea66ffe18..183a59f7566d7 100644
index 6c08727a74408..2efb3de40164d 100644
--- content/shell/browser/shell_content_browser_client.cc
+++ content/shell/browser/shell_content_browser_client.cc
@@ -765,7 +765,7 @@ void ShellContentBrowserClient::OnNetworkServiceCreated(
@@ -757,7 +757,7 @@ void ShellContentBrowserClient::OnNetworkServiceCreated(
#endif
}
@@ -212,7 +212,7 @@ index 1390ea66ffe18..183a59f7566d7 100644
BrowserContext* context,
bool in_memory,
const base::FilePath& relative_partition_path,
@@ -774,6 +774,7 @@ void ShellContentBrowserClient::ConfigureNetworkContextParams(
@@ -766,6 +766,7 @@ void ShellContentBrowserClient::ConfigureNetworkContextParams(
cert_verifier_creation_params) {
ConfigureNetworkContextParamsForShell(context, network_context_params,
cert_verifier_creation_params);
@@ -221,10 +221,10 @@ index 1390ea66ffe18..183a59f7566d7 100644
std::vector<base::FilePath>
diff --git content/shell/browser/shell_content_browser_client.h content/shell/browser/shell_content_browser_client.h
index c6683ea8084fc..6c203dbb21777 100644
index a2514c8a9f8a8..3266b8a0bd781 100644
--- content/shell/browser/shell_content_browser_client.h
+++ content/shell/browser/shell_content_browser_client.h
@@ -154,7 +154,7 @@ class ShellContentBrowserClient : public ContentBrowserClient {
@@ -150,7 +150,7 @@ class ShellContentBrowserClient : public ContentBrowserClient {
GetGeolocationSystemPermissionManager() override;
void OnNetworkServiceCreated(
network::mojom::NetworkService* network_service) override;
@@ -234,10 +234,10 @@ index c6683ea8084fc..6c203dbb21777 100644
bool in_memory,
const base::FilePath& relative_partition_path,
diff --git headless/lib/browser/headless_content_browser_client.cc headless/lib/browser/headless_content_browser_client.cc
index 0473210d9c3e6..631300399a748 100644
index d871e4d79774d..1faf20d69df19 100644
--- headless/lib/browser/headless_content_browser_client.cc
+++ headless/lib/browser/headless_content_browser_client.cc
@@ -390,7 +390,7 @@ bool HeadlessContentBrowserClient::IsCookieDeprecationLabelAllowedForContext(
@@ -362,7 +362,7 @@ bool HeadlessContentBrowserClient::IsSharedStorageSelectURLAllowed(
return true;
}
@@ -246,7 +246,7 @@ index 0473210d9c3e6..631300399a748 100644
content::BrowserContext* context,
bool in_memory,
const base::FilePath& relative_partition_path,
@@ -400,6 +400,7 @@ void HeadlessContentBrowserClient::ConfigureNetworkContextParams(
@@ -372,6 +372,7 @@ void HeadlessContentBrowserClient::ConfigureNetworkContextParams(
HeadlessBrowserContextImpl::From(context)->ConfigureNetworkContextParams(
in_memory, relative_partition_path, network_context_params,
cert_verifier_creation_params);
@@ -255,13 +255,13 @@ index 0473210d9c3e6..631300399a748 100644
std::string HeadlessContentBrowserClient::GetProduct() {
diff --git headless/lib/browser/headless_content_browser_client.h headless/lib/browser/headless_content_browser_client.h
index b3d871de1d6f4..e47394d1e9809 100644
index 8313eb0e4d6a9..7189e626cf5ed 100644
--- headless/lib/browser/headless_content_browser_client.h
+++ headless/lib/browser/headless_content_browser_client.h
@@ -111,7 +111,7 @@ class HeadlessContentBrowserClient : public content::ContentBrowserClient {
content::BrowserContext* browser_context,
const url::Origin& top_frame_origin,
const url::Origin& context_origin) override;
@@ -101,7 +101,7 @@ class HeadlessContentBrowserClient : public content::ContentBrowserClient {
std::string* out_debug_message,
bool* out_block_is_site_setting_specific) override;
- void ConfigureNetworkContextParams(
+ bool ConfigureNetworkContextParams(
content::BrowserContext* context,

View File

@@ -1,5 +1,5 @@
diff --git content/browser/renderer_host/navigation_policy_container_builder.cc content/browser/renderer_host/navigation_policy_container_builder.cc
index 5695fd36ce0e0..b109cefdeef6f 100644
index e1ca048945905..db386eca4d8d3 100644
--- content/browser/renderer_host/navigation_policy_container_builder.cc
+++ content/browser/renderer_host/navigation_policy_container_builder.cc
@@ -43,7 +43,6 @@ std::unique_ptr<PolicyContainerPolicies> GetInitiatorPolicies(

View File

@@ -112,7 +112,7 @@ index c37f18d794ae2..fd360f7698bcf 100644
}
diff --git content/app/content_main_runner_impl.cc content/app/content_main_runner_impl.cc
index 93957c7a15594..8e3e18a9c8992 100644
index 8fdd8d02e6496..436fbbdc4e4eb 100644
--- content/app/content_main_runner_impl.cc
+++ content/app/content_main_runner_impl.cc
@@ -52,6 +52,7 @@
@@ -123,7 +123,7 @@ index 93957c7a15594..8e3e18a9c8992 100644
#include "base/time/time.h"
#include "base/trace_event/trace_event.h"
#include "build/build_config.h"
@@ -1349,6 +1350,11 @@ void ContentMainRunnerImpl::Shutdown() {
@@ -1351,6 +1352,11 @@ void ContentMainRunnerImpl::Shutdown() {
is_shutdown_ = true;
}

View File

@@ -1,5 +1,5 @@
diff --git chrome/chrome_elf/BUILD.gn chrome/chrome_elf/BUILD.gn
index a6072f97ed578..25a64c29e9c34 100644
index 37e2d2a50aa2c..bb6ac82cd9cb7 100644
--- chrome/chrome_elf/BUILD.gn
+++ chrome/chrome_elf/BUILD.gn
@@ -7,6 +7,7 @@
@@ -10,7 +10,7 @@ index a6072f97ed578..25a64c29e9c34 100644
import("//chrome/process_version_rc_template.gni")
import("//testing/test.gni")
@@ -100,9 +101,6 @@ source_set("constants") {
@@ -106,9 +107,6 @@ source_set("constants") {
static_library("crash") {
sources = [
@@ -20,7 +20,7 @@ index a6072f97ed578..25a64c29e9c34 100644
"crash/crash_helper.cc",
"crash/crash_helper.h",
]
@@ -111,6 +109,7 @@ static_library("crash") {
@@ -117,6 +115,7 @@ static_library("crash") {
":hook_util",
"//base", # This needs to go. DEP of app, crash_keys, client.
"//base:base_static", # pe_image
@@ -28,7 +28,7 @@ index a6072f97ed578..25a64c29e9c34 100644
"//chrome/install_static:install_static_util",
"//components/crash/core/app",
"//components/crash/core/common", # crash_keys
@@ -118,6 +117,17 @@ static_library("crash") {
@@ -124,6 +123,17 @@ static_library("crash") {
"//content/public/common:result_codes",
"//third_party/crashpad/crashpad/client", # DumpWithoutCrash
]
@@ -147,10 +147,10 @@ index a274b3e364084..3d995cf643399 100644
// on the given `command_line`. For non-browser processes, allocates crash keys
// from the switch value set by AppendStringAnnotationsCommandLineSwitch().
diff --git components/crash/core/app/crash_reporter_client.cc components/crash/core/app/crash_reporter_client.cc
index c4535e6ad8dd8..119d5c159b894 100644
index 4abce141b758e..c2624423ed44e 100644
--- components/crash/core/app/crash_reporter_client.cc
+++ components/crash/core/app/crash_reporter_client.cc
@@ -70,7 +70,7 @@ bool CrashReporterClient::GetShouldDumpLargerDumps() {
@@ -93,7 +93,7 @@ bool CrashReporterClient::GetShouldDumpLargerDumps() {
}
#endif
@@ -159,7 +159,7 @@ index c4535e6ad8dd8..119d5c159b894 100644
void CrashReporterClient::GetProductNameAndVersion(const char** product_name,
const char** version) {
}
@@ -79,6 +79,7 @@ void CrashReporterClient::GetProductNameAndVersion(std::string* product_name,
@@ -102,6 +102,7 @@ void CrashReporterClient::GetProductNameAndVersion(std::string* product_name,
std::string* version,
std::string* channel) {}
@@ -167,7 +167,7 @@ index c4535e6ad8dd8..119d5c159b894 100644
base::FilePath CrashReporterClient::GetReporterLogFilename() {
return base::FilePath();
}
@@ -88,6 +89,7 @@ bool CrashReporterClient::HandleCrashDump(const char* crashdump_filename,
@@ -111,6 +112,7 @@ bool CrashReporterClient::HandleCrashDump(const char* crashdump_filename,
return false;
}
#endif
@@ -175,7 +175,7 @@ index c4535e6ad8dd8..119d5c159b894 100644
#if BUILDFLAG(IS_WIN)
bool CrashReporterClient::GetCrashDumpLocation(std::wstring* crash_dir) {
@@ -122,6 +124,28 @@ bool CrashReporterClient::ReportingIsEnforcedByPolicy(bool* breakpad_enabled) {
@@ -145,6 +147,28 @@ bool CrashReporterClient::ReportingIsEnforcedByPolicy(bool* breakpad_enabled) {
return false;
}
@@ -204,7 +204,7 @@ index c4535e6ad8dd8..119d5c159b894 100644
#if BUILDFLAG(IS_ANDROID)
unsigned int CrashReporterClient::GetCrashDumpPercentage() {
return 100;
@@ -160,9 +184,4 @@ bool CrashReporterClient::ShouldMonitorCrashHandlerExpensively() {
@@ -205,9 +229,4 @@ bool CrashReporterClient::ShouldMonitorCrashHandlerExpensively() {
return false;
}
@@ -215,7 +215,7 @@ index c4535e6ad8dd8..119d5c159b894 100644
-
} // namespace crash_reporter
diff --git components/crash/core/app/crash_reporter_client.h components/crash/core/app/crash_reporter_client.h
index 4029756b90d1a..711546896101b 100644
index a604df7a5ea6a..618fbde10a65c 100644
--- components/crash/core/app/crash_reporter_client.h
+++ components/crash/core/app/crash_reporter_client.h
@@ -7,7 +7,9 @@
@@ -228,7 +228,7 @@ index 4029756b90d1a..711546896101b 100644
#include "build/build_config.h"
@@ -72,7 +74,7 @@ class CrashReporterClient {
@@ -96,7 +98,7 @@ class CrashReporterClient {
virtual bool GetShouldDumpLargerDumps();
#endif
@@ -237,7 +237,7 @@ index 4029756b90d1a..711546896101b 100644
// Returns a textual description of the product type and version to include
// in the crash report. Neither out parameter should be set to NULL.
// TODO(jperaza): Remove the 2-parameter overload of this method once all
@@ -83,6 +85,7 @@ class CrashReporterClient {
@@ -107,6 +109,7 @@ class CrashReporterClient {
std::string* version,
std::string* channel);
@@ -245,7 +245,7 @@ index 4029756b90d1a..711546896101b 100644
virtual base::FilePath GetReporterLogFilename();
// Custom crash minidump handler after the minidump is generated.
@@ -92,6 +95,7 @@ class CrashReporterClient {
@@ -116,6 +119,7 @@ class CrashReporterClient {
// libc nor allocate memory normally.
virtual bool HandleCrashDump(const char* crashdump_filename,
uint64_t crash_pid);
@@ -253,7 +253,7 @@ index 4029756b90d1a..711546896101b 100644
#endif
// The location where minidump files should be written. Returns true if
@@ -178,6 +182,20 @@ class CrashReporterClient {
@@ -213,6 +217,20 @@ class CrashReporterClient {
// Returns true if breakpad should run in the given process type.
virtual bool EnableBreakpadForProcess(const std::string& process_type);

View File

@@ -1,8 +1,8 @@
diff --git components/embedder_support/user_agent_utils.cc components/embedder_support/user_agent_utils.cc
index d46582b54b943..46331e763cf72 100644
index 0d9ed98759c4b..48ed045b691a1 100644
--- components/embedder_support/user_agent_utils.cc
+++ components/embedder_support/user_agent_utils.cc
@@ -21,6 +21,7 @@
@@ -18,6 +18,7 @@
#include "base/version.h"
#include "build/branding_buildflags.h"
#include "build/build_config.h"
@@ -10,7 +10,7 @@ index d46582b54b943..46331e763cf72 100644
#include "components/embedder_support/pref_names.h"
#include "components/embedder_support/switches.h"
#include "components/policy/core/common/policy_pref_names.h"
@@ -41,6 +42,10 @@
@@ -38,6 +39,10 @@
#include "base/win/windows_version.h"
#endif // BUILDFLAG(IS_WIN)
@@ -21,7 +21,7 @@ index d46582b54b943..46331e763cf72 100644
namespace embedder_support {
namespace {
@@ -332,6 +337,14 @@ blink::UserAgentBrandList ShuffleBrandList(
@@ -253,6 +258,14 @@ std::vector<std::string> GetFormFactorsClientHint(
std::string GetProductAndVersion(
UserAgentReductionEnterprisePolicyState user_agent_reduction) {

View File

@@ -12,7 +12,7 @@ index 44a11ec90ec9b..4c35b35a97f28 100644
# https://crbug.com/474506.
"//clank/java/BUILD.gn",
diff --git BUILD.gn BUILD.gn
index d91ef0419d702..f9b612ba8ac7a 100644
index 3d8fa4d09b729..381172ec653f4 100644
--- BUILD.gn
+++ BUILD.gn
@@ -20,6 +20,7 @@ import("//build/config/sanitizers/sanitizers.gni")
@@ -23,7 +23,7 @@ index d91ef0419d702..f9b612ba8ac7a 100644
import("//chrome/enterprise_companion/buildflags.gni")
import("//components/enterprise/buildflags/buildflags.gni")
import("//components/nacl/features.gni")
@@ -288,6 +289,10 @@ group("gn_all") {
@@ -286,6 +287,10 @@ group("gn_all") {
deps += root_extra_deps
@@ -35,7 +35,7 @@ index d91ef0419d702..f9b612ba8ac7a 100644
deps += [ "//printing:printing_unittests" ]
}
diff --git build/config/win/visual_studio_version.gni build/config/win/visual_studio_version.gni
index bd41166938952..fba7843d79796 100644
index 1da479dd5eebc..ff9c7e467997c 100644
--- build/config/win/visual_studio_version.gni
+++ build/config/win/visual_studio_version.gni
@@ -5,15 +5,14 @@
@@ -57,7 +57,7 @@ index bd41166938952..fba7843d79796 100644
# Full path to the Windows SDK, not including a backslash at the end.
# This value is the default location, override if you have a different
@@ -31,16 +30,15 @@ if (visual_studio_path == "") {
@@ -31,14 +30,13 @@ if (visual_studio_path == "") {
windows_sdk_version = toolchain_data.sdk_version
windows_sdk_path = toolchain_data.sdk_path
visual_studio_version = toolchain_data.vs_version
@@ -75,10 +75,8 @@ index bd41166938952..fba7843d79796 100644
- "You must set the wdk_path if you set the visual studio path")
- visual_studio_runtime_dirs = []
}
visual_studio_version_logs = [ "windows_sdk_version=${windows_sdk_version}" ]
diff --git chrome/chrome_paks.gni chrome/chrome_paks.gni
index ca413e1286916..70379761ebd59 100644
index e546a14a02ca6..720bf0e9508db 100644
--- chrome/chrome_paks.gni
+++ chrome/chrome_paks.gni
@@ -6,6 +6,7 @@ import("//ash/ambient/resources/resources.gni")
@@ -89,7 +87,7 @@ index ca413e1286916..70379761ebd59 100644
import("//chrome/browser/buildflags.gni")
import("//chrome/common/features.gni")
import("//components/compose/features.gni")
@@ -479,6 +480,10 @@ template("chrome_extra_paks") {
@@ -475,6 +476,10 @@ template("chrome_extra_paks") {
]
deps += [ "//extensions:extensions_resources" ]
}

View File

@@ -1,8 +1,8 @@
diff --git tools/gritsettings/resource_ids.spec tools/gritsettings/resource_ids.spec
index a5b89cfbae164..1c3532b2a8196 100644
index 89c76bad269ec..b0dd86ac9bb24 100644
--- tools/gritsettings/resource_ids.spec
+++ tools/gritsettings/resource_ids.spec
@@ -1385,11 +1385,20 @@
@@ -1376,11 +1376,20 @@
"<(SHARED_INTERMEDIATE_DIR)/third_party/blink/public/strings/permission_element_generated_strings.grd": {
"META": {"sizes": {"messages": [2000],}},
"messages": [10080],

View File

@@ -1,5 +1,5 @@
diff --git third_party/libxml/BUILD.gn third_party/libxml/BUILD.gn
index 73c974cc34aba..2249501a1e0ad 100644
index 1621a215784c9..5a13a75cea0dd 100644
--- third_party/libxml/BUILD.gn
+++ third_party/libxml/BUILD.gn
@@ -140,6 +140,7 @@ static_library("libxml") {

View File

@@ -48,7 +48,7 @@ index a4fc1857349e4..65f620ac8e289 100644
}
diff --git ui/gtk/native_theme_gtk.cc ui/gtk/native_theme_gtk.cc
index 184939bdb8b3d..bb13d7c74e20b 100644
index d059f86ddad39..592b4d7903f15 100644
--- ui/gtk/native_theme_gtk.cc
+++ ui/gtk/native_theme_gtk.cc
@@ -156,9 +156,11 @@ void NativeThemeGtk::OnThemeChanged(GtkSettings* settings,
@@ -67,10 +67,10 @@ index 184939bdb8b3d..bb13d7c74e20b 100644
// GTK doesn't have a native high contrast setting. Rather, it's implied by
diff --git ui/native_theme/native_theme.cc ui/native_theme/native_theme.cc
index 728069cfdba9a..3561f49631e5c 100644
index 09aeff0a2303a..d5bb4283e3464 100644
--- ui/native_theme/native_theme.cc
+++ ui/native_theme/native_theme.cc
@@ -146,6 +146,7 @@ void NativeTheme::NotifyOnNativeThemeUpdated() {
@@ -143,6 +143,7 @@ void NativeTheme::NotifyOnNativeThemeUpdated() {
color_provider_manager.ResetColorProviderCache();
native_theme_observers_.Notify(&NativeThemeObserver::OnNativeThemeUpdated,
this);
@@ -78,7 +78,7 @@ index 728069cfdba9a..3561f49631e5c 100644
RecordNumColorProvidersInitializedDuringOnNativeThemeUpdated(
color_provider_manager.num_providers_initialized() -
@@ -288,6 +289,13 @@ bool NativeTheme::IsForcedDarkMode() {
@@ -275,6 +276,13 @@ bool NativeTheme::IsForcedDarkMode() {
return kIsForcedDarkMode;
}
@@ -93,12 +93,12 @@ index 728069cfdba9a..3561f49631e5c 100644
static bool kIsForcedHighContrast =
base::CommandLine::ForCurrentProcess()->HasSwitch(
diff --git ui/native_theme/native_theme.h ui/native_theme/native_theme.h
index b2a7455c7e005..77170b90189c8 100644
index c8e200ba27bd5..a91635c24e213 100644
--- ui/native_theme/native_theme.h
+++ ui/native_theme/native_theme.h
@@ -610,6 +610,9 @@ class NATIVE_THEME_EXPORT NativeTheme {
// Calculates and returns the use overlay scrollbar setting.
static bool CalculateUseOverlayScrollbar();
@@ -604,6 +604,9 @@ class NATIVE_THEME_EXPORT NativeTheme {
// Whether dark mode is forced via command-line flag.
static bool IsForcedDarkMode();
+ // Whether light mode is forced via command-line flag.
+ static bool IsForcedLightMode();
@@ -107,10 +107,10 @@ index b2a7455c7e005..77170b90189c8 100644
explicit NativeTheme(
bool should_only_use_dark_colors,
diff --git ui/native_theme/native_theme_mac.mm ui/native_theme/native_theme_mac.mm
index dc1224ca2fa27..b2a0ce01b4611 100644
index 23491b97bb068..4aa1ecef92f5f 100644
--- ui/native_theme/native_theme_mac.mm
+++ ui/native_theme/native_theme_mac.mm
@@ -585,11 +585,15 @@ void NativeThemeMac::PaintSelectedMenuItem(
@@ -586,11 +586,15 @@ void NativeThemeMac::PaintSelectedMenuItem(
void NativeThemeMac::InitializeDarkModeStateAndObserver() {
__block auto theme = this;
@@ -129,10 +129,10 @@ index dc1224ca2fa27..b2a0ce01b4611 100644
theme->NotifyOnNativeThemeUpdated();
}];
diff --git ui/native_theme/native_theme_win.cc ui/native_theme/native_theme_win.cc
index 1b098cbb291fe..fc8f22b7db5a3 100644
index c1523bbdbf16e..bc0af8c47b7c7 100644
--- ui/native_theme/native_theme_win.cc
+++ ui/native_theme/native_theme_win.cc
@@ -676,14 +676,17 @@ bool NativeThemeWin::ShouldUseDarkColors() const {
@@ -680,14 +680,17 @@ bool NativeThemeWin::ShouldUseDarkColors() const {
// Windows high contrast modes are entirely different themes,
// so let them take priority over dark mode.
// ...unless --force-dark-mode was specified in which case caveat emptor.
@@ -152,7 +152,7 @@ index 1b098cbb291fe..fc8f22b7db5a3 100644
return NativeTheme::CalculatePreferredColorScheme();
// According to the spec, the preferred color scheme for web content is 'dark'
@@ -1653,8 +1656,9 @@ void NativeThemeWin::RegisterColorFilteringRegkeyObserver() {
@@ -1678,8 +1681,9 @@ void NativeThemeWin::RegisterColorFilteringRegkeyObserver() {
}
void NativeThemeWin::UpdateDarkModeStatus() {

View File

@@ -1,5 +1,5 @@
diff --git ui/accessibility/platform/BUILD.gn ui/accessibility/platform/BUILD.gn
index 2f7f2a8f81ec0..6bea20e981df9 100644
index 2b3aad7a639c6..5188665feae79 100644
--- ui/accessibility/platform/BUILD.gn
+++ ui/accessibility/platform/BUILD.gn
@@ -342,6 +342,10 @@ component("platform") {

View File

@@ -1,5 +1,5 @@
diff --git ui/gtk/gtk_ui.cc ui/gtk/gtk_ui.cc
index 771c253082e2a..47a28fd56750e 100644
index 69fdf309dbb71..60c89be146d2a 100644
--- ui/gtk/gtk_ui.cc
+++ ui/gtk/gtk_ui.cc
@@ -31,6 +31,7 @@
@@ -27,7 +27,7 @@ index 771c253082e2a..47a28fd56750e 100644
&GtkUi::OnCursorThemeNameChanged);
connect(settings, "notify::gtk-cursor-theme-size",
diff --git ui/ozone/platform/x11/ozone_platform_x11.cc ui/ozone/platform/x11/ozone_platform_x11.cc
index 50f3163e57544..db26d180ecb2a 100644
index 39e18820db0d0..0971f5b63d23d 100644
--- ui/ozone/platform/x11/ozone_platform_x11.cc
+++ ui/ozone/platform/x11/ozone_platform_x11.cc
@@ -64,6 +64,8 @@ namespace ui {
@@ -39,7 +39,7 @@ index 50f3163e57544..db26d180ecb2a 100644
// Singleton OzonePlatform implementation for X11 platform.
class OzonePlatformX11 : public OzonePlatform,
public OSExchangeDataProviderFactoryOzone {
@@ -262,7 +264,15 @@ class OzonePlatformX11 : public OzonePlatform,
@@ -261,7 +263,15 @@ class OzonePlatformX11 : public OzonePlatform,
TouchFactory::SetTouchDeviceListFromCommandLine();
#if BUILDFLAG(USE_GTK)
@@ -56,7 +56,7 @@ index 50f3163e57544..db26d180ecb2a 100644
#endif
menu_utils_ = std::make_unique<X11MenuUtils>();
@@ -357,4 +367,8 @@ OzonePlatform* CreateOzonePlatformX11() {
@@ -356,4 +366,8 @@ OzonePlatform* CreateOzonePlatformX11() {
return new OzonePlatformX11;
}

View File

@@ -1,5 +1,5 @@
diff --git chrome/browser/chrome_resource_bundle_helper.cc chrome/browser/chrome_resource_bundle_helper.cc
index 0e256b2a268ca..66ef8460d46ca 100644
index 0cfc966050b60..bbc20cffaee1a 100644
--- chrome/browser/chrome_resource_bundle_helper.cc
+++ chrome/browser/chrome_resource_bundle_helper.cc
@@ -68,8 +68,10 @@ extern void InitializeLocalState(
@@ -43,7 +43,7 @@ index 0e256b2a268ca..66ef8460d46ca 100644
CHECK(!actual_locale.empty())
<< "Locale could not be found for " << preferred_locale;
@@ -136,6 +131,7 @@ std::string InitResourceBundleAndDetermineLocale(PrefService* local_state,
@@ -155,6 +150,7 @@ std::string InitResourceBundleAndDetermineLocale(PrefService* local_state,
std::string LoadLocalState(
ChromeFeatureListCreator* chrome_feature_list_creator,
@@ -51,7 +51,7 @@ index 0e256b2a268ca..66ef8460d46ca 100644
bool is_running_tests) {
base::FilePath user_data_dir;
if (!base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir))
@@ -147,5 +143,6 @@ std::string LoadLocalState(
@@ -166,5 +162,6 @@ std::string LoadLocalState(
new ChromeCommandLinePrefStore(base::CommandLine::ForCurrentProcess()));
return InitResourceBundleAndDetermineLocale(
@@ -98,7 +98,7 @@ index aa43742055b04..e84f21ab963cc 100644
// it will get the locale that should be used potentially from other sources,
// depending on the platform (e.g. the OS locale on Mac).
diff --git ui/base/l10n/l10n_util.cc ui/base/l10n/l10n_util.cc
index 3ba9c2e2971ad..f01e59a731f5e 100644
index 36bd7743e5b73..744918bde3012 100644
--- ui/base/l10n/l10n_util.cc
+++ ui/base/l10n/l10n_util.cc
@@ -506,25 +506,7 @@ bool CheckAndResolveLocale(const std::string& locale,

View File

@@ -1,8 +1,8 @@
diff --git chrome/browser/ui/views/profiles/profile_menu_view_base.cc chrome/browser/ui/views/profiles/profile_menu_view_base.cc
index 1f686ab2a03bd..c50f3ce1ed450 100644
index 9bb83d87c445f..23685ae498ce3 100644
--- chrome/browser/ui/views/profiles/profile_menu_view_base.cc
+++ chrome/browser/ui/views/profiles/profile_menu_view_base.cc
@@ -1254,8 +1254,8 @@ int ProfileMenuViewBase::GetMaxHeight() const {
@@ -1238,8 +1238,8 @@ int ProfileMenuViewBase::GetMaxHeight() const {
->GetDisplayNearestPoint(anchor_rect.CenterPoint())
.work_area();
int available_space = screen_space.bottom() - anchor_rect.bottom();

View File

@@ -1,5 +1,5 @@
diff --git content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
index a8658f076970c..a5b96df9014e0 100644
index f7ead5e49e4ba..85fb9738cd980 100644
--- content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
+++ content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
@@ -171,6 +171,13 @@ void ExtractUnderlines(NSAttributedString* string,

View File

@@ -1,5 +1,5 @@
diff --git base/message_loop/message_pump_win.cc base/message_loop/message_pump_win.cc
index f28ebfee8218d..12f7539526c06 100644
index 94a1de886b530..dec2dd5f20721 100644
--- base/message_loop/message_pump_win.cc
+++ base/message_loop/message_pump_win.cc
@@ -2,6 +2,7 @@
@@ -10,7 +10,7 @@ index f28ebfee8218d..12f7539526c06 100644
#include "base/message_loop/message_pump_win.h"
#include <winbase.h>
@@ -572,7 +573,17 @@ bool MessagePumpForUI::ProcessNextWindowsMessage() {
@@ -569,7 +570,17 @@ bool MessagePumpForUI::ProcessNextWindowsMessage() {
ctx.event()->set_chrome_message_pump();
msg_pump_data->set_sent_messages_in_queue(more_work_is_plausible);
});
@@ -30,7 +30,7 @@ index f28ebfee8218d..12f7539526c06 100644
}
if (has_msg)
diff --git base/task/current_thread.cc base/task/current_thread.cc
index 8506e9f5b1800..43c99a9c72798 100644
index c4f8862b21ccf..c8c80509abc91 100644
--- base/task/current_thread.cc
+++ base/task/current_thread.cc
@@ -51,6 +51,8 @@ void CurrentThread::AddDestructionObserver(
@@ -43,7 +43,7 @@ index 8506e9f5b1800..43c99a9c72798 100644
current_->RemoveDestructionObserver(destruction_observer);
}
diff --git base/task/current_thread.h base/task/current_thread.h
index 7a3e7ce2de408..2ebbd5bd8ef55 100644
index 0be6acd709e53..cdadebb201547 100644
--- base/task/current_thread.h
+++ base/task/current_thread.h
@@ -163,6 +163,12 @@ class BASE_EXPORT CurrentThread {

View File

@@ -1,8 +1,8 @@
diff --git components/metrics/persistent_system_profile.cc components/metrics/persistent_system_profile.cc
index 3cef1f28ccdb0..c91c9927436de 100644
index 5cfe0451159cf..96fdbcb5e8c09 100644
--- components/metrics/persistent_system_profile.cc
+++ components/metrics/persistent_system_profile.cc
@@ -401,6 +401,10 @@ bool PersistentSystemProfile::GetSystemProfile(
@@ -400,6 +400,10 @@ bool PersistentSystemProfile::GetSystemProfile(
return true;
}

View File

@@ -12,18 +12,18 @@ index 37cb1dac49610..6e5989c73bf08 100644
virtual ~WebContentsView() = default;
diff --git extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
index bd3bb10e2d6b1..0559c97775444 100644
index 6c8040666b520..d03d33415f033 100644
--- extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
+++ extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
@@ -211,6 +211,8 @@ void MimeHandlerViewGuest::CreateInnerPage(
WebContents::CreateParams params(browser_context(),
guest_site_instance.get());
params.guest_delegate = this;
+ if (delegate_)
+ delegate_->OverrideWebContentsCreateParams(&params);
std::move(callback).Run(std::move(owned_this),
WebContents::CreateWithSessionStorage(
params, owner_web_contents()
@@ -204,6 +204,8 @@ void MimeHandlerViewGuest::CreateWebContents(
WebContents::CreateParams params(browser_context(),
guest_site_instance.get());
params.guest_delegate = this;
+ if (delegate_)
+ delegate_->OverrideWebContentsCreateParams(&params);
std::move(callback).Run(std::move(owned_this),
WebContents::CreateWithSessionStorage(
params, owner_web_contents()
diff --git extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest_delegate.h extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest_delegate.h
index 2fb8a60c1f56d..edd275135e60d 100644
--- extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest_delegate.h

View File

@@ -1,8 +1,8 @@
diff --git ipc/ipc_mojo_bootstrap.cc ipc/ipc_mojo_bootstrap.cc
index 220f6b5fb0213..3dc6077ec69b8 100644
index da2bfab0e9064..449a36cbff63f 100644
--- ipc/ipc_mojo_bootstrap.cc
+++ ipc/ipc_mojo_bootstrap.cc
@@ -977,7 +977,8 @@ class ChannelAssociatedGroupController
@@ -990,7 +990,8 @@ class ChannelAssociatedGroupController
endpoint->disconnect_reason());
base::AutoUnlock unlocker(lock_);

View File

@@ -10,10 +10,10 @@ index aeb79b46f5d21..bd57e874c1240 100644
+// This load will not send any cookies. For CEF usage.
+LOAD_FLAG(DO_NOT_SEND_COOKIES, 1 << 20)
diff --git net/url_request/url_request_http_job.cc net/url_request/url_request_http_job.cc
index 408edfb7578bb..c3e06bdbb4986 100644
index b1ffe26b43448..99266abd58e01 100644
--- net/url_request/url_request_http_job.cc
+++ net/url_request/url_request_http_job.cc
@@ -2097,7 +2097,8 @@ bool URLRequestHttpJob::ShouldAddCookieHeader() const {
@@ -2079,7 +2079,8 @@ bool URLRequestHttpJob::ShouldAddCookieHeader() const {
// Read cookies whenever allow_credentials() is true, even if the PrivacyMode
// is being overridden by NetworkDelegate and will eventually block them, as
// blocked cookies still need to be logged in that case.
@@ -24,10 +24,10 @@ index 408edfb7578bb..c3e06bdbb4986 100644
bool URLRequestHttpJob::ShouldRecordPartitionedCookieUsage() const {
diff --git services/network/public/cpp/resource_request.cc services/network/public/cpp/resource_request.cc
index 57713d234ec93..dbf788d783740 100644
index 28bf295032c89..e625f00f49603 100644
--- services/network/public/cpp/resource_request.cc
+++ services/network/public/cpp/resource_request.cc
@@ -326,7 +326,8 @@ bool ResourceRequest::EqualsForTesting(const ResourceRequest& request) const {
@@ -324,7 +324,8 @@ bool ResourceRequest::EqualsForTesting(const ResourceRequest& request) const {
}
bool ResourceRequest::SendsCookies() const {

View File

@@ -1,8 +1,8 @@
diff --git net/test/embedded_test_server/embedded_test_server.cc net/test/embedded_test_server/embedded_test_server.cc
index d640d545e78c8..c70cf04088f2c 100644
index 0ee26322fd5ce..25265759b31f3 100644
--- net/test/embedded_test_server/embedded_test_server.cc
+++ net/test/embedded_test_server/embedded_test_server.cc
@@ -1091,7 +1091,7 @@ bool EmbeddedTestServer::PostTaskToIOThreadAndWait(base::OnceClosure closure) {
@@ -1088,7 +1088,7 @@ bool EmbeddedTestServer::PostTaskToIOThreadAndWait(base::OnceClosure closure) {
if (!base::CurrentThread::Get())
temporary_loop = std::make_unique<base::SingleThreadTaskExecutor>();
@@ -11,7 +11,7 @@ index d640d545e78c8..c70cf04088f2c 100644
if (!io_thread_->task_runner()->PostTaskAndReply(
FROM_HERE, std::move(closure), run_loop.QuitClosure())) {
return false;
@@ -1118,7 +1118,7 @@ bool EmbeddedTestServer::PostTaskToIOThreadAndWaitWithResult(
@@ -1115,7 +1115,7 @@ bool EmbeddedTestServer::PostTaskToIOThreadAndWaitWithResult(
if (!base::CurrentThread::Get())
temporary_loop = std::make_unique<base::SingleThreadTaskExecutor>();

View File

@@ -1,5 +1,5 @@
diff --git net/url_request/url_request_job.cc net/url_request/url_request_job.cc
index f1288aaa112e6..2b29bffdbbaf6 100644
index dc0381e682e2a..16f6666efdcda 100644
--- net/url_request/url_request_job.cc
+++ net/url_request/url_request_job.cc
@@ -36,6 +36,7 @@
@@ -27,7 +27,7 @@ index f1288aaa112e6..2b29bffdbbaf6 100644
} // namespace
// Each SourceStreams own the previous SourceStream in the chain, but the
@@ -325,8 +336,7 @@ GURL URLRequestJob::ComputeReferrerForPolicy(
@@ -326,8 +337,7 @@ GURL URLRequestJob::ComputeReferrerForPolicy(
}
bool secure_referrer_but_insecure_destination =

View File

@@ -56,7 +56,7 @@ index f1030a744809c..c222a209949e6 100644
return nullptr;
}
diff --git content/browser/renderer_host/render_widget_host_impl.cc content/browser/renderer_host/render_widget_host_impl.cc
index e8f68eca2104c..c579cff86fbbb 100644
index 5a521aa5a6117..47433d6fb0841 100644
--- content/browser/renderer_host/render_widget_host_impl.cc
+++ content/browser/renderer_host/render_widget_host_impl.cc
@@ -791,7 +791,7 @@ void RenderWidgetHostImpl::WasHidden() {
@@ -68,7 +68,7 @@ index e8f68eca2104c..c579cff86fbbb 100644
RejectPointerLockOrUnlockIfNecessary(
blink::mojom::PointerLockResult::kWrongDocument);
}
@@ -3248,6 +3248,11 @@ void RenderWidgetHostImpl::DecrementInFlightEventCount(
@@ -3232,6 +3232,11 @@ void RenderWidgetHostImpl::DecrementInFlightEventCount(
}
}
@@ -81,10 +81,10 @@ index e8f68eca2104c..c579cff86fbbb 100644
const WebInputEvent& event) {
if ((base::FeatureList::IsEnabled(
diff --git content/browser/renderer_host/render_widget_host_impl.h content/browser/renderer_host/render_widget_host_impl.h
index 01b87c84b32c0..e6061b75d201d 100644
index b8dadc4cca462..f5bbd83de86ab 100644
--- content/browser/renderer_host/render_widget_host_impl.h
+++ content/browser/renderer_host/render_widget_host_impl.h
@@ -841,6 +841,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl
@@ -836,6 +836,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl
void ProgressFlingIfNeeded(base::TimeTicks current_time);
void StopFling();

View File

@@ -1,8 +1,8 @@
diff --git gpu/ipc/service/gpu_memory_buffer_factory_dxgi.cc gpu/ipc/service/gpu_memory_buffer_factory_dxgi.cc
index a7742298af440..a7dab9f4f770b 100644
index 2096591596a26..5a0c3fd16eecf 100644
--- gpu/ipc/service/gpu_memory_buffer_factory_dxgi.cc
+++ gpu/ipc/service/gpu_memory_buffer_factory_dxgi.cc
@@ -178,7 +178,8 @@ gfx::GpuMemoryBufferHandle GpuMemoryBufferFactoryDXGI::CreateGpuMemoryBuffer(
@@ -179,7 +179,8 @@ gfx::GpuMemoryBufferHandle GpuMemoryBufferFactoryDXGI::CreateGpuMemoryBuffer(
// so make sure that the usage is one that we support.
DCHECK(usage == gfx::BufferUsage::GPU_READ ||
usage == gfx::BufferUsage::SCANOUT ||
@@ -12,7 +12,7 @@ index a7742298af440..a7dab9f4f770b 100644
<< "Incorrect usage, usage=" << gfx::BufferUsageToString(usage);
D3D11_TEXTURE2D_DESC desc = {
@@ -192,7 +193,9 @@ gfx::GpuMemoryBufferHandle GpuMemoryBufferFactoryDXGI::CreateGpuMemoryBuffer(
@@ -193,7 +194,9 @@ gfx::GpuMemoryBufferHandle GpuMemoryBufferFactoryDXGI::CreateGpuMemoryBuffer(
D3D11_BIND_SHADER_RESOURCE | D3D11_BIND_RENDER_TARGET,
0,
D3D11_RESOURCE_MISC_SHARED_NTHANDLE |
@@ -24,10 +24,10 @@ index a7742298af440..a7dab9f4f770b 100644
Microsoft::WRL::ComPtr<ID3D11Texture2D> d3d11_texture;
diff --git media/video/renderable_gpu_memory_buffer_video_frame_pool.cc media/video/renderable_gpu_memory_buffer_video_frame_pool.cc
index b27bcf13d3a5f..df1b2d697f7cc 100644
index 596affaba0993..3c28ea80fc631 100644
--- media/video/renderable_gpu_memory_buffer_video_frame_pool.cc
+++ media/video/renderable_gpu_memory_buffer_video_frame_pool.cc
@@ -193,7 +193,7 @@ gfx::Size GetBufferSizeInPixelsForVideoPixelFormat(
@@ -205,7 +205,7 @@ gfx::Size GetBufferSizeInPixelsForVideoPixelFormat(
bool FrameResources::Initialize() {
auto* context = pool_->GetContext();
@@ -36,7 +36,7 @@ index b27bcf13d3a5f..df1b2d697f7cc 100644
#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS)
gfx::BufferUsage::SCANOUT_VEA_CPU_READ
#else
@@ -207,6 +207,23 @@ bool FrameResources::Initialize() {
@@ -219,6 +219,23 @@ bool FrameResources::Initialize() {
const gfx::Size buffer_size_in_pixels =
GetBufferSizeInPixelsForVideoPixelFormat(format_, coded_size_);
@@ -57,15 +57,35 @@ index b27bcf13d3a5f..df1b2d697f7cc 100644
+ }
+#endif
+
constexpr gpu::SharedImageUsageSet kSharedImageUsage =
#if BUILDFLAG(IS_MAC)
gpu::SHARED_IMAGE_USAGE_MACOS_VIDEO_TOOLBOX |
@@ -231,7 +248,7 @@ bool FrameResources::Initialize() {
viz::GetSharedImageFormat(buffer_format);
// Create the GpuMemoryBuffer if MappableSharedImages is not enabled. When its
// enabled, clients only create a mappable shared image directly without
// needing to create a GMB.
@@ -226,16 +243,16 @@ bool FrameResources::Initialize() {
kUseMappableSIForRenderableGpuMemoryBufferVideoFramePool);
if (!is_mappable_si_enabled) {
gpu_memory_buffer_ = context->CreateGpuMemoryBuffer(
- buffer_size_in_pixels, buffer_format, kBufferUsage);
+ buffer_size_in_pixels, buffer_format, buffer_usage);
if (!gpu_memory_buffer_) {
LOG(ERROR) << "Failed to allocate GpuMemoryBuffer for frame: coded_size="
<< coded_size_.ToString()
- << ", usage=" << static_cast<int>(kBufferUsage);
+ << ", usage=" << static_cast<int>(buffer_usage);
return false;
}
shared_image_ = context->CreateSharedImage(
- buffer_size_in_pixels, kBufferUsage, si_format, color_space_,
+ buffer_size_in_pixels, buffer_usage, si_format, color_space_,
kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, kSharedImageUsage,
sync_token_);
if (!shared_image_) {
#if BUILDFLAG(IS_MAC)
- gpu_memory_buffer_->SetColorSpace(color_space_);
+ gpu_memory_buffer_->SetColorSpace(color_space_);
#endif
}
@@ -264,7 +281,7 @@ bool FrameResources::Initialize() {
if (is_mappable_si_enabled) {
shared_image_ = context->CreateSharedImage(
- buffer_size_in_pixels, kBufferUsage, si_format, color_space_,
+ buffer_size_in_pixels, buffer_usage, si_format, color_space_,
kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, kSharedImageUsage,
sync_token_);
} else {

View File

@@ -1,5 +1,5 @@
diff --git net/base/directory_lister.cc net/base/directory_lister.cc
index ae3a99f31e2ec..213cc33f2cc8e 100644
index 9a9787aae0233..467cbef7f6c34 100644
--- net/base/directory_lister.cc
+++ net/base/directory_lister.cc
@@ -200,7 +200,7 @@ void DirectoryLister::OnListFile(const DirectoryListerData& data) {

View File

@@ -1,8 +1,8 @@
diff --git content/browser/renderer_host/render_view_host_impl.cc content/browser/renderer_host/render_view_host_impl.cc
index 4675bec818108..da09caea5cb13 100644
index 52ce9d2c8c5e2..b94e96d0c5b52 100644
--- content/browser/renderer_host/render_view_host_impl.cc
+++ content/browser/renderer_host/render_view_host_impl.cc
@@ -751,6 +751,8 @@ bool RenderViewHostImpl::IsRenderViewLive() const {
@@ -743,6 +743,8 @@ bool RenderViewHostImpl::IsRenderViewLive() const {
}
void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {

View File

@@ -1,8 +1,8 @@
diff --git ui/base/resource/resource_bundle.cc ui/base/resource/resource_bundle.cc
index aae95534577aa..aad03d8ec994a 100644
index f1e826da8bc65..d4a8c6f5a9290 100644
--- ui/base/resource/resource_bundle.cc
+++ ui/base/resource/resource_bundle.cc
@@ -942,6 +942,12 @@ ResourceBundle::ResourceBundle(Delegate* delegate)
@@ -932,6 +932,12 @@ ResourceBundle::ResourceBundle(Delegate* delegate)
: delegate_(delegate),
locale_resources_data_lock_(new base::Lock),
max_scale_factor_(k100Percent) {
@@ -15,7 +15,7 @@ index aae95534577aa..aad03d8ec994a 100644
mangle_localized_strings_ = base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kMangleLocalizedStrings);
}
@@ -951,6 +957,11 @@ ResourceBundle::~ResourceBundle() {
@@ -941,6 +947,11 @@ ResourceBundle::~ResourceBundle() {
UnloadLocaleResources();
}
@@ -28,10 +28,10 @@ index aae95534577aa..aad03d8ec994a 100644
void ResourceBundle::InitSharedInstance(Delegate* delegate) {
DCHECK(g_shared_instance_ == nullptr) << "ResourceBundle initialized twice";
diff --git ui/base/resource/resource_bundle.h ui/base/resource/resource_bundle.h
index 9323142348537..8a8ed019a0489 100644
index e2775058db121..691136d0e21d1 100644
--- ui/base/resource/resource_bundle.h
+++ ui/base/resource/resource_bundle.h
@@ -224,6 +224,11 @@ class COMPONENT_EXPORT(UI_BASE) ResourceBundle {
@@ -220,6 +220,11 @@ class COMPONENT_EXPORT(UI_BASE) ResourceBundle {
ResourceBundle(const ResourceBundle&) = delete;
ResourceBundle& operator=(const ResourceBundle&) = delete;

View File

@@ -1,8 +1,8 @@
diff --git content/browser/renderer_host/render_frame_host_impl.cc content/browser/renderer_host/render_frame_host_impl.cc
index f58b9b0333e01..62cc5a6ef62a7 100644
index 90cd61d803a58..acc73d7b702fa 100644
--- content/browser/renderer_host/render_frame_host_impl.cc
+++ content/browser/renderer_host/render_frame_host_impl.cc
@@ -9197,6 +9197,16 @@ void RenderFrameHostImpl::CreateNewWindow(
@@ -9153,6 +9153,16 @@ void RenderFrameHostImpl::CreateNewWindow(
return;
}
@@ -19,7 +19,7 @@ index f58b9b0333e01..62cc5a6ef62a7 100644
// Otherwise, consume user activation before we proceed. In particular, it is
// important to do this before we return from the |opener_suppressed| case
// below.
@@ -11560,6 +11570,7 @@ void RenderFrameHostImpl::CommitNavigation(
@@ -11495,6 +11505,7 @@ void RenderFrameHostImpl::CommitNavigation(
auto browser_calc_origin_to_commit =
navigation_request->GetOriginToCommitWithDebugInfo();
if (!process_lock.is_error_page() && !is_mhtml_subframe &&
@@ -27,3 +27,11 @@ index f58b9b0333e01..62cc5a6ef62a7 100644
!policy->CanAccessOrigin(
GetProcess()->GetID(), browser_calc_origin_to_commit.first.value(),
ChildProcessSecurityPolicyImpl::AccessType::kCanCommitNewOrigin)) {
@@ -15478,6 +15489,7 @@ void RenderFrameHostImpl::DidCommitNavigation(
if (interface_params) {
if (broker_receiver_.is_bound()) {
+ DVLOG(1) << __func__ << ": broker receiver reset";
broker_receiver_.reset();
}
BindBrowserInterfaceBrokerReceiver(

View File

@@ -26,10 +26,10 @@ index 927fce24fcdc6..834c84eae805e 100644
if (cpu != 'x64'):
# x64 is default target CPU thus any other CPU requires a target set
diff --git build/vs_toolchain.py build/vs_toolchain.py
index f0b8bacf57360..585e64876f44e 100755
index f3a6fc7deec43..1f359e351fa85 100755
--- build/vs_toolchain.py
+++ build/vs_toolchain.py
@@ -136,9 +136,16 @@ def SetEnvironmentAndGetRuntimeDllDirs():
@@ -114,9 +114,16 @@ def SetEnvironmentAndGetRuntimeDllDirs():
runtime_path = os.path.pathsep.join(vs_runtime_dll_dirs)
os.environ['PATH'] = runtime_path + os.path.pathsep + os.environ['PATH']
elif sys.platform == 'win32' and not depot_tools_win_toolchain:
@@ -46,7 +46,7 @@ index f0b8bacf57360..585e64876f44e 100755
# When using an installed toolchain these files aren't needed in the output
# directory in order to run binaries locally, but they are needed in order
# to create isolates or the mini_installer. Copying them to the output
@@ -187,6 +194,10 @@ def _RegistryGetValue(key, value):
@@ -165,6 +172,10 @@ def _RegistryGetValue(key, value):
def GetVisualStudioVersion():
"""Return best available version of Visual Studio.
"""

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 47b5f2b63ecf2..fa1a3be6d5e06 100644
index 55548735a1d10..edca00d0d49d3 100644
--- content/browser/renderer_host/render_widget_host_view_aura.cc
+++ content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -6,6 +6,7 @@
@@ -10,7 +10,7 @@ index 47b5f2b63ecf2..fa1a3be6d5e06 100644
#include <set>
#include <string_view>
#include <utility>
@@ -53,6 +54,7 @@
@@ -54,6 +55,7 @@
#include "content/public/browser/content_browser_client.h"
#include "content/public/browser/device_service.h"
#include "content/public/browser/render_view_host.h"
@@ -18,7 +18,7 @@ index 47b5f2b63ecf2..fa1a3be6d5e06 100644
#include "content/public/common/page_visibility_state.h"
#include "services/service_manager/public/cpp/interface_provider.h"
#include "third_party/blink/public/common/input/web_input_event.h"
@@ -760,10 +762,12 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() {
@@ -759,10 +761,12 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() {
void RenderWidgetHostViewAura::UpdateBackgroundColor() {
CHECK(GetBackgroundColor());
@@ -35,7 +35,7 @@ index 47b5f2b63ecf2..fa1a3be6d5e06 100644
}
#if BUILDFLAG(IS_WIN)
@@ -2542,6 +2546,16 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) {
@@ -2460,6 +2464,16 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) {
window_->layer()->SetColor(GetBackgroundColor() ? *GetBackgroundColor()
: SK_ColorWHITE);
UpdateFrameSinkIdRegistration();

View File

@@ -1,5 +1,5 @@
diff --git ui/display/screen.cc ui/display/screen.cc
index 6fa7119d30df8..224d2113000fb 100644
index 3090a05e91f31..d9667f9526278 100644
--- ui/display/screen.cc
+++ ui/display/screen.cc
@@ -108,13 +108,13 @@ base::TimeDelta Screen::CalculateIdleTime() const {
@@ -19,10 +19,10 @@ index 6fa7119d30df8..224d2113000fb 100644
bool Screen::GetDisplayWithDisplayId(int64_t display_id,
diff --git ui/display/win/screen_win.cc ui/display/win/screen_win.cc
index 931443a2ef517..4352a30879c04 100644
index 767d02f5b660a..f6926e4ef96fa 100644
--- ui/display/win/screen_win.cc
+++ ui/display/win/screen_win.cc
@@ -633,7 +633,7 @@ gfx::Rect ScreenWin::ScreenToDIPRect(HWND hwnd, const gfx::Rect& pixel_bounds) {
@@ -619,7 +619,7 @@ gfx::Rect ScreenWin::ScreenToDIPRect(HWND hwnd, const gfx::Rect& pixel_bounds) {
gfx::PointF(pixel_bounds.origin()), screen_win_display));
const float scale_factor =
1.0f / screen_win_display.display().device_scale_factor();
@@ -31,7 +31,7 @@ index 931443a2ef517..4352a30879c04 100644
}
// static
@@ -648,7 +648,7 @@ gfx::Rect ScreenWin::DIPToScreenRect(HWND hwnd, const gfx::Rect& dip_bounds) {
@@ -634,7 +634,7 @@ gfx::Rect ScreenWin::DIPToScreenRect(HWND hwnd, const gfx::Rect& dip_bounds) {
const gfx::Point origin =
display::win::DIPToScreenPoint(dip_bounds.origin(), screen_win_display);
const float scale_factor = screen_win_display.display().device_scale_factor();

View File

@@ -1,5 +1,5 @@
diff --git net/cookies/cookie_monster.cc net/cookies/cookie_monster.cc
index 020b7141b4bf5..8879bae28f119 100644
index b8506e1b025df..d18163053f430 100644
--- net/cookies/cookie_monster.cc
+++ net/cookies/cookie_monster.cc
@@ -635,6 +635,25 @@ void CookieMonster::SetCookieableSchemes(
@@ -58,7 +58,7 @@ index 3f0be99e0e145..0462ebbe9bedc 100644
// reset to null.
const CookieAccessDelegate* cookie_access_delegate() const {
diff --git services/network/cookie_manager.cc services/network/cookie_manager.cc
index 06a85c11e6604..c1d0bcfac60d4 100644
index f78c6a467befc..97f1d21218eed 100644
--- services/network/cookie_manager.cc
+++ services/network/cookie_manager.cc
@@ -345,14 +345,9 @@ void CookieManager::AllowFileSchemeCookies(
@@ -80,10 +80,10 @@ index 06a85c11e6604..c1d0bcfac60d4 100644
void CookieManager::SetForceKeepSessionState() {
diff --git services/network/network_context.cc services/network/network_context.cc
index f03bc67fbd156..998648ac775ec 100644
index 383f570b3afee..7b5f096bdc78a 100644
--- services/network/network_context.cc
+++ services/network/network_context.cc
@@ -2643,17 +2643,21 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
@@ -2585,16 +2585,20 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
network_service_->network_quality_estimator());
}
@@ -91,15 +91,13 @@ index f03bc67fbd156..998648ac775ec 100644
- std::unique_ptr<net::CookieMonster> cookie_store =
- std::make_unique<net::CookieMonster>(session_cleanup_cookie_store.get(),
- net_log);
- if (params_->persist_session_cookies) {
- if (params_->persist_session_cookies)
- cookie_store->SetPersistSessionCookies(true);
- }
+ std::unique_ptr<net::CookieMonster> cookie_store =
+ std::make_unique<net::CookieMonster>(session_cleanup_cookie_store.get(),
+ net_log);
+ if (session_cleanup_cookie_store && params_->persist_session_cookies) {
+ if (session_cleanup_cookie_store && params_->persist_session_cookies)
+ cookie_store->SetPersistSessionCookies(true);
+ }
- builder.SetCookieStore(std::move(cookie_store));
+ if (params_->cookieable_schemes.has_value()) {
@@ -114,10 +112,10 @@ index f03bc67fbd156..998648ac775ec 100644
base::FeatureList::IsEnabled(features::kFledgePst)) {
trust_token_store_ = std::make_unique<PendingTrustTokenStore>();
diff --git services/network/public/mojom/network_context.mojom services/network/public/mojom/network_context.mojom
index f2c8a56442e0a..747948ea6d197 100644
index 83bce4a3bf9dc..c6efc2e4333fc 100644
--- services/network/public/mojom/network_context.mojom
+++ services/network/public/mojom/network_context.mojom
@@ -366,6 +366,9 @@ struct NetworkContextParams {
@@ -359,6 +359,9 @@ struct NetworkContextParams {
// cookies. Otherwise it should be false.
bool persist_session_cookies = false;

View File

@@ -1,8 +1,8 @@
diff --git content/browser/storage_partition_impl.cc content/browser/storage_partition_impl.cc
index c43bb22ce2326..f757f4aa5e822 100644
index a45a20da28026..6ab41c52f0b54 100644
--- content/browser/storage_partition_impl.cc
+++ content/browser/storage_partition_impl.cc
@@ -3335,9 +3335,12 @@ void StoragePartitionImpl::InitNetworkContext() {
@@ -3336,9 +3336,12 @@ void StoragePartitionImpl::InitNetworkContext() {
cert_verifier::mojom::CertVerifierCreationParamsPtr
cert_verifier_creation_params =
cert_verifier::mojom::CertVerifierCreationParams::New();

View File

@@ -1,5 +1,5 @@
diff --git base/trace_event/builtin_categories.h base/trace_event/builtin_categories.h
index ef993705e4a36..8d1d9a1be4603 100644
index 9a07b21450ccd..ef58e51e7bfb0 100644
--- base/trace_event/builtin_categories.h
+++ base/trace_event/builtin_categories.h
@@ -71,6 +71,8 @@

View File

@@ -1,16 +0,0 @@
diff --git ui/base/x/x11_util.h ui/base/x/x11_util.h
index ff12f942b61b7..97d17c3a46309 100644
--- ui/base/x/x11_util.h
+++ ui/base/x/x11_util.h
@@ -245,8 +245,9 @@ x11::Future<void> SendClientMessage(
x11::Window target,
x11::Atom type,
const std::array<uint32_t, 5> data,
- x11::EventMask event_mask = x11::EventMask::SubstructureNotify |
- x11::EventMask::SubstructureRedirect);
+ x11::EventMask event_mask = static_cast<x11::EventMask>(
+ static_cast<int>(x11::EventMask::SubstructureNotify) |
+ static_cast<int>(x11::EventMask::SubstructureRedirect)));
// Return true if VulkanSurface is supported.
COMPONENT_EXPORT(UI_BASE_X) bool IsVulkanSurfaceSupported();

View File

@@ -1,8 +1,8 @@
diff --git ui/menus/simple_menu_model.cc ui/menus/simple_menu_model.cc
index 9f56505d9502c..509d93ae1fa22 100644
--- ui/menus/simple_menu_model.cc
+++ ui/menus/simple_menu_model.cc
@@ -11,6 +11,7 @@
diff --git ui/base/models/simple_menu_model.cc ui/base/models/simple_menu_model.cc
index fbf6043fc4322..913b30ba2eed8 100644
--- ui/base/models/simple_menu_model.cc
+++ ui/base/models/simple_menu_model.cc
@@ -10,6 +10,7 @@
#include "base/functional/bind.h"
#include "base/location.h"
#include "base/task/single_thread_task_runner.h"
@@ -10,7 +10,7 @@ index 9f56505d9502c..509d93ae1fa22 100644
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/models/image_model.h"
#include "ui/gfx/image/image.h"
@@ -171,8 +172,10 @@ void SimpleMenuModel::AddSeparator(MenuSeparatorType separator_type) {
@@ -170,8 +171,10 @@ void SimpleMenuModel::AddSeparator(MenuSeparatorType separator_type) {
}
if (items_.at(last_visible_item).type == TYPE_SEPARATOR) {

View File

@@ -1,33 +0,0 @@
diff --git BUILD.gn BUILD.gn
index 0c559713ea0..9b2f2daff7a 100644
--- BUILD.gn
+++ BUILD.gn
@@ -11,6 +11,7 @@ import("//build/config/mips.gni")
import("//build/config/riscv.gni")
import("//build/config/sanitizers/sanitizers.gni")
import("//build_overrides/build.gni")
+import("//cef/libcef/features/features.gni")
import("//third_party/icu/config.gni")
import("gni/snapshot_toolchain.gni")
@@ -458,6 +459,9 @@ declare_args() {
# Some fuzzers depend on fuzzing functionality linked into the v8 library.
# For binary size reasons this functionality is not always available.
v8_wasm_random_fuzzers = ""
+
+ # Set to true if V8 will be used in a shared library.
+ v8_used_in_shared_library = enable_cef
}
# Derived defaults.
@@ -805,6 +809,10 @@ config("internal_config") {
defines += [ "BUILDING_V8_SHARED" ]
}
+ if (v8_used_in_shared_library) {
+ defines += [ "V8_TLS_USED_IN_LIBRARY" ]
+ }
+
if (v8_current_cpu == "riscv64" || v8_current_cpu == "riscv32") {
if (!is_clang) {
libs = [ "atomic" ]

View File

@@ -1,11 +1,11 @@
diff --git chrome/browser/ui/views/toolbar/app_menu.cc chrome/browser/ui/views/toolbar/app_menu.cc
index e96fca7585c60..5cb08115ca9f8 100644
index 7d91e43c61417..8956ad4452b57 100644
--- chrome/browser/ui/views/toolbar/app_menu.cc
+++ chrome/browser/ui/views/toolbar/app_menu.cc
@@ -1014,7 +1014,9 @@ void AppMenu::RunMenu(views::MenuButtonController* host) {
host->button()->GetWidget(), host,
host->button()->GetAnchorBoundsInScreen(),
views::MenuAnchorPosition::kTopRight, ui::mojom::MenuSourceType::kNone,
views::MenuAnchorPosition::kTopRight, ui::MENU_SOURCE_NONE,
- /*native_view_for_gestures=*/gfx::NativeView(), /*corners=*/std::nullopt,
+ /*native_view_for_gestures=*/gfx::NativeView(),
+ /*parent_widget=*/gfx::kNullAcceleratedWidget,
@@ -14,7 +14,7 @@ index e96fca7585c60..5cb08115ca9f8 100644
}
diff --git ui/base/models/menu_model.h ui/base/models/menu_model.h
index ecd8177fd48cb..63d94b6f39a7b 100644
index 393dc941d9543..75618d210585a 100644
--- ui/base/models/menu_model.h
+++ ui/base/models/menu_model.h
@@ -17,8 +17,11 @@
@@ -29,7 +29,7 @@ index ecd8177fd48cb..63d94b6f39a7b 100644
}
namespace ui {
@@ -153,6 +156,27 @@ class COMPONENT_EXPORT(UI_BASE) MenuModel {
@@ -149,6 +152,27 @@ class COMPONENT_EXPORT(UI_BASE) MenuModel {
// |event_flags| is a bit mask of ui::EventFlags.
virtual void ActivatedAt(size_t index, int event_flags);
@@ -58,7 +58,7 @@ index ecd8177fd48cb..63d94b6f39a7b 100644
virtual void MenuWillShow() {}
diff --git ui/gfx/render_text.cc ui/gfx/render_text.cc
index ec4c6eb4e76dd..1b74741b8b2ff 100644
index c7d34b8b4e3d7..ce7a5c37e7b8a 100644
--- ui/gfx/render_text.cc
+++ ui/gfx/render_text.cc
@@ -707,6 +707,14 @@ void RenderText::SetWhitespaceElision(std::optional<bool> whitespace_elision) {
@@ -76,7 +76,7 @@ index ec4c6eb4e76dd..1b74741b8b2ff 100644
void RenderText::SetDisplayRect(const Rect& r) {
if (r != display_rect_) {
display_rect_ = r;
@@ -2144,6 +2152,18 @@ void RenderText::OnTextAttributeChanged() {
@@ -2145,6 +2153,18 @@ void RenderText::OnTextAttributeChanged() {
text_elided_ = false;
layout_text_up_to_date_ = false;
@@ -96,10 +96,10 @@ index ec4c6eb4e76dd..1b74741b8b2ff 100644
}
diff --git ui/gfx/render_text.h ui/gfx/render_text.h
index 624a22c8c5478..707aca5f8342a 100644
index ad2fb8c1a6078..d14890b136855 100644
--- ui/gfx/render_text.h
+++ ui/gfx/render_text.h
@@ -360,6 +360,10 @@ class COMPONENT_EXPORT(GFX) RenderText {
@@ -360,6 +360,10 @@ class GFX_EXPORT RenderText {
void SetWhitespaceElision(std::optional<bool> elide_whitespace);
std::optional<bool> whitespace_elision() const { return whitespace_elision_; }
@@ -110,7 +110,7 @@ index 624a22c8c5478..707aca5f8342a 100644
const Rect& display_rect() const { return display_rect_; }
void SetDisplayRect(const Rect& r);
@@ -1107,6 +1111,8 @@ class COMPONENT_EXPORT(GFX) RenderText {
@@ -1107,6 +1111,8 @@ class GFX_EXPORT RenderText {
// Tell whether or not the |layout_text_| needs an update or is up to date.
mutable bool layout_text_up_to_date_ = false;
@@ -133,10 +133,10 @@ index c579f65dce9f0..a04e0d1f66aaa 100644
friend class test::InkDropHostTestApi;
diff --git ui/views/controls/button/label_button.cc ui/views/controls/button/label_button.cc
index f17cd72dbe014..e300516f3df7c 100644
index 5b675ae814e09..bcea717c1a23b 100644
--- ui/views/controls/button/label_button.cc
+++ ui/views/controls/button/label_button.cc
@@ -596,6 +596,12 @@ void LabelButton::OnThemeChanged() {
@@ -585,6 +585,12 @@ void LabelButton::OnThemeChanged() {
SchedulePaint();
}
@@ -164,13 +164,13 @@ index 7586a6f089f62..4e3a40b33f535 100644
LabelButtonImageContainer* image_container() {
return image_container_.get();
diff --git ui/views/controls/label.cc ui/views/controls/label.cc
index d3267b9532029..9fa167d45b039 100644
index accbbb51263ba..7ba1eb32f1bb3 100644
--- ui/views/controls/label.cc
+++ ui/views/controls/label.cc
@@ -52,12 +52,29 @@ enum LabelPropertyKey {
kLabelLineHeight,
kLabelObscured,
kLabelAllowCharacterBreak,
kAccessibleTextOffsets,
+ kLabelDrawStringsFlags,
};
@@ -197,8 +197,8 @@ index d3267b9532029..9fa167d45b039 100644
} // namespace
namespace views {
@@ -518,6 +535,15 @@ void Label::SetElideBehavior(gfx::ElideBehavior elide_behavior) {
#endif // BUILDFLAG(SUPPORTS_AX_TEXT_OFFSETS)
@@ -497,6 +514,15 @@ void Label::SetElideBehavior(gfx::ElideBehavior elide_behavior) {
OnPropertyChanged(&elide_behavior_, kPropertyEffectsPreferredSizeChanged);
}
+void Label::SetDrawStringsFlags(int flags) {
@@ -213,7 +213,7 @@ index d3267b9532029..9fa167d45b039 100644
std::u16string Label::GetTooltipText() const {
return tooltip_text_;
}
@@ -837,6 +863,16 @@ std::unique_ptr<gfx::RenderText> Label::CreateRenderText() const {
@@ -816,6 +842,16 @@ std::unique_ptr<gfx::RenderText> Label::CreateRenderText() const {
render_text->SelectRange(stored_selection_range_);
}
@@ -231,7 +231,7 @@ index d3267b9532029..9fa167d45b039 100644
}
diff --git ui/views/controls/label.h ui/views/controls/label.h
index 0bd787bbc8687..6745dcddc5829 100644
index aae9bfa72f8f9..386cdead499f7 100644
--- ui/views/controls/label.h
+++ ui/views/controls/label.h
@@ -246,6 +246,10 @@ class VIEWS_EXPORT Label : public View,
@@ -245,7 +245,7 @@ index 0bd787bbc8687..6745dcddc5829 100644
// Gets/Sets the tooltip text. Default behavior for a label (single-line) is
// to show the full text if it is wider than its bounds. Calling this
// overrides the default behavior and lets you set a custom tooltip. To
@@ -540,6 +544,7 @@ class VIEWS_EXPORT Label : public View,
@@ -532,6 +536,7 @@ class VIEWS_EXPORT Label : public View,
int max_width_ = 0;
// This is used in single-line mode.
int max_width_single_line_ = 0;
@@ -254,10 +254,10 @@ index 0bd787bbc8687..6745dcddc5829 100644
std::unique_ptr<SelectionController> selection_controller_;
diff --git ui/views/controls/menu/menu_controller.cc ui/views/controls/menu/menu_controller.cc
index eea71e213db16..5e915151d5fa4 100644
index 901a933aa92a0..414d76b8b8992 100644
--- ui/views/controls/menu/menu_controller.cc
+++ ui/views/controls/menu/menu_controller.cc
@@ -578,7 +578,8 @@ void MenuController::Run(Widget* parent,
@@ -579,7 +579,8 @@ void MenuController::Run(Widget* parent,
MenuAnchorPosition position,
bool context_menu,
bool is_nested_drag,
@@ -267,7 +267,7 @@ index eea71e213db16..5e915151d5fa4 100644
exit_type_ = ExitType::kNone;
possible_drag_ = false;
drag_in_progress_ = false;
@@ -622,6 +623,7 @@ void MenuController::Run(Widget* parent,
@@ -624,6 +625,7 @@ void MenuController::Run(Widget* parent,
owner_->AddObserver(this);
native_view_for_gestures_ = native_view_for_gestures;
@@ -275,7 +275,7 @@ index eea71e213db16..5e915151d5fa4 100644
// Only create a MenuPreTargetHandler for non-nested menus. Nested menus
// will use the existing one.
@@ -2272,6 +2274,7 @@ void MenuController::OpenMenuImpl(MenuItemView* item, bool show) {
@@ -2264,6 +2266,7 @@ void MenuController::OpenMenuImpl(MenuItemView* item, bool show) {
params.do_capture = do_capture;
params.native_view_for_gestures = native_view_for_gestures_;
params.owned_window_anchor = anchor;
@@ -283,7 +283,7 @@ index eea71e213db16..5e915151d5fa4 100644
if (item->GetParentMenuItem()) {
params.context = item->GetWidget();
// (crbug.com/1414232) The item to be open is a submenu. Make sure
@@ -2965,8 +2968,13 @@ MenuItemView* MenuController::FindInitialSelectableMenuItem(
@@ -2955,8 +2958,13 @@ MenuItemView* MenuController::FindInitialSelectableMenuItem(
void MenuController::OpenSubmenuChangeSelectionIfCan() {
MenuItemView* item = pending_state_.item;
@@ -298,7 +298,7 @@ index eea71e213db16..5e915151d5fa4 100644
// Show the sub-menu.
SetSelection(item, SELECTION_OPEN_SUBMENU | SELECTION_UPDATE_IMMEDIATELY);
@@ -2986,8 +2994,10 @@ void MenuController::OpenSubmenuChangeSelectionIfCan() {
@@ -2976,8 +2984,10 @@ void MenuController::OpenSubmenuChangeSelectionIfCan() {
void MenuController::CloseSubmenu() {
MenuItemView* item = state_.item;
DCHECK(item);
@@ -311,7 +311,7 @@ index eea71e213db16..5e915151d5fa4 100644
SetSelection(item, SELECTION_UPDATE_IMMEDIATELY);
else if (item->GetParentMenuItem()->GetParentMenuItem())
diff --git ui/views/controls/menu/menu_controller.h ui/views/controls/menu/menu_controller.h
index 24daa0f4c9d5d..fd7b977b597e7 100644
index e516d8035db49..2209823333fd7 100644
--- ui/views/controls/menu/menu_controller.h
+++ ui/views/controls/menu/menu_controller.h
@@ -138,7 +138,9 @@ class VIEWS_EXPORT MenuController final : public gfx::AnimationDelegate,
@@ -325,7 +325,7 @@ index 24daa0f4c9d5d..fd7b977b597e7 100644
bool for_drop() const { return for_drop_; }
@@ -738,6 +740,8 @@ class VIEWS_EXPORT MenuController final : public gfx::AnimationDelegate,
@@ -742,6 +744,8 @@ class VIEWS_EXPORT MenuController final : public gfx::AnimationDelegate,
// RunType::SEND_GESTURE_EVENTS_TO_OWNER is set.
gfx::NativeView native_view_for_gestures_ = gfx::NativeView();
@@ -335,7 +335,7 @@ index 24daa0f4c9d5d..fd7b977b597e7 100644
bool possible_drag_ = false;
diff --git ui/views/controls/menu/menu_delegate.h ui/views/controls/menu/menu_delegate.h
index ea82da6dc2f45..575bd9484c2bf 100644
index ec079fa83c063..d644ab72fed07 100644
--- ui/views/controls/menu/menu_delegate.h
+++ ui/views/controls/menu/menu_delegate.h
@@ -73,6 +73,22 @@ class VIEWS_EXPORT MenuDelegate {
@@ -374,7 +374,7 @@ index ea82da6dc2f45..575bd9484c2bf 100644
virtual int GetMaxWidthForMenu(MenuItemView* menu);
diff --git ui/views/controls/menu/menu_host.cc ui/views/controls/menu/menu_host.cc
index 4e87636d2778c..0492351fb3e01 100644
index f315051d58d34..edffdf794b19d 100644
--- ui/views/controls/menu/menu_host.cc
+++ ui/views/controls/menu/menu_host.cc
@@ -148,6 +148,8 @@ void MenuHost::InitMenuHost(const InitParams& init_params) {
@@ -410,7 +410,7 @@ index fc1d5fccc3845..c065cafcd537c 100644
explicit MenuHost(SubmenuView* submenu);
diff --git ui/views/controls/menu/menu_item_view.cc ui/views/controls/menu/menu_item_view.cc
index 212a38af0598d..0fb02b639aefd 100644
index 14006cc21e5e2..a1e64d2b3aed1 100644
--- ui/views/controls/menu/menu_item_view.cc
+++ ui/views/controls/menu/menu_item_view.cc
@@ -1107,6 +1107,15 @@ void MenuItemView::PaintBackground(gfx::Canvas* canvas,
@@ -429,7 +429,7 @@ index 212a38af0598d..0fb02b639aefd 100644
} else if (paint_as_selected) {
gfx::Rect item_bounds = GetLocalBounds();
if (type_ == Type::kActionableSubMenu) {
@@ -1177,6 +1186,13 @@ void MenuItemView::PaintMinorIconAndText(gfx::Canvas* canvas, SkColor color) {
@@ -1171,6 +1180,13 @@ void MenuItemView::PaintMinorIconAndText(gfx::Canvas* canvas, SkColor color) {
}
SkColor MenuItemView::GetTextColor(bool minor, bool paint_as_selected) const {
@@ -574,7 +574,7 @@ index 720cd4aed05c1..2cb6f982ae8d6 100644
}
diff --git ui/views/controls/menu/menu_runner.h ui/views/controls/menu/menu_runner.h
index 493fda82af500..38d3344d97074 100644
index fa8028a7a6d20..dc6d1210462a4 100644
--- ui/views/controls/menu/menu_runner.h
+++ ui/views/controls/menu/menu_runner.h
@@ -157,6 +157,8 @@ class VIEWS_EXPORT MenuRunner {
@@ -661,7 +661,7 @@ index b0d0334939730..18a5a159ccaf4 100644
std::optional<std::string> show_menu_host_duration_histogram) override;
void Cancel() override;
diff --git ui/views/controls/menu/menu_runner_impl_cocoa.mm ui/views/controls/menu/menu_runner_impl_cocoa.mm
index d9ee2469c6f5e..13bcee3f329ba 100644
index c585f056973e2..02af08d23a9b9 100644
--- ui/views/controls/menu/menu_runner_impl_cocoa.mm
+++ ui/views/controls/menu/menu_runner_impl_cocoa.mm
@@ -70,6 +70,7 @@ void MenuRunnerImplCocoa::RunMenuAt(
@@ -745,10 +745,10 @@ index e171461e28836..e137275a22a12 100644
std::optional<std::string> show_menu_host_duration_histogram) {
RunMenu(parent, bounds.CenterPoint());
diff --git ui/views/controls/menu/menu_scroll_view_container.cc ui/views/controls/menu/menu_scroll_view_container.cc
index a1476c32d31c5..2c988a5bb3d4f 100644
index 87427e16e1b60..eb5998419a8f3 100644
--- ui/views/controls/menu/menu_scroll_view_container.cc
+++ ui/views/controls/menu/menu_scroll_view_container.cc
@@ -266,6 +266,11 @@ MenuScrollViewContainer::MenuScrollViewContainer(SubmenuView* content_view)
@@ -254,6 +254,11 @@ MenuScrollViewContainer::MenuScrollViewContainer(SubmenuView* content_view)
scroll_down_button_ = background_view_->AddChildView(
std::make_unique<MenuScrollButton>(content_view, false));
@@ -761,18 +761,18 @@ index a1476c32d31c5..2c988a5bb3d4f 100644
content_view_->GetMenuItem()->GetMenuController()->GetAnchorPosition());
diff --git ui/views/test/ui_controls_factory_desktop_aura_ozone.cc ui/views/test/ui_controls_factory_desktop_aura_ozone.cc
index 92b86fccb3a30..964351594f1e4 100644
index dcf4b60ad92c2..64fa80edefc1b 100644
--- ui/views/test/ui_controls_factory_desktop_aura_ozone.cc
+++ ui/views/test/ui_controls_factory_desktop_aura_ozone.cc
@@ -15,6 +15,7 @@
#include "base/run_loop.h"
@@ -16,6 +16,7 @@
#include "base/task/single_thread_task_runner.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
+#include "cef/libcef/features/features.h"
#include "ui/aura/client/screen_position_client.h"
#include "ui/aura/env.h"
#include "ui/aura/test/aura_test_utils.h"
@@ -171,9 +172,11 @@ bool SendMouseMoveNotifyWhenDone(int screen_x,
@@ -181,9 +182,11 @@ bool SendMouseMoveNotifyWhenDone(int screen_x,
aura::test::QueryLatestMousePositionRequestInHost(host);
host->ConvertPixelsToDIP(&root_current_location);
@@ -782,10 +782,10 @@ index 92b86fccb3a30..964351594f1e4 100644
screen->set_cursor_screen_point(gfx::Point(screen_x, screen_y));
+#endif
#if !BUILDFLAG(IS_CHROMEOS_LACROS)
if (root_location != root_current_location &&
!g_ozone_ui_controls_test_helper->MustUseUiControlsForMoveCursorTo() &&
diff --git ui/views/view.h ui/views/view.h
index d3f42b37d06fa..fbf1b94c7e07a 100644
index 14d175dacf2ae..7a7c051f6ee08 100644
--- ui/views/view.h
+++ ui/views/view.h
@@ -25,6 +25,7 @@
@@ -796,7 +796,7 @@ index d3f42b37d06fa..fbf1b94c7e07a 100644
#include "base/types/pass_key.h"
#include "build/build_config.h"
#include "third_party/skia/include/core/SkPath.h"
@@ -289,7 +290,8 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
@@ -290,7 +291,8 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
public ui::EventTarget,
public ui::EventHandler,
public ui::PropertyHandler,
@@ -806,7 +806,7 @@ index d3f42b37d06fa..fbf1b94c7e07a 100644
// Do not remove this macro!
// The macro is maintained by the memory safety team.
ADVANCED_MEMORY_SAFETY_CHECKS();
@@ -609,7 +611,7 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
@@ -610,7 +612,7 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
// Return the preferred height for a specific width. It is a helper function
// of GetPreferredSize(SizeBounds(w, SizeBound())).height().

View File

@@ -1,8 +1,8 @@
diff --git ui/views/controls/textfield/textfield.cc ui/views/controls/textfield/textfield.cc
index 85bb58edd7041..36d9bf3ae5263 100644
index 931fd32050882..06f009728d812 100644
--- ui/views/controls/textfield/textfield.cc
+++ ui/views/controls/textfield/textfield.cc
@@ -3028,6 +3028,10 @@ void Textfield::OnCursorBlinkTimerFired() {
@@ -3017,6 +3017,10 @@ void Textfield::OnCursorBlinkTimerFired() {
void Textfield::OnEnabledChanged() {
if (GetInputMethod())
GetInputMethod()->OnTextInputTypeChanged(this);

View File

@@ -1,5 +1,5 @@
diff --git chrome/browser/extensions/api/sessions/sessions_api.cc chrome/browser/extensions/api/sessions/sessions_api.cc
index ea4123fa52305..aee79b9db521e 100644
index 747d429ae99a5..c8dd80409068b 100644
--- chrome/browser/extensions/api/sessions/sessions_api.cc
+++ chrome/browser/extensions/api/sessions/sessions_api.cc
@@ -341,6 +341,7 @@ SessionsGetDevicesFunction::CreateWindowModel(
@@ -11,10 +11,10 @@ index ea4123fa52305..aee79b9db521e 100644
break;
case ui::mojom::WindowShowState::kMaximized:
diff --git chrome/browser/ui/views/apps/chrome_native_app_window_views_aura.cc chrome/browser/ui/views/apps/chrome_native_app_window_views_aura.cc
index 60c1a8d04fdb6..728a44ee45ab7 100644
index 6156dd1ccab4c..a2721ea15863e 100644
--- chrome/browser/ui/views/apps/chrome_native_app_window_views_aura.cc
+++ chrome/browser/ui/views/apps/chrome_native_app_window_views_aura.cc
@@ -37,6 +37,7 @@ ui::mojom::WindowShowState ChromeNativeAppWindowViewsAura::GetRestorableState(
@@ -43,6 +43,7 @@ ui::mojom::WindowShowState ChromeNativeAppWindowViewsAura::GetRestorableState(
case ui::mojom::WindowShowState::kDefault:
case ui::mojom::WindowShowState::kMinimized:
@@ -61,10 +61,10 @@ index 514f81ee655f5..ba5ab6729b359 100644
case ui::mojom::WindowShowState::kMaximized:
return kSerializedShowStateMaximized;
diff --git content/browser/renderer_host/render_widget_host_view_base.cc content/browser/renderer_host/render_widget_host_view_base.cc
index 7684afb6afe8e..fe3195fdbc37b 100644
index 72c5c119911a6..7c1bccc2a048e 100644
--- content/browser/renderer_host/render_widget_host_view_base.cc
+++ content/browser/renderer_host/render_widget_host_view_base.cc
@@ -586,6 +586,14 @@ float RenderWidgetHostViewBase::GetScaleOverrideForCapture() const {
@@ -590,6 +590,14 @@ float RenderWidgetHostViewBase::GetScaleOverrideForCapture() const {
return scale_override_for_capture_;
}
@@ -148,7 +148,7 @@ index bdd8712db25a5..ae8a13e7f4c49 100644
// renderer process changes. This method is called before notifying
// RenderWidgetHostImpl in order to allow the view to allocate a new
diff --git content/browser/renderer_host/render_widget_host_view_event_handler.cc content/browser/renderer_host/render_widget_host_view_event_handler.cc
index 41b34a27176a3..bdf5f9d4bb61e 100644
index a131d58351110..196fe4d25d4a7 100644
--- content/browser/renderer_host/render_widget_host_view_event_handler.cc
+++ content/browser/renderer_host/render_widget_host_view_event_handler.cc
@@ -52,6 +52,10 @@ namespace {
@@ -215,10 +215,10 @@ index b4ff7c11d8e3c..b21417f89e6e1 100644
// Set the view's active state (i.e., tint state of controls).
virtual void SetActive(bool active) = 0;
diff --git ui/aura/native_window_occlusion_tracker_win.cc ui/aura/native_window_occlusion_tracker_win.cc
index 2c79ae48b7069..81cd4a84b0a6c 100644
index e9bb4ee5bccee..e6172b1a8d53f 100644
--- ui/aura/native_window_occlusion_tracker_win.cc
+++ ui/aura/native_window_occlusion_tracker_win.cc
@@ -100,6 +100,13 @@ void NativeWindowOcclusionTrackerWin::Enable(Window* window) {
@@ -102,6 +102,13 @@ void NativeWindowOcclusionTrackerWin::Enable(Window* window) {
// when it's no longer true that all windows are minimized, and when the
// window is destroyed.
HWND root_window_hwnd = window->GetHost()->GetAcceleratedWidget();
@@ -233,10 +233,10 @@ index 2c79ae48b7069..81cd4a84b0a6c 100644
// Remember this mapping from hwnd to Window*.
hwnd_root_window_map_[root_window_hwnd] = window;
diff --git ui/base/mojom/window_show_state.mojom ui/base/mojom/window_show_state.mojom
index aeaf8e35f7eda..4b7cc3f03d3cf 100644
index 526b6129d6d01..1937a441b930d 100644
--- ui/base/mojom/window_show_state.mojom
+++ ui/base/mojom/window_show_state.mojom
@@ -20,6 +20,7 @@ enum WindowShowState {
@@ -23,6 +23,7 @@ enum WindowShowState {
kMaximized = 3,
kInactive = 4, // Views only, not persisted.
kFullscreen = 5,
@@ -246,10 +246,10 @@ index aeaf8e35f7eda..4b7cc3f03d3cf 100644
+ [MinVersion=1] kEnd = 7,
};
diff --git ui/ozone/platform/x11/x11_window.cc ui/ozone/platform/x11/x11_window.cc
index e51966febabea..0bf553721be40 100644
index e237b24eebe7c..39375a38fa680 100644
--- ui/ozone/platform/x11/x11_window.cc
+++ ui/ozone/platform/x11/x11_window.cc
@@ -1877,7 +1877,8 @@ void X11Window::CreateXWindow(const PlatformWindowInitProperties& properties) {
@@ -1876,7 +1876,8 @@ void X11Window::CreateXWindow(const PlatformWindowInitProperties& properties) {
req.border_pixel = 0;
bounds_in_pixels_ = SanitizeBounds(bounds);
@@ -337,10 +337,10 @@ index 590f97eee1fda..3980e814e80b9 100644
base::WeakPtrFactory<DesktopWindowTreeHostLinux> weak_factory_{this};
};
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc
index 9690d769e804f..4e2f015d1a142 100644
index 628494b15591f..32cbfb8314439 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc
@@ -269,8 +269,8 @@ void DesktopWindowTreeHostPlatform::Init(const Widget::InitParams& params) {
@@ -282,8 +282,8 @@ void DesktopWindowTreeHostPlatform::Init(const Widget::InitParams& params) {
if (properties.parent_widget) {
window_parent_ = DesktopWindowTreeHostPlatform::GetHostForWidget(
properties.parent_widget);
@@ -506,10 +506,10 @@ index 1e2c5bb35cc31..e73afc2d303ac 100644
// the implementation of ::ShowCursor() is based on a counter, so making this
// member static ensures that ::ShowCursor() is always called exactly once
diff --git ui/views/widget/native_widget_mac.mm ui/views/widget/native_widget_mac.mm
index 928f50fe35775..423ebc5a0f025 100644
index 85c36216bbadf..2f6b48b656102 100644
--- ui/views/widget/native_widget_mac.mm
+++ ui/views/widget/native_widget_mac.mm
@@ -655,6 +655,7 @@ void NativeWidgetMac::Show(ui::mojom::WindowShowState show_state,
@@ -662,6 +662,7 @@ void NativeWidgetMac::Show(ui::mojom::WindowShowState show_state,
break;
case ui::mojom::WindowShowState::kMaximized:
case ui::mojom::WindowShowState::kFullscreen:
@@ -518,10 +518,10 @@ index 928f50fe35775..423ebc5a0f025 100644
break;
case ui::mojom::WindowShowState::kEnd:
diff --git ui/views/widget/widget.cc ui/views/widget/widget.cc
index 75e3107153ea0..07b0037be4ecf 100644
index ed69823cc34d7..116588f1f9e45 100644
--- ui/views/widget/widget.cc
+++ ui/views/widget/widget.cc
@@ -425,7 +425,8 @@ void Widget::Init(InitParams params) {
@@ -423,7 +423,8 @@ void Widget::Init(InitParams params) {
}
params.child |= (params.type == InitParams::TYPE_CONTROL);
@@ -531,7 +531,7 @@ index 75e3107153ea0..07b0037be4ecf 100644
is_headless_ = params.ShouldInitAsHeadless();
is_autosized_ = params.autosize;
@@ -535,9 +536,14 @@ void Widget::Init(InitParams params) {
@@ -530,9 +531,14 @@ void Widget::Init(InitParams params) {
if (show_state == ui::mojom::WindowShowState::kMaximized) {
Maximize();
@@ -545,8 +545,8 @@ index 75e3107153ea0..07b0037be4ecf 100644
+ Hide();
}
#if BUILDFLAG(IS_CHROMEOS)
@@ -551,7 +557,12 @@ void Widget::Init(InitParams params) {
#if BUILDFLAG(IS_CHROMEOS_ASH)
@@ -546,7 +552,12 @@ void Widget::Init(InitParams params) {
} else if (delegate) {
SetContentsView(delegate->TransferOwnershipOfContentsView());
if (should_set_initial_bounds) {
@@ -560,7 +560,7 @@ index 75e3107153ea0..07b0037be4ecf 100644
}
}
@@ -1729,10 +1740,16 @@ void Widget::OnNativeWidgetParentChanged(gfx::NativeView parent) {
@@ -1736,10 +1747,16 @@ void Widget::OnNativeWidgetParentChanged(gfx::NativeView parent) {
}
gfx::Size Widget::GetMinimumSize() const {
@@ -577,7 +577,7 @@ index 75e3107153ea0..07b0037be4ecf 100644
return non_client_view_ ? non_client_view_->GetMaximumSize() : gfx::Size();
}
@@ -1984,7 +2001,8 @@ bool Widget::SetInitialFocus(ui::mojom::WindowShowState show_state) {
@@ -1990,7 +2007,8 @@ bool Widget::SetInitialFocus(ui::mojom::WindowShowState show_state) {
View* v = widget_delegate_->GetInitiallyFocusedView();
if (!focus_on_creation_ ||
show_state == ui::mojom::WindowShowState::kInactive ||
@@ -588,10 +588,10 @@ index 75e3107153ea0..07b0037be4ecf 100644
// focus when the window is restored.
if (v)
diff --git ui/views/widget/widget.h ui/views/widget/widget.h
index 0510a8c1383bb..aa6ca922ce596 100644
index 42c7ccb7a26f0..0483a550d415f 100644
--- ui/views/widget/widget.h
+++ ui/views/widget/widget.h
@@ -368,6 +368,8 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
@@ -366,6 +366,8 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
// the concept with bubble anchoring a la BubbleDialogDelegateView.
gfx::NativeView parent = gfx::NativeView();
@@ -600,7 +600,7 @@ index 0510a8c1383bb..aa6ca922ce596 100644
// Specifies the initial bounds of the Widget. Default is empty, which means
// the NativeWidget may specify a default size. If the parent is specified,
// |bounds| is in the parent's coordinate system. If the parent is not
@@ -768,7 +770,7 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
@@ -779,7 +781,7 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
void ShowInactive();
// Activates the widget, assuming it already exists and is visible.
@@ -639,10 +639,10 @@ index f28c1d1fb5581..4e2390b94cbe9 100644
if (native_widget_delegate->IsDialogBox()) {
*style |= DS_MODALFRAME;
diff --git ui/views/win/hwnd_message_handler.cc ui/views/win/hwnd_message_handler.cc
index 509bbf34ed99b..71c33ad95e880 100644
index 328cf96499fa2..879fb9820ee38 100644
--- ui/views/win/hwnd_message_handler.cc
+++ ui/views/win/hwnd_message_handler.cc
@@ -773,7 +773,11 @@ bool HWNDMessageHandler::IsVisible() const {
@@ -774,7 +774,11 @@ bool HWNDMessageHandler::IsVisible() const {
}
bool HWNDMessageHandler::IsActive() const {
@@ -655,7 +655,7 @@ index 509bbf34ed99b..71c33ad95e880 100644
}
bool HWNDMessageHandler::IsMinimized() const {
@@ -3136,10 +3140,13 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
@@ -3229,10 +3233,13 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
} else if (event.type() == ui::EventType::kMousewheel) {
ui::MouseWheelEvent mouse_wheel_event(msg);
// Reroute the mouse wheel to the window under the pointer if applicable.

View File

@@ -80,10 +80,10 @@ index 8af69cac78b74..9f74e511c263d 100644
private:
const HWND hwnd_;
diff --git components/viz/service/BUILD.gn components/viz/service/BUILD.gn
index 1db2476ae1c2a..89fe45d2ec8f3 100644
index 050ff22c63d6a..f5f553df64bd4 100644
--- components/viz/service/BUILD.gn
+++ components/viz/service/BUILD.gn
@@ -268,6 +268,8 @@ viz_component("service") {
@@ -264,6 +264,8 @@ viz_component("service") {
"transitions/surface_animation_manager.h",
"transitions/transferable_resource_tracker.cc",
"transitions/transferable_resource_tracker.h",
@@ -93,7 +93,7 @@ index 1db2476ae1c2a..89fe45d2ec8f3 100644
defines = [ "VIZ_SERVICE_IMPLEMENTATION" ]
diff --git components/viz/service/display_embedder/output_surface_provider_impl.cc components/viz/service/display_embedder/output_surface_provider_impl.cc
index 4be4660c007ee..a689ba262bb81 100644
index 87722045daafa..67c673ab71171 100644
--- components/viz/service/display_embedder/output_surface_provider_impl.cc
+++ components/viz/service/display_embedder/output_surface_provider_impl.cc
@@ -18,6 +18,7 @@
@@ -112,7 +112,7 @@ index 4be4660c007ee..a689ba262bb81 100644
#include "ui/base/ui_base_switches.h"
#if BUILDFLAG(IS_WIN)
@@ -146,6 +148,20 @@ OutputSurfaceProviderImpl::CreateSoftwareOutputDeviceForPlatform(
@@ -147,6 +149,20 @@ OutputSurfaceProviderImpl::CreateSoftwareOutputDeviceForPlatform(
if (headless_)
return std::make_unique<SoftwareOutputDevice>();
@@ -170,7 +170,7 @@ index 6ad03ff41c8ae..5d1add76f8aff 100644
compositor_data.display_client->GetBoundRemote(resize_task_runner_);
mojo::AssociatedRemote<viz::mojom::ExternalBeginFrameController>
diff --git mojo/public/cpp/bindings/sync_call_restrictions.h mojo/public/cpp/bindings/sync_call_restrictions.h
index 793fe1b921b05..161ce2335c265 100644
index 7962a863f488a..bca9de4548799 100644
--- mojo/public/cpp/bindings/sync_call_restrictions.h
+++ mojo/public/cpp/bindings/sync_call_restrictions.h
@@ -43,6 +43,7 @@ class Compositor;
@@ -181,7 +181,7 @@ index 793fe1b921b05..161ce2335c265 100644
class GpuHostImpl;
class HostFrameSinkManager;
class HostGpuMemoryBufferManager;
@@ -125,6 +126,8 @@ class COMPONENT_EXPORT(MOJO_CPP_BINDINGS) SyncCallRestrictions {
@@ -119,6 +120,8 @@ class COMPONENT_EXPORT(MOJO_CPP_BINDINGS) SyncCallRestrictions {
// For preventing frame swaps of wrong size during resize on Windows.
// (https://crbug.com/811945)
friend class ui::Compositor;
@@ -223,10 +223,10 @@ index 2f462f0deb5fc..695869b83cefa 100644
+ Draw(gfx.mojom.Rect damage_rect) => ();
};
diff --git ui/compositor/compositor.h ui/compositor/compositor.h
index c0809410472cc..8d2f98b2ab577 100644
index 58da7f0697dd2..96e3f6358d9a4 100644
--- ui/compositor/compositor.h
+++ ui/compositor/compositor.h
@@ -32,7 +32,9 @@
@@ -33,7 +33,9 @@
#include "components/viz/common/frame_sinks/begin_frame_args.h"
#include "components/viz/common/surfaces/frame_sink_id.h"
#include "components/viz/common/surfaces/subtree_capture_id.h"
@@ -236,7 +236,7 @@ index c0809410472cc..8d2f98b2ab577 100644
#include "mojo/public/cpp/bindings/associated_remote.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "services/viz/privileged/mojom/compositing/display_private.mojom.h"
@@ -140,6 +142,14 @@ class COMPOSITOR_EXPORT ContextFactory {
@@ -141,6 +143,14 @@ class COMPOSITOR_EXPORT ContextFactory {
virtual viz::HostFrameSinkManager* GetHostFrameSinkManager() = 0;
};
@@ -251,7 +251,7 @@ index c0809410472cc..8d2f98b2ab577 100644
// Compositor object to take care of GPU painting.
// A Browser compositor object is responsible for generating the final
// displayable form of pixels comprising a single widget's contents. It draws an
@@ -183,6 +193,9 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
@@ -184,6 +194,9 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
// Schedules a redraw of the layer tree associated with this compositor.
void ScheduleDraw();
@@ -261,7 +261,7 @@ index c0809410472cc..8d2f98b2ab577 100644
// Sets the root of the layer tree drawn by this Compositor. The root layer
// must have no parent. The compositor's root layer is reset if the root layer
// is destroyed. NULL can be passed to reset the root layer, in which case the
@@ -562,6 +575,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
@@ -563,6 +576,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
simple_begin_frame_observers_;
std::unique_ptr<ui::HostBeginFrameObserver> host_begin_frame_observer_;

View File

@@ -1,8 +1,8 @@
diff --git content/browser/web_contents/web_contents_impl.cc content/browser/web_contents/web_contents_impl.cc
index 62420958702ce..5eea0a71ed342 100644
index eaa40a041a817..13c93d9e85b08 100644
--- content/browser/web_contents/web_contents_impl.cc
+++ content/browser/web_contents/web_contents_impl.cc
@@ -3760,6 +3760,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
@@ -3656,6 +3656,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
params.main_frame_name, GetOpener(), primary_main_frame_policy,
base::UnguessableToken::Create());
@@ -15,7 +15,7 @@ index 62420958702ce..5eea0a71ed342 100644
std::unique_ptr<WebContentsViewDelegate> delegate =
GetContentClient()->browser()->GetWebContentsViewDelegate(this);
@@ -3770,6 +3776,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
@@ -3666,6 +3672,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
view_ = CreateWebContentsView(this, std::move(delegate),
&render_view_host_delegate_view_);
}
@@ -23,17 +23,17 @@ index 62420958702ce..5eea0a71ed342 100644
CHECK(render_view_host_delegate_view_);
CHECK(view_.get());
@@ -3968,6 +3975,9 @@ void WebContentsImpl::RenderWidgetCreated(
@@ -3863,6 +3870,9 @@ void WebContentsImpl::RenderWidgetCreated(
OPTIONAL_TRACE_EVENT1("content", "WebContentsImpl::RenderWidgetCreated",
"render_widget_host", render_widget_host);
CHECK(!created_widgets_.contains(render_widget_host->GetFrameSinkId()));
created_widgets_[render_widget_host->GetFrameSinkId()] = render_widget_host;
created_widgets_.insert(render_widget_host);
+
+ observers_.NotifyObservers(
+ &WebContentsObserver::RenderWidgetCreated, render_widget_host);
}
void WebContentsImpl::RenderWidgetDeleted(
@@ -4855,6 +4865,15 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -4746,6 +4756,15 @@ FrameTree* WebContentsImpl::CreateNewWindow(
create_params.picture_in_picture_options = *(params.pip_options);
}
@@ -49,7 +49,7 @@ index 62420958702ce..5eea0a71ed342 100644
// Check whether there is an available prerendered page for this navigation if
// this is not for guest. If it exists, take WebContents pre-created for
// hosting the prerendered page instead of creating new WebContents.
@@ -9318,6 +9337,9 @@ void WebContentsImpl::SetFocusedFrame(FrameTreeNode* node,
@@ -9161,6 +9180,9 @@ void WebContentsImpl::SetFocusedFrame(FrameTreeNode* node,
}
CloseListenerManager::DidChangeFocusedFrame(this);
@@ -60,11 +60,11 @@ index 62420958702ce..5eea0a71ed342 100644
FrameTree* WebContentsImpl::GetOwnedPictureInPictureFrameTree() {
diff --git content/public/browser/web_contents.h content/public/browser/web_contents.h
index 191a98adec4cc..2350fe1139fe4 100644
index 09099f8ba7b05..7f4ef83efa8af 100644
--- content/public/browser/web_contents.h
+++ content/public/browser/web_contents.h
@@ -111,10 +111,12 @@ class BrowserPluginGuestDelegate;
class GuestPageHolder;
@@ -110,10 +110,12 @@ class BrowserContext;
class BrowserPluginGuestDelegate;
class RenderFrameHost;
class RenderViewHost;
+class RenderViewHostDelegateView;
@@ -76,7 +76,7 @@ index 191a98adec4cc..2350fe1139fe4 100644
class WebUI;
struct DropData;
struct MHTMLGenerationParams;
@@ -275,6 +277,10 @@ class WebContents : public PageNavigator, public base::SupportsUserData {
@@ -259,6 +261,10 @@ class WebContents : public PageNavigator, public base::SupportsUserData {
network::mojom::WebSandboxFlags starting_sandbox_flags =
network::mojom::WebSandboxFlags::kNone;
@@ -88,10 +88,10 @@ index 191a98adec4cc..2350fe1139fe4 100644
// the value that'll be returned by GetLastActiveTimeTicks(). If this is
// left default initialized then the value is not passed on to the
diff --git content/public/browser/web_contents_delegate.h content/public/browser/web_contents_delegate.h
index 77ee6ba6c65c9..59f7c8cc58b60 100644
index 19dff7ea3f62e..af796b114b3e1 100644
--- content/public/browser/web_contents_delegate.h
+++ content/public/browser/web_contents_delegate.h
@@ -67,9 +67,11 @@ class EyeDropperListener;
@@ -65,9 +65,11 @@ class EyeDropperListener;
class FileSelectListener;
class JavaScriptDialogManager;
class RenderFrameHost;
@@ -103,7 +103,7 @@ index 77ee6ba6c65c9..59f7c8cc58b60 100644
struct ContextMenuParams;
struct DropData;
struct MediaPlayerWatchTime;
@@ -368,6 +370,14 @@ class CONTENT_EXPORT WebContentsDelegate {
@@ -366,6 +368,14 @@ class CONTENT_EXPORT WebContentsDelegate {
const StoragePartitionConfig& partition_config,
SessionStorageNamespace* session_storage_namespace);
@@ -119,10 +119,10 @@ index 77ee6ba6c65c9..59f7c8cc58b60 100644
// typically happens when popups are created.
virtual void WebContentsCreated(WebContents* source_contents,
diff --git content/public/browser/web_contents_observer.h content/public/browser/web_contents_observer.h
index f3284b11c2a9d..f10a23e765c1c 100644
index 58e3918a83b1a..d5e94d504bb2f 100644
--- content/public/browser/web_contents_observer.h
+++ content/public/browser/web_contents_observer.h
@@ -244,6 +244,9 @@ class CONTENT_EXPORT WebContentsObserver : public base::CheckedObserver {
@@ -255,6 +255,9 @@ class CONTENT_EXPORT WebContentsObserver : public base::CheckedObserver {
// controlled by the capturing tab.
virtual void OnCapturedSurfaceControl() {}
@@ -132,7 +132,7 @@ index f3284b11c2a9d..f10a23e765c1c 100644
// This method is invoked when the `blink::WebView` of the current
// RenderViewHost is ready, e.g. because we recreated it after a crash.
virtual void RenderViewReady() {}
@@ -917,6 +920,10 @@ class CONTENT_EXPORT WebContentsObserver : public base::CheckedObserver {
@@ -922,6 +925,10 @@ class CONTENT_EXPORT WebContentsObserver : public base::CheckedObserver {
// WebContents has gained/lost focus.
virtual void OnFocusChangedInPage(FocusedNodeDetails* details) {}

View File

@@ -1,8 +1,8 @@
diff --git third_party/blink/public/platform/platform.h third_party/blink/public/platform/platform.h
index f2be7de2e13b7..4708b9ee705b3 100644
index 136ef25ea7e09..df60c7292b8c4 100644
--- third_party/blink/public/platform/platform.h
+++ third_party/blink/public/platform/platform.h
@@ -812,6 +812,11 @@ class BLINK_PLATFORM_EXPORT Platform {
@@ -808,6 +808,11 @@ class BLINK_PLATFORM_EXPORT Platform {
}
#endif
@@ -13,9 +13,9 @@ index f2be7de2e13b7..4708b9ee705b3 100644
+
private:
static void InitializeMainThreadCommon(
std::unique_ptr<MainThread> main_thread);
Platform* platform,
diff --git third_party/blink/renderer/core/inspector/devtools_session.cc third_party/blink/renderer/core/inspector/devtools_session.cc
index 128bb7d84c392..dd4f22aee9a52 100644
index bc9094123bfcf..021cb3cfdefb1 100644
--- third_party/blink/renderer/core/inspector/devtools_session.cc
+++ third_party/blink/renderer/core/inspector/devtools_session.cc
@@ -16,6 +16,7 @@

View File

@@ -1,8 +1,8 @@
diff --git third_party/blink/public/web/web_view.h third_party/blink/public/web/web_view.h
index 083af135d890c..799ef161a493a 100644
index 746af7113a66d..63346d59fe411 100644
--- third_party/blink/public/web/web_view.h
+++ third_party/blink/public/web/web_view.h
@@ -344,6 +344,7 @@ class BLINK_EXPORT WebView {
@@ -341,6 +341,7 @@ class BLINK_EXPORT WebView {
// Sets whether select popup menus should be rendered by the browser.
static void SetUseExternalPopupMenus(bool);
@@ -11,10 +11,10 @@ index 083af135d890c..799ef161a493a 100644
// Cancels and hides the current popup (datetime, select...) if any.
virtual void CancelPagePopup() = 0;
diff --git third_party/blink/renderer/core/exported/web_view_impl.cc third_party/blink/renderer/core/exported/web_view_impl.cc
index ad134361e0b9c..374faaa1464f2 100644
index fb7d3474e5191..04159df707fd9 100644
--- third_party/blink/renderer/core/exported/web_view_impl.cc
+++ third_party/blink/renderer/core/exported/web_view_impl.cc
@@ -257,8 +257,13 @@ void WebView::SetUseExternalPopupMenus(bool use_external_popup_menus) {
@@ -253,8 +253,13 @@ void WebView::SetUseExternalPopupMenus(bool use_external_popup_menus) {
g_should_use_external_popup_menus = use_external_popup_menus;
}
@@ -30,7 +30,7 @@ index ad134361e0b9c..374faaa1464f2 100644
}
namespace {
@@ -617,6 +622,7 @@ WebViewImpl::WebViewImpl(
@@ -616,6 +621,7 @@ WebViewImpl::WebViewImpl(
blink::ZoomFactorToZoomLevel(kMinimumBrowserZoomFactor)),
maximum_zoom_level_(
blink::ZoomFactorToZoomLevel(kMaximumBrowserZoomFactor)),
@@ -39,7 +39,7 @@ index ad134361e0b9c..374faaa1464f2 100644
fullscreen_controller_(std::make_unique<FullscreenController>(this)),
page_base_background_color_(
diff --git third_party/blink/renderer/core/exported/web_view_impl.h third_party/blink/renderer/core/exported/web_view_impl.h
index e4784453b357e..5dbbd3cd073d2 100644
index e85443e4492d3..228fe7496b6d2 100644
--- third_party/blink/renderer/core/exported/web_view_impl.h
+++ third_party/blink/renderer/core/exported/web_view_impl.h
@@ -140,7 +140,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
@@ -52,7 +52,7 @@ index e4784453b357e..5dbbd3cd073d2 100644
// Returns whether frames under this WebView are backed by a compositor.
bool does_composite() const { return does_composite_; }
@@ -880,6 +881,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
@@ -873,6 +874,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
float fake_page_scale_animation_page_scale_factor_ = 0.f;
bool fake_page_scale_animation_use_anchor_ = false;
@@ -62,10 +62,10 @@ index e4784453b357e..5dbbd3cd073d2 100644
gfx::Transform device_emulation_transform_;
diff --git third_party/blink/renderer/core/page/chrome_client_impl.cc third_party/blink/renderer/core/page/chrome_client_impl.cc
index d07cb090ec4b1..4a684b4df186e 100644
index 81d3ec54e4dae..0fa937e36579a 100644
--- third_party/blink/renderer/core/page/chrome_client_impl.cc
+++ third_party/blink/renderer/core/page/chrome_client_impl.cc
@@ -971,7 +971,7 @@ PopupMenu* ChromeClientImpl::OpenPopupMenu(LocalFrame& frame,
@@ -973,7 +973,7 @@ PopupMenu* ChromeClientImpl::OpenPopupMenu(LocalFrame& frame,
HTMLSelectElement& select) {
NotifyPopupOpeningObservers();

View File

@@ -89,7 +89,7 @@ index db8209bbcc214..b50bce7fae5b5 100644
HICON GetSmallAppIcon();
diff --git chrome/common/chrome_constants.cc chrome/common/chrome_constants.cc
index 298138e77b9f6..cce479212b682 100644
index ba30144d3e7be..ec2d3c5e7298c 100644
--- chrome/common/chrome_constants.cc
+++ chrome/common/chrome_constants.cc
@@ -6,6 +6,7 @@

View File

@@ -1,5 +1,5 @@
diff --git sandbox/policy/win/sandbox_win.cc sandbox/policy/win/sandbox_win.cc
index 5f5857379ad34..1de09e19a2350 100644
index b550651a8a981..f5664314075dc 100644
--- sandbox/policy/win/sandbox_win.cc
+++ sandbox/policy/win/sandbox_win.cc
@@ -963,6 +963,17 @@ ResultCode SandboxWin::StartSandboxedProcess(

View File

@@ -1,5 +1,5 @@
diff --git base/time/time.h base/time/time.h
index 36b7d12bf5b8e..6b07c2bb11b4c 100644
index 09bf6df3f8301..a389b92b49be7 100644
--- base/time/time.h
+++ base/time/time.h
@@ -134,6 +134,13 @@ constexpr bool isnan(double d) {

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