Compare commits
6 Commits
c166b4abc9
...
c718a5bee6
Author | SHA1 | Date |
---|---|---|
Marshall Greenblatt | c718a5bee6 | |
Marshall Greenblatt | 7538208409 | |
Marshall Greenblatt | f8b673a3ea | |
Marshall Greenblatt | 89ab864065 | |
Marshall Greenblatt | 7abba8b86d | |
Marshall Greenblatt | 34dbad30db |
13
BUILD.gn
13
BUILD.gn
|
@ -1147,6 +1147,19 @@ 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.
|
||||
|
|
|
@ -7,5 +7,5 @@
|
|||
# https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
|
||||
|
||||
{
|
||||
'chromium_checkout': 'refs/tags/131.0.6778.0'
|
||||
'chromium_checkout': 'refs/tags/132.0.6834.0'
|
||||
}
|
||||
|
|
|
@ -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-blink.h"
|
||||
#include "third_party/blink/public/mojom/input/focus_type.mojom.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::blink::FocusType::kNone &&
|
||||
details->focus_type != blink::mojom::FocusType::kNone &&
|
||||
details->is_editable_node;
|
||||
}
|
||||
|
||||
|
|
|
@ -47,9 +47,8 @@ SkAlphaType GetSkAlphaType(cef_alpha_type_t alpha_type) {
|
|||
}
|
||||
|
||||
// Compress as PNG. Requires post-multiplied alpha.
|
||||
bool PNGMethod(bool with_transparency,
|
||||
const SkBitmap& bitmap,
|
||||
std::vector<unsigned char>* compressed) {
|
||||
std::optional<std::vector<uint8_t>> PNGMethod(bool with_transparency,
|
||||
const SkBitmap& bitmap) {
|
||||
return gfx::PNGCodec::Encode(
|
||||
reinterpret_cast<unsigned char*>(bitmap.getPixels()),
|
||||
bitmap.colorType() == kBGRA_8888_SkColorType ? gfx::PNGCodec::FORMAT_BGRA
|
||||
|
@ -57,15 +56,14 @@ bool 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>(), compressed);
|
||||
std::vector<gfx::PNGCodec::Comment>());
|
||||
}
|
||||
|
||||
// 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.
|
||||
bool JPEGMethod(int quality,
|
||||
const SkBitmap& bitmap,
|
||||
std::vector<unsigned char>* compressed) {
|
||||
return gfx::JPEGCodec::Encode(bitmap, quality, compressed);
|
||||
std::optional<std::vector<uint8_t>> JPEGMethod(int quality,
|
||||
const SkBitmap& bitmap) {
|
||||
return gfx::JPEGCodec::Encode(bitmap, quality);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
@ -132,9 +130,9 @@ bool CefImageImpl::AddBitmap(float scale_factor,
|
|||
bool CefImageImpl::AddPNG(float scale_factor,
|
||||
const void* png_data,
|
||||
size_t png_data_size) {
|
||||
SkBitmap bitmap;
|
||||
if (!gfx::PNGCodec::Decode(static_cast<const unsigned char*>(png_data),
|
||||
png_data_size, &bitmap)) {
|
||||
const SkBitmap& bitmap = gfx::PNGCodec::Decode(
|
||||
base::span(static_cast<const unsigned char*>(png_data), png_data_size));
|
||||
if (bitmap.isNull()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -144,13 +142,13 @@ bool CefImageImpl::AddPNG(float scale_factor,
|
|||
bool CefImageImpl::AddJPEG(float scale_factor,
|
||||
const void* jpeg_data,
|
||||
size_t jpeg_data_size) {
|
||||
std::unique_ptr<SkBitmap> bitmap(gfx::JPEGCodec::Decode(
|
||||
static_cast<const unsigned char*>(jpeg_data), jpeg_data_size));
|
||||
if (!bitmap.get()) {
|
||||
const SkBitmap& bitmap = gfx::JPEGCodec::Decode(
|
||||
base::span(static_cast<const unsigned char*>(jpeg_data), jpeg_data_size));
|
||||
if (bitmap.isNull()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return AddBitmap(scale_factor, *bitmap);
|
||||
return AddBitmap(scale_factor, bitmap);
|
||||
}
|
||||
|
||||
size_t CefImageImpl::GetWidth() {
|
||||
|
@ -243,10 +241,11 @@ CefRefPtr<CefBinaryValue> CefImageImpl::GetAsPNG(float scale_factor,
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
std::vector<unsigned char> compressed;
|
||||
if (!WritePNG(*bitmap, &compressed, with_transparency)) {
|
||||
const auto& result = WritePNG(*bitmap, with_transparency);
|
||||
if (!result.has_value()) {
|
||||
return nullptr;
|
||||
}
|
||||
const auto& compressed = *result;
|
||||
|
||||
pixel_width = bitmap->width();
|
||||
pixel_height = bitmap->height();
|
||||
|
@ -264,10 +263,11 @@ CefRefPtr<CefBinaryValue> CefImageImpl::GetAsJPEG(float scale_factor,
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
std::vector<unsigned char> compressed;
|
||||
if (!WriteJPEG(*bitmap, &compressed, quality)) {
|
||||
const auto& result = WriteJPEG(*bitmap, quality);
|
||||
if (!result.has_value()) {
|
||||
return nullptr;
|
||||
}
|
||||
const auto& compressed = *result;
|
||||
|
||||
pixel_width = bitmap->width();
|
||||
pixel_height = bitmap->height();
|
||||
|
@ -385,8 +385,8 @@ bool CefImageImpl::ConvertBitmap(const SkBitmap& src_bitmap,
|
|||
}
|
||||
|
||||
// static
|
||||
bool CefImageImpl::WriteCompressedFormat(const SkBitmap& bitmap,
|
||||
std::vector<unsigned char>* compressed,
|
||||
std::optional<std::vector<uint8_t>> CefImageImpl::WriteCompressedFormat(
|
||||
const SkBitmap& bitmap,
|
||||
CompressionMethod method) {
|
||||
const SkBitmap* bitmap_ptr = nullptr;
|
||||
SkBitmap bitmap_postalpha;
|
||||
|
@ -394,7 +394,7 @@ bool CefImageImpl::WriteCompressedFormat(const SkBitmap& bitmap,
|
|||
// Compression methods require post-multiplied alpha values.
|
||||
if (!ConvertBitmap(bitmap, &bitmap_postalpha, bitmap.colorType(),
|
||||
kUnpremul_SkAlphaType)) {
|
||||
return false;
|
||||
return std::nullopt;
|
||||
}
|
||||
bitmap_ptr = &bitmap_postalpha;
|
||||
} else {
|
||||
|
@ -407,21 +407,20 @@ bool CefImageImpl::WriteCompressedFormat(const SkBitmap& bitmap,
|
|||
DCHECK(bitmap_ptr->alphaType() == kOpaque_SkAlphaType ||
|
||||
bitmap_ptr->alphaType() == kUnpremul_SkAlphaType);
|
||||
|
||||
return std::move(method).Run(*bitmap_ptr, compressed);
|
||||
return std::move(method).Run(*bitmap_ptr);
|
||||
}
|
||||
|
||||
// static
|
||||
bool CefImageImpl::WritePNG(const SkBitmap& bitmap,
|
||||
std::vector<unsigned char>* compressed,
|
||||
std::optional<std::vector<uint8_t>> CefImageImpl::WritePNG(
|
||||
const SkBitmap& bitmap,
|
||||
bool with_transparency) {
|
||||
return WriteCompressedFormat(bitmap, compressed,
|
||||
return WriteCompressedFormat(bitmap,
|
||||
base::BindOnce(PNGMethod, with_transparency));
|
||||
}
|
||||
|
||||
// static
|
||||
bool CefImageImpl::WriteJPEG(const SkBitmap& bitmap,
|
||||
std::vector<unsigned char>* compressed,
|
||||
std::optional<std::vector<uint8_t>> CefImageImpl::WriteJPEG(
|
||||
const SkBitmap& bitmap,
|
||||
int quality) {
|
||||
return WriteCompressedFormat(bitmap, compressed,
|
||||
base::BindOnce(JPEGMethod, quality));
|
||||
return WriteCompressedFormat(bitmap, base::BindOnce(JPEGMethod, quality));
|
||||
}
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
#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"
|
||||
|
@ -96,25 +99,25 @@ class CefImageImpl : public CefImage {
|
|||
SkAlphaType target_at);
|
||||
|
||||
// The |bitmap| argument will be RGBA or BGRA and either opaque or transparent
|
||||
// with post-multiplied alpha. Writes the compressed output into |compressed|.
|
||||
// with post-multiplied alpha. Returns the compressed output or std::nullopt.
|
||||
using CompressionMethod =
|
||||
base::OnceCallback<bool(const SkBitmap& /*bitmap*/,
|
||||
std::vector<unsigned char>* /*compressed*/)>;
|
||||
base::OnceCallback<std::optional<std::vector<uint8_t>>(
|
||||
const SkBitmap& /*bitmap*/)>;
|
||||
|
||||
// Write |bitmap| into |compressed| using |method|.
|
||||
static bool WriteCompressedFormat(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 PNG encoding.
|
||||
static bool WritePNG(const SkBitmap& bitmap,
|
||||
std::vector<unsigned char>* compressed,
|
||||
// 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 JPEG encoding. The alpha channel
|
||||
// will be ignored.
|
||||
static bool WriteJPEG(const SkBitmap& bitmap,
|
||||
std::vector<unsigned char>* compressed,
|
||||
// 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);
|
||||
|
||||
mutable base::Lock lock_;
|
||||
|
|
|
@ -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() {}
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#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;
|
||||
|
@ -35,7 +36,8 @@ 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::MENU_SOURCE_NONE,
|
||||
views::MenuAnchorPosition::kTopRight,
|
||||
ui::mojom::MenuSourceType::kNone,
|
||||
/*native_view_for_gestures=*/nullptr, parent_widget);
|
||||
|
||||
return true;
|
||||
|
|
|
@ -43,11 +43,10 @@ const void* const kResourceContextUserDataKey = &kResourceContextUserDataKey;
|
|||
std::optional<std::string> GetHeaderString(
|
||||
const net::HttpResponseHeaders* headers,
|
||||
const std::string& header_name) {
|
||||
std::string header_value;
|
||||
if (!headers || !headers->GetNormalizedHeader(header_name, &header_value)) {
|
||||
return std::nullopt;
|
||||
if (headers) {
|
||||
return headers->GetNormalizedHeader(header_name);
|
||||
}
|
||||
return header_value;
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
void CreateProxyHelper(
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#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"
|
||||
|
@ -38,7 +39,6 @@
|
|||
#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_(content::IsPinchToZoomEnabled()),
|
||||
pinch_zoom_enabled_(input::switches::IsPinchToZoomEnabled()),
|
||||
mouse_wheel_phase_handler_(this),
|
||||
gesture_provider_(CreateGestureProviderConfig(), this),
|
||||
weak_ptr_factory_(this) {
|
||||
|
|
|
@ -17,9 +17,10 @@
|
|||
#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/pointer/touch_editing_controller.h"
|
||||
#include "ui/base/mojom/menu_source_type.mojom-forward.h"
|
||||
#include "ui/gfx/geometry/point_conversions.h"
|
||||
#include "ui/gfx/geometry/size_conversions.h"
|
||||
#include "ui/touch_selection/touch_editing_controller.h"
|
||||
|
||||
namespace {
|
||||
|
||||
|
@ -146,8 +147,8 @@ void CefTouchSelectionControllerClientOSR::OnScrollCompleted() {
|
|||
|
||||
bool CefTouchSelectionControllerClientOSR::HandleContextMenu(
|
||||
const content::ContextMenuParams& params) {
|
||||
if ((params.source_type == ui::MENU_SOURCE_LONG_PRESS ||
|
||||
params.source_type == ui::MENU_SOURCE_LONG_TAP) &&
|
||||
if ((params.source_type == ui::mojom::MenuSourceType::kLongPress ||
|
||||
params.source_type == ui::mojom::MenuSourceType::kLongTap) &&
|
||||
params.is_editable && params.selection_text.empty() &&
|
||||
IsQuickMenuAvailable()) {
|
||||
quick_menu_requested_ = true;
|
||||
|
@ -155,9 +156,10 @@ bool CefTouchSelectionControllerClientOSR::HandleContextMenu(
|
|||
return true;
|
||||
}
|
||||
|
||||
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;
|
||||
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;
|
||||
if (from_touch && !params.selection_text.empty()) {
|
||||
return true;
|
||||
}
|
||||
|
@ -530,8 +532,9 @@ 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::MENU_SOURCE_TOUCH_EDIT_MENU);
|
||||
rwhv_->host()->ShowContextMenuAtPoint(
|
||||
gfx::ToRoundedPoint(anchor_point),
|
||||
ui::mojom::MenuSourceType::kTouchEditMenu);
|
||||
|
||||
// Hide selection handles after getting rect-between-bounds from touch
|
||||
// selection controller; otherwise, rect would be empty and the above
|
||||
|
|
|
@ -65,6 +65,7 @@ class CefWebContentsViewOSR : public content::WebContentsView,
|
|||
GetBackForwardTransitionAnimationManager() override {
|
||||
return nullptr;
|
||||
}
|
||||
void DestroyBackForwardTransitionAnimationManager() override {}
|
||||
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
bool CloseTabAfterEventTrackingIfNeeded() override { return false; }
|
||||
|
|
|
@ -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/base/models/simple_menu_model.h"
|
||||
#include "ui/menus/simple_menu_model.h"
|
||||
|
||||
// Implementation of CefMenuModel that wraps an existing ui::SimpleMenuModel.
|
||||
class CefSimpleMenuModelImpl : public CefMenuModel {
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#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) {
|
||||
|
@ -18,6 +19,7 @@ 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,
|
||||
};
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#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"
|
||||
|
@ -554,7 +555,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::MENU_SOURCE_NONE);
|
||||
ui::mojom::MenuSourceType::kNone);
|
||||
}
|
||||
|
||||
void CefWindowImpl::MenuClosed() {
|
||||
|
|
|
@ -24,6 +24,11 @@ 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) {
|
||||
|
|
|
@ -26,6 +26,7 @@ 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;
|
||||
|
|
|
@ -34,8 +34,6 @@
|
|||
#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"
|
||||
|
|
|
@ -512,12 +512,19 @@ 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',
|
||||
},
|
||||
{
|
||||
# Add RenderWidgetHostImpl::SetCompositorForFlingScheduler to fix fling
|
||||
# scrolling in OSR mode.
|
||||
# https://github.com/chromiumembedded/cef/issues/2745
|
||||
#
|
||||
# Fix crash in RenderWidgetHostImpl::WasHidden when closing OSR browser.
|
||||
# https://github.com/chromiumembedded/cef/issues/3834
|
||||
'name': 'osr_fling_2745',
|
||||
},
|
||||
{
|
||||
|
@ -546,14 +553,6 @@ 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,5 +742,16 @@ patches = [
|
|||
# linux: Fix cannot allocate memory in static TLS block in dlopen libcef.so
|
||||
# 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'
|
||||
}
|
||||
]
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
diff --git base/BUILD.gn base/BUILD.gn
|
||||
index 4c0e4645f64e3..4ace56138209d 100644
|
||||
index 5dee8a9226d24..a8215969e3494 100644
|
||||
--- base/BUILD.gn
|
||||
+++ base/BUILD.gn
|
||||
@@ -41,6 +41,7 @@ import("//build/nocompile.gni")
|
||||
@@ -43,6 +43,7 @@ import("//build/rust/rust_static_library.gni")
|
||||
import("//build/timestamp.gni")
|
||||
import("//build/util/process_version.gni")
|
||||
import("//build_overrides/build.gni")
|
||||
|
@ -10,7 +10,7 @@ index 4c0e4645f64e3..4ace56138209d 100644
|
|||
import("//testing/libfuzzer/fuzzer_test.gni")
|
||||
import("//testing/test.gni")
|
||||
|
||||
@@ -1503,7 +1504,11 @@ component("base") {
|
||||
@@ -1483,7 +1484,11 @@ component("base") {
|
||||
"hash/md5_constexpr_internal.h",
|
||||
"hash/sha1.h",
|
||||
]
|
||||
|
@ -23,7 +23,7 @@ index 4c0e4645f64e3..4ace56138209d 100644
|
|||
sources += [
|
||||
"hash/md5_nacl.cc",
|
||||
"hash/md5_nacl.h",
|
||||
@@ -1934,6 +1939,12 @@ component("base") {
|
||||
@@ -1916,6 +1921,12 @@ component("base") {
|
||||
defines += [ "COM_INIT_CHECK_HOOK_DISABLED" ]
|
||||
}
|
||||
|
||||
|
@ -87,6 +87,116 @@ 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
|
||||
|
@ -110,7 +220,7 @@ index 83e3cee2579ab..8238767ab9126 100644
|
|||
if (data.empty()) {
|
||||
return sum;
|
||||
diff --git base/rand_util.h base/rand_util.h
|
||||
index 746166bf75df7..7192a939e4fec 100644
|
||||
index b198a7198aab9..01bc8e9b6ad1f 100644
|
||||
--- base/rand_util.h
|
||||
+++ base/rand_util.h
|
||||
@@ -17,8 +17,9 @@
|
||||
|
@ -124,7 +234,7 @@ index 746166bf75df7..7192a939e4fec 100644
|
|||
#include "third_party/boringssl/src/include/openssl/rand.h"
|
||||
#endif
|
||||
|
||||
@@ -123,7 +124,7 @@ class RandomBitGenerator {
|
||||
@@ -117,7 +118,7 @@ class RandomBitGenerator {
|
||||
~RandomBitGenerator() = default;
|
||||
};
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
diff --git base/test/BUILD.gn base/test/BUILD.gn
|
||||
index c37ba6534270c..e1a9443a746cd 100644
|
||||
index ddf58b1d496e0..8a6c409b452f3 100644
|
||||
--- base/test/BUILD.gn
|
||||
+++ base/test/BUILD.gn
|
||||
@@ -199,11 +199,6 @@ static_library("test_support") {
|
||||
@@ -210,11 +210,6 @@ static_library("test_support") {
|
||||
|
||||
if (enable_base_tracing) {
|
||||
public_deps += [ "//third_party/perfetto:perfetto_test_support" ]
|
||||
|
@ -14,7 +14,7 @@ index c37ba6534270c..e1a9443a746cd 100644
|
|||
deps += [
|
||||
":amalgamated_perfetto_sql_stdlib",
|
||||
":gen_cc_chrome_track_event_descriptor",
|
||||
@@ -597,7 +592,7 @@ if (enable_base_tracing) {
|
||||
@@ -609,7 +604,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 c37ba6534270c..e1a9443a746cd 100644
|
|||
if (is_ios) {
|
||||
_target_type = "ios_framework_bundle"
|
||||
}
|
||||
@@ -606,6 +601,8 @@ if (enable_base_tracing) {
|
||||
@@ -618,6 +613,8 @@ if (enable_base_tracing) {
|
||||
defines = [ "TEST_TRACE_PROCESSOR_IMPL" ]
|
||||
testonly = true
|
||||
sources = [
|
||||
|
@ -32,7 +32,7 @@ index c37ba6534270c..e1a9443a746cd 100644
|
|||
"test_trace_processor_export.h",
|
||||
"test_trace_processor_impl.cc",
|
||||
"test_trace_processor_impl.h",
|
||||
@@ -623,33 +620,6 @@ if (enable_base_tracing) {
|
||||
@@ -635,33 +632,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 7adc7cdd12c30..0e93b2dfe2f25 100644
|
||||
index 14192d15579a2..d6affd97970d5 100644
|
||||
--- content/shell/BUILD.gn
|
||||
+++ content/shell/BUILD.gn
|
||||
@@ -913,7 +913,6 @@ if (is_mac) {
|
||||
@@ -914,7 +914,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" ]
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
diff --git content/browser/scheduler/browser_task_executor.cc content/browser/scheduler/browser_task_executor.cc
|
||||
index 9572bef1de74f..8d67dc7ceca2e 100644
|
||||
index 0cc947d5ba1c6..4cb8ee3b1544b 100644
|
||||
--- content/browser/scheduler/browser_task_executor.cc
|
||||
+++ content/browser/scheduler/browser_task_executor.cc
|
||||
@@ -209,7 +209,7 @@ BrowserTaskExecutor::OnUserInputStart() {
|
||||
@@ -208,7 +208,7 @@ BrowserTaskExecutor::OnUserInputStart() {
|
||||
|
||||
// static
|
||||
void BrowserTaskExecutor::Shutdown() {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
diff --git content/browser/child_process_security_policy_impl.cc content/browser/child_process_security_policy_impl.cc
|
||||
index eae60792ce033..6f6641e3fd3dd 100644
|
||||
index d4d1572304587..35fa3abc12213 100644
|
||||
--- content/browser/child_process_security_policy_impl.cc
|
||||
+++ content/browser/child_process_security_policy_impl.cc
|
||||
@@ -2043,6 +2043,16 @@ bool ChildProcessSecurityPolicyImpl::PerformJailAndCitadelChecks(
|
||||
@@ -2134,6 +2134,16 @@ bool ChildProcessSecurityPolicyImpl::PerformJailAndCitadelChecks(
|
||||
if (actual_process_lock.matches_scheme(url::kDataScheme)) {
|
||||
return true;
|
||||
}
|
||||
|
@ -20,10 +20,10 @@ index eae60792ce033..6f6641e3fd3dd 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 53bba48293111..78fbed7d2c507 100644
|
||||
index f8e18b15a1951..68c9991a962f7 100644
|
||||
--- content/browser/renderer_host/navigation_request.cc
|
||||
+++ content/browser/renderer_host/navigation_request.cc
|
||||
@@ -8245,10 +8245,22 @@ NavigationRequest::GetOriginForURLLoaderFactoryBeforeResponseWithDebugInfo(
|
||||
@@ -8255,10 +8255,22 @@ NavigationRequest::GetOriginForURLLoaderFactoryBeforeResponseWithDebugInfo(
|
||||
bool use_opaque_origin =
|
||||
(sandbox_flags & network::mojom::WebSandboxFlags::kOrigin) ==
|
||||
network::mojom::WebSandboxFlags::kOrigin;
|
||||
|
@ -47,7 +47,7 @@ index 53bba48293111..78fbed7d2c507 100644
|
|||
}
|
||||
|
||||
return origin_and_debug_info;
|
||||
@@ -8356,11 +8368,20 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() {
|
||||
@@ -8366,11 +8378,20 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() {
|
||||
DetermineInitiatorRelationship(initiator_rfh,
|
||||
frame_tree_node_->current_frame_host()));
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git build/config/compiler/BUILD.gn build/config/compiler/BUILD.gn
|
||||
index f1627512b3212..b9bdd63daae7d 100644
|
||||
index f58320b88f207..261181781fc72 100644
|
||||
--- build/config/compiler/BUILD.gn
|
||||
+++ build/config/compiler/BUILD.gn
|
||||
@@ -133,6 +133,9 @@ declare_args() {
|
||||
|
@ -12,13 +12,15 @@ index f1627512b3212..b9bdd63daae7d 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,
|
||||
@@ -2268,11 +2271,13 @@ config("export_dynamic") {
|
||||
@@ -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
|
||||
config("thin_archive") {
|
||||
# The macOS and iOS default linker ld64 does not support reading thin
|
||||
# archives.
|
||||
+ if (use_thin_archives) {
|
||||
if ((is_posix && !is_nacl && (!is_apple || use_lld)) || is_fuchsia) {
|
||||
arflags = [ "-T" ]
|
||||
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") {
|
||||
} else if (is_win && use_lld) {
|
||||
arflags = [ "/llvmlibthin" ]
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git chrome/browser/BUILD.gn chrome/browser/BUILD.gn
|
||||
index d64fdb1c1bf43..954280f1c02e5 100644
|
||||
index 1a136cdeb8aea..27238c9fccc56 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 d64fdb1c1bf43..954280f1c02e5 100644
|
|||
import("//chrome/browser/buildflags.gni")
|
||||
import("//chrome/browser/downgrade/buildflags.gni")
|
||||
import("//chrome/browser/request_header_integrity/buildflags.gni")
|
||||
@@ -1849,6 +1850,7 @@ static_library("browser") {
|
||||
@@ -1835,6 +1836,7 @@ static_library("browser") {
|
||||
"//build/config/chromebox_for_meetings:buildflags",
|
||||
"//build/config/compiler:compiler_buildflags",
|
||||
"//cc",
|
||||
|
@ -18,8 +18,8 @@ index d64fdb1c1bf43..954280f1c02e5 100644
|
|||
"//chrome:extra_resources",
|
||||
"//chrome:resources",
|
||||
"//chrome:strings",
|
||||
@@ -2522,6 +2524,10 @@ static_library("browser") {
|
||||
]
|
||||
@@ -2508,6 +2510,10 @@ static_library("browser") {
|
||||
sources += [ "net/net_error_diagnostics_dialog_stub.cc" ]
|
||||
}
|
||||
|
||||
+ if (enable_cef) {
|
||||
|
|
|
@ -1,73 +0,0 @@
|
|||
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.
|
|
@ -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 2900434a50cf1..a2e8c6161ced2 100644
|
||||
index faead4388ac00..ce1cc050c94b0 100644
|
||||
--- chrome/browser/devtools/devtools_window.cc
|
||||
+++ chrome/browser/devtools/devtools_window.cc
|
||||
@@ -38,6 +38,7 @@
|
||||
|
@ -38,7 +38,7 @@ index 2900434a50cf1..a2e8c6161ced2 100644
|
|||
}
|
||||
|
||||
// Create WebContents with devtools.
|
||||
@@ -1691,9 +1699,13 @@ void DevToolsWindow::OpenInNewTab(const GURL& url) {
|
||||
@@ -1689,9 +1697,13 @@ void DevToolsWindow::OpenInNewTab(const GURL& url) {
|
||||
if (!inspected_web_contents ||
|
||||
!inspected_web_contents->OpenURL(params,
|
||||
/*navigation_handle_callback=*/{})) {
|
||||
|
@ -52,7 +52,7 @@ index 2900434a50cf1..a2e8c6161ced2 100644
|
|||
}
|
||||
}
|
||||
|
||||
@@ -1856,12 +1868,28 @@ void DevToolsWindow::CreateDevToolsBrowser() {
|
||||
@@ -1854,12 +1866,28 @@ void DevToolsWindow::CreateDevToolsBrowser() {
|
||||
Browser::CreationStatus::kOk) {
|
||||
return;
|
||||
}
|
||||
|
@ -88,7 +88,7 @@ index 2900434a50cf1..a2e8c6161ced2 100644
|
|||
}
|
||||
|
||||
diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn
|
||||
index 33631fd4086bf..25f16fe25b14e 100644
|
||||
index df9b0eed07761..a984511be272a 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 33631fd4086bf..25f16fe25b14e 100644
|
|||
import("//chrome/browser/buildflags.gni")
|
||||
import("//chrome/common/features.gni")
|
||||
import("//chromeos/ash/components/assistant/assistant.gni")
|
||||
@@ -311,6 +312,10 @@ static_library("ui") {
|
||||
@@ -297,6 +298,10 @@ static_library("ui") {
|
||||
"//build/config/compiler:wexit_time_destructors",
|
||||
]
|
||||
|
||||
|
@ -110,7 +110,7 @@ index 33631fd4086bf..25f16fe25b14e 100644
|
|||
public_deps = [
|
||||
# WARNING WARNING WARNING
|
||||
# New dependencies outside of //chrome/browser should be added to
|
||||
@@ -337,6 +342,7 @@ static_library("ui") {
|
||||
@@ -323,6 +328,7 @@ static_library("ui") {
|
||||
"//build:chromeos_buildflags",
|
||||
"//build/config/chromebox_for_meetings:buildflags",
|
||||
"//cc/paint",
|
||||
|
@ -118,7 +118,7 @@ index 33631fd4086bf..25f16fe25b14e 100644
|
|||
"//chrome:resources",
|
||||
"//chrome:strings",
|
||||
"//chrome/app:chrome_dll_resources",
|
||||
@@ -694,6 +700,10 @@ static_library("ui") {
|
||||
@@ -688,6 +694,10 @@ static_library("ui") {
|
||||
deps += [ "//components/plus_addresses/resources:vector_icons" ]
|
||||
}
|
||||
|
||||
|
@ -129,7 +129,7 @@ index 33631fd4086bf..25f16fe25b14e 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.
|
||||
@@ -5509,6 +5519,7 @@ static_library("ui") {
|
||||
@@ -5479,6 +5489,7 @@ static_library("ui") {
|
||||
if (enable_printing) {
|
||||
deps += [
|
||||
"//components/printing/browser",
|
||||
|
@ -138,10 +138,10 @@ index 33631fd4086bf..25f16fe25b14e 100644
|
|||
]
|
||||
}
|
||||
diff --git chrome/browser/ui/browser.cc chrome/browser/ui/browser.cc
|
||||
index e87612be40627..41f088fd227b7 100644
|
||||
index f313979ca1b0a..d69cbf3411173 100644
|
||||
--- chrome/browser/ui/browser.cc
|
||||
+++ chrome/browser/ui/browser.cc
|
||||
@@ -273,6 +273,25 @@
|
||||
@@ -270,6 +270,25 @@
|
||||
#include "components/captive_portal/content/captive_portal_tab_helper.h"
|
||||
#endif
|
||||
|
||||
|
@ -167,7 +167,7 @@ index e87612be40627..41f088fd227b7 100644
|
|||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
#include "chrome/browser/extensions/extension_browser_window_helper.h"
|
||||
#endif
|
||||
@@ -537,6 +556,10 @@ Browser::Browser(const CreateParams& params)
|
||||
@@ -559,6 +578,10 @@ Browser::Browser(const CreateParams& params)
|
||||
type_(params.type),
|
||||
profile_(params.profile),
|
||||
window_(nullptr),
|
||||
|
@ -178,7 +178,7 @@ index e87612be40627..41f088fd227b7 100644
|
|||
tab_strip_model_delegate_(
|
||||
std::make_unique<chrome::BrowserTabStripModelDelegate>(this)),
|
||||
tab_strip_model_(std::make_unique<TabStripModel>(
|
||||
@@ -767,6 +790,12 @@ Browser::~Browser() {
|
||||
@@ -789,6 +812,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 e87612be40627..41f088fd227b7 100644
|
|||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@@ -1329,6 +1358,8 @@ void Browser::WindowFullscreenStateChanged() {
|
||||
@@ -1375,6 +1404,8 @@ void Browser::WindowFullscreenStateChanged() {
|
||||
->WindowFullscreenStateChanged();
|
||||
command_controller_->FullscreenStateChanged();
|
||||
UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TOGGLE_FULLSCREEN);
|
||||
|
@ -200,7 +200,7 @@ index e87612be40627..41f088fd227b7 100644
|
|||
}
|
||||
|
||||
void Browser::FullscreenTopUIStateChanged() {
|
||||
@@ -1659,6 +1690,14 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent(
|
||||
@@ -1694,6 +1725,14 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent(
|
||||
if (exclusive_access_manager_->HandleUserKeyEvent(event))
|
||||
return content::KeyboardEventProcessingResult::HANDLED;
|
||||
|
||||
|
@ -215,7 +215,7 @@ index e87612be40627..41f088fd227b7 100644
|
|||
return window()->PreHandleKeyboardEvent(event);
|
||||
}
|
||||
|
||||
@@ -1666,8 +1705,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source,
|
||||
@@ -1701,8 +1740,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source,
|
||||
const NativeWebKeyboardEvent& event) {
|
||||
DevToolsWindow* devtools_window =
|
||||
DevToolsWindow::GetInstanceForInspectedWebContents(source);
|
||||
|
@ -236,7 +236,7 @@ index e87612be40627..41f088fd227b7 100644
|
|||
}
|
||||
|
||||
bool Browser::TabsNeedBeforeUnloadFired() const {
|
||||
@@ -1822,6 +1871,14 @@ WebContents* Browser::OpenURLFromTab(
|
||||
@@ -1857,6 +1906,14 @@ WebContents* Browser::OpenURLFromTab(
|
||||
std::move(navigation_handle_callback));
|
||||
}
|
||||
|
||||
|
@ -251,7 +251,7 @@ index e87612be40627..41f088fd227b7 100644
|
|||
NavigateParams nav_params(this, params.url, params.transition);
|
||||
nav_params.FillNavigateParamsFromOpenURLParams(params);
|
||||
nav_params.source_contents = source;
|
||||
@@ -1988,6 +2045,8 @@ void Browser::LoadingStateChanged(WebContents* source,
|
||||
@@ -2023,6 +2080,8 @@ void Browser::LoadingStateChanged(WebContents* source,
|
||||
bool should_show_loading_ui) {
|
||||
ScheduleUIUpdate(source, content::INVALIDATE_TYPE_LOAD);
|
||||
UpdateWindowForLoadingStateChanged(source, should_show_loading_ui);
|
||||
|
@ -260,7 +260,7 @@ index e87612be40627..41f088fd227b7 100644
|
|||
}
|
||||
|
||||
void Browser::CloseContents(WebContents* source) {
|
||||
@@ -2016,6 +2075,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) {
|
||||
@@ -2051,6 +2110,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) {
|
||||
}
|
||||
|
||||
void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
|
||||
|
@ -269,7 +269,7 @@ index e87612be40627..41f088fd227b7 100644
|
|||
if (!GetStatusBubble())
|
||||
return;
|
||||
|
||||
@@ -2023,6 +2084,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
|
||||
@@ -2058,6 +2119,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
|
||||
GetStatusBubble()->SetURL(url);
|
||||
}
|
||||
|
||||
|
@ -287,7 +287,7 @@ index e87612be40627..41f088fd227b7 100644
|
|||
void Browser::ContentsMouseEvent(WebContents* source, const ui::Event& event) {
|
||||
const ui::EventType type = event.type();
|
||||
const bool exited = type == ui::EventType::kMouseExited;
|
||||
@@ -2051,6 +2123,19 @@ bool Browser::TakeFocus(content::WebContents* source, bool reverse) {
|
||||
@@ -2086,6 +2158,19 @@ bool Browser::TakeFocus(content::WebContents* source, bool reverse) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -307,7 +307,7 @@ index e87612be40627..41f088fd227b7 100644
|
|||
void Browser::BeforeUnloadFired(WebContents* web_contents,
|
||||
bool proceed,
|
||||
bool* proceed_to_fire_unload) {
|
||||
@@ -2150,12 +2235,24 @@ void Browser::WebContentsCreated(WebContents* source_contents,
|
||||
@@ -2185,12 +2270,24 @@ void Browser::WebContentsCreated(WebContents* source_contents,
|
||||
|
||||
// Make the tab show up in the task manager.
|
||||
task_manager::WebContentsTags::CreateForTabContents(new_contents);
|
||||
|
@ -332,7 +332,7 @@ index e87612be40627..41f088fd227b7 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();
|
||||
@@ -2168,6 +2265,13 @@ void Browser::RendererUnresponsive(
|
||||
@@ -2203,6 +2300,13 @@ void Browser::RendererUnresponsive(
|
||||
void Browser::RendererResponsive(
|
||||
WebContents* source,
|
||||
content::RenderWidgetHost* render_widget_host) {
|
||||
|
@ -346,7 +346,7 @@ index e87612be40627..41f088fd227b7 100644
|
|||
RenderWidgetHostView* view = render_widget_host->GetView();
|
||||
if (view && !render_widget_host->GetView()->IsHTMLFormPopup()) {
|
||||
TabDialogs::FromWebContents(source)->HideHungRendererDialog(
|
||||
@@ -2177,6 +2281,15 @@ void Browser::RendererResponsive(
|
||||
@@ -2212,6 +2316,15 @@ void Browser::RendererResponsive(
|
||||
|
||||
content::JavaScriptDialogManager* Browser::GetJavaScriptDialogManager(
|
||||
WebContents* source) {
|
||||
|
@ -362,7 +362,7 @@ index e87612be40627..41f088fd227b7 100644
|
|||
return javascript_dialogs::TabModalDialogManager::FromWebContents(source);
|
||||
}
|
||||
|
||||
@@ -2212,6 +2325,11 @@ void Browser::DraggableRegionsChanged(
|
||||
@@ -2247,6 +2360,11 @@ void Browser::DraggableRegionsChanged(
|
||||
if (app_controller_) {
|
||||
app_controller_->DraggableRegionsChanged(regions, contents);
|
||||
}
|
||||
|
@ -374,7 +374,7 @@ index e87612be40627..41f088fd227b7 100644
|
|||
}
|
||||
|
||||
void Browser::DidFinishNavigation(
|
||||
@@ -2292,11 +2410,15 @@ void Browser::EnterFullscreenModeForTab(
|
||||
@@ -2327,11 +2445,15 @@ void Browser::EnterFullscreenModeForTab(
|
||||
const blink::mojom::FullscreenOptions& options) {
|
||||
exclusive_access_manager_->fullscreen_controller()->EnterFullscreenModeForTab(
|
||||
requesting_frame, options.display_id);
|
||||
|
@ -390,7 +390,7 @@ index e87612be40627..41f088fd227b7 100644
|
|||
}
|
||||
|
||||
bool Browser::IsFullscreenForTabOrPending(const WebContents* web_contents) {
|
||||
@@ -2499,6 +2621,15 @@ void Browser::RequestMediaAccessPermission(
|
||||
@@ -2534,6 +2656,15 @@ void Browser::RequestMediaAccessPermission(
|
||||
content::WebContents* web_contents,
|
||||
const content::MediaStreamRequest& request,
|
||||
content::MediaResponseCallback callback) {
|
||||
|
@ -406,7 +406,7 @@ index e87612be40627..41f088fd227b7 100644
|
|||
const extensions::Extension* extension =
|
||||
GetExtensionForOrigin(profile_, request.security_origin);
|
||||
MediaCaptureDevicesDispatcher::GetInstance()->ProcessMediaAccessRequest(
|
||||
@@ -3059,9 +3190,10 @@ void Browser::RemoveScheduledUpdatesFor(WebContents* contents) {
|
||||
@@ -3086,9 +3217,10 @@ void Browser::RemoveScheduledUpdatesFor(WebContents* contents) {
|
||||
// Browser, Getters for UI (private):
|
||||
|
||||
StatusBubble* Browser::GetStatusBubble() {
|
||||
|
@ -418,7 +418,7 @@ index e87612be40627..41f088fd227b7 100644
|
|||
}
|
||||
|
||||
// We hide the status bar for web apps windows as this matches native
|
||||
@@ -3069,6 +3201,12 @@ StatusBubble* Browser::GetStatusBubble() {
|
||||
@@ -3096,6 +3228,12 @@ StatusBubble* Browser::GetStatusBubble() {
|
||||
// mode, as the minimal browser UI includes the status bar.
|
||||
if (web_app::AppBrowserController::IsWebApp(this) &&
|
||||
!app_controller()->HasMinimalUiButtons()) {
|
||||
|
@ -431,7 +431,7 @@ index e87612be40627..41f088fd227b7 100644
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -3218,6 +3356,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) {
|
||||
@@ -3241,6 +3379,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) {
|
||||
BookmarkTabHelper::FromWebContents(web_contents)->RemoveObserver(this);
|
||||
web_contents_collection_.StopObserving(web_contents);
|
||||
}
|
||||
|
@ -440,7 +440,7 @@ index e87612be40627..41f088fd227b7 100644
|
|||
}
|
||||
|
||||
void Browser::TabDetachedAtImpl(content::WebContents* contents,
|
||||
@@ -3372,6 +3512,14 @@ bool Browser::PictureInPictureBrowserSupportsWindowFeature(
|
||||
@@ -3398,6 +3538,14 @@ bool Browser::PictureInPictureBrowserSupportsWindowFeature(
|
||||
|
||||
bool Browser::SupportsWindowFeatureImpl(WindowFeature feature,
|
||||
bool check_can_support) const {
|
||||
|
@ -456,11 +456,11 @@ index e87612be40627..41f088fd227b7 100644
|
|||
case TYPE_NORMAL:
|
||||
return NormalBrowserSupportsWindowFeature(feature, check_can_support);
|
||||
diff --git chrome/browser/ui/browser.h chrome/browser/ui/browser.h
|
||||
index 86ea151056ca1..680d143eecb16 100644
|
||||
index 8057f6fcc87c4..14bf2073b170b 100644
|
||||
--- chrome/browser/ui/browser.h
|
||||
+++ chrome/browser/ui/browser.h
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "base/timer/elapsed_timer.h"
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "base/types/expected.h"
|
||||
#include "build/build_config.h"
|
||||
#include "build/chromeos_buildflags.h"
|
||||
+#include "cef/libcef/features/features.h"
|
||||
|
@ -478,7 +478,7 @@ index 86ea151056ca1..680d143eecb16 100644
|
|||
#if BUILDFLAG(IS_ANDROID)
|
||||
#error This file should only be included on desktop.
|
||||
#endif
|
||||
@@ -340,6 +345,15 @@ class Browser : public TabStripModelObserver,
|
||||
@@ -339,6 +344,15 @@ class Browser : public TabStripModelObserver,
|
||||
// Document Picture in Picture options, specific to TYPE_PICTURE_IN_PICTURE.
|
||||
std::optional<blink::mojom::PictureInPictureWindowOptions> pip_options;
|
||||
|
||||
|
@ -494,7 +494,7 @@ index 86ea151056ca1..680d143eecb16 100644
|
|||
private:
|
||||
friend class Browser;
|
||||
friend class WindowSizerChromeOSTest;
|
||||
@@ -423,6 +437,13 @@ class Browser : public TabStripModelObserver,
|
||||
@@ -422,6 +436,13 @@ class Browser : public TabStripModelObserver,
|
||||
update_ui_immediately_for_testing_ = true;
|
||||
}
|
||||
|
||||
|
@ -508,7 +508,7 @@ index 86ea151056ca1..680d143eecb16 100644
|
|||
// Accessors ////////////////////////////////////////////////////////////////
|
||||
|
||||
const CreateParams& create_params() const { return create_params_; }
|
||||
@@ -524,6 +545,12 @@ class Browser : public TabStripModelObserver,
|
||||
@@ -523,6 +544,12 @@ class Browser : public TabStripModelObserver,
|
||||
base::WeakPtr<Browser> AsWeakPtr();
|
||||
base::WeakPtr<const Browser> AsWeakPtr() const;
|
||||
|
||||
|
@ -521,7 +521,7 @@ index 86ea151056ca1..680d143eecb16 100644
|
|||
// Get the FindBarController for this browser, creating it if it does not
|
||||
// yet exist.
|
||||
FindBarController* GetFindBarController();
|
||||
@@ -956,10 +983,18 @@ class Browser : public TabStripModelObserver,
|
||||
@@ -961,10 +988,18 @@ class Browser : public TabStripModelObserver,
|
||||
void SetContentsBounds(content::WebContents* source,
|
||||
const gfx::Rect& bounds) override;
|
||||
void UpdateTargetURL(content::WebContents* source, const GURL& url) override;
|
||||
|
@ -540,7 +540,7 @@ index 86ea151056ca1..680d143eecb16 100644
|
|||
void BeforeUnloadFired(content::WebContents* source,
|
||||
bool proceed,
|
||||
bool* proceed_to_fire_unload) override;
|
||||
@@ -1296,6 +1331,10 @@ class Browser : public TabStripModelObserver,
|
||||
@@ -1303,6 +1338,10 @@ class Browser : public TabStripModelObserver,
|
||||
// This Browser's window.
|
||||
raw_ptr<BrowserWindow, DanglingUntriaged> window_;
|
||||
|
||||
|
@ -551,7 +551,7 @@ index 86ea151056ca1..680d143eecb16 100644
|
|||
std::unique_ptr<TabStripModelDelegate> const tab_strip_model_delegate_;
|
||||
std::unique_ptr<TabStripModel> const tab_strip_model_;
|
||||
|
||||
@@ -1362,6 +1401,8 @@ class Browser : public TabStripModelObserver,
|
||||
@@ -1369,6 +1408,8 @@ class Browser : public TabStripModelObserver,
|
||||
const std::string initial_workspace_;
|
||||
bool initial_visible_on_all_workspaces_state_;
|
||||
|
||||
|
@ -561,10 +561,10 @@ index 86ea151056ca1..680d143eecb16 100644
|
|||
|
||||
UnloadController unload_controller_;
|
||||
diff --git chrome/browser/ui/browser_navigator.cc chrome/browser/ui/browser_navigator.cc
|
||||
index 70d7f4fbda71c..103e9c1b2a8f2 100644
|
||||
index 61a46e74464e0..d5978661b222e 100644
|
||||
--- chrome/browser/ui/browser_navigator.cc
|
||||
+++ chrome/browser/ui/browser_navigator.cc
|
||||
@@ -272,6 +272,10 @@ std::tuple<Browser*, int> GetBrowserAndTabForDisposition(
|
||||
@@ -271,6 +271,10 @@ std::tuple<Browser*, int> GetBrowserAndTabForDisposition(
|
||||
|
||||
browser_params.pip_options = pip_options;
|
||||
|
||||
|
@ -575,7 +575,7 @@ index 70d7f4fbda71c..103e9c1b2a8f2 100644
|
|||
const BrowserWindow* const browser_window = params.browser->window();
|
||||
const gfx::NativeWindow native_window =
|
||||
browser_window ? browser_window->GetNativeWindow()
|
||||
@@ -560,6 +564,13 @@ std::unique_ptr<content::WebContents> CreateTargetContents(
|
||||
@@ -561,6 +565,13 @@ std::unique_ptr<content::WebContents> CreateTargetContents(
|
||||
std::unique_ptr<WebContents> target_contents =
|
||||
WebContents::Create(create_params);
|
||||
|
||||
|
@ -590,7 +590,7 @@ index 70d7f4fbda71c..103e9c1b2a8f2 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 e4b6094c5197e..4d2d12ae5725e 100644
|
||||
index 1f84235515463..82942fb06b5f3 100644
|
||||
--- chrome/browser/ui/browser_tabstrip.cc
|
||||
+++ chrome/browser/ui/browser_tabstrip.cc
|
||||
@@ -33,9 +33,13 @@ content::WebContents* AddAndReturnTabAt(
|
||||
|
@ -608,7 +608,7 @@ index e4b6094c5197e..4d2d12ae5725e 100644
|
|||
params.disposition = foreground ? WindowOpenDisposition::NEW_FOREGROUND_TAB
|
||||
: WindowOpenDisposition::NEW_BACKGROUND_TAB;
|
||||
params.tabstrip_index = idx;
|
||||
@@ -82,6 +86,16 @@ content::WebContents* AddWebContents(
|
||||
@@ -84,6 +88,16 @@ content::WebContents* AddWebContents(
|
||||
// Can't create a new contents for the current tab - invalid case.
|
||||
DCHECK(disposition != WindowOpenDisposition::CURRENT_TAB);
|
||||
|
||||
|
|
|
@ -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 db228a497bd28..94e04bca7e28d 100644
|
||||
index a1564ffe50f30..bfafcad73a2a2 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() {
|
||||
@@ -359,6 +359,18 @@ base::OnceCallback<void(RenderViewContextMenu*)>* GetMenuShownCallback() {
|
||||
return callback.get();
|
||||
}
|
||||
|
||||
|
@ -21,7 +21,7 @@ index db228a497bd28..94e04bca7e28d 100644
|
|||
enum class UmaEnumIdLookupType {
|
||||
GeneralEnumId,
|
||||
ContextSpecificEnumId,
|
||||
@@ -628,6 +640,10 @@ int FindUMAEnumValueForCommand(int id, UmaEnumIdLookupType type) {
|
||||
@@ -627,6 +639,10 @@ int FindUMAEnumValueForCommand(int id, UmaEnumIdLookupType type) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@ index db228a497bd28..94e04bca7e28d 100644
|
|||
id = CollapseCommandsForUMA(id);
|
||||
const auto& map = GetIdcToUmaMap(type);
|
||||
auto it = map.find(id);
|
||||
@@ -909,6 +925,14 @@ RenderViewContextMenu::RenderViewContextMenu(
|
||||
@@ -908,6 +924,14 @@ RenderViewContextMenu::RenderViewContextMenu(
|
||||
: nullptr;
|
||||
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
|
||||
|
@ -47,7 +47,7 @@ index db228a497bd28..94e04bca7e28d 100644
|
|||
observers_.AddObserver(&autofill_context_menu_manager_);
|
||||
}
|
||||
|
||||
@@ -1365,6 +1389,12 @@ void RenderViewContextMenu::InitMenu() {
|
||||
@@ -1364,6 +1388,12 @@ void RenderViewContextMenu::InitMenu() {
|
||||
autofill_client->HideAutofillSuggestions(
|
||||
autofill::SuggestionHidingReason::kContextMenuOpened);
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ index db228a497bd28..94e04bca7e28d 100644
|
|||
}
|
||||
|
||||
Profile* RenderViewContextMenu::GetProfile() const {
|
||||
@@ -3648,6 +3678,26 @@ void RenderViewContextMenu::RegisterExecutePluginActionCallbackForTesting(
|
||||
@@ -3630,6 +3660,26 @@ void RenderViewContextMenu::RegisterExecutePluginActionCallbackForTesting(
|
||||
execute_plugin_action_callback_ = std::move(cb);
|
||||
}
|
||||
|
||||
|
@ -88,7 +88,7 @@ index db228a497bd28..94e04bca7e28d 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 0266119ae4010..d7e04a4e3804d 100644
|
||||
index b9ab5b1295599..7ad5bcb00ff8b 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 0266119ae4010..d7e04a4e3804d 100644
|
|||
Profile* GetProfile() const;
|
||||
|
||||
// This may return nullptr (e.g. for WebUI dialogs). Virtual to allow tests to
|
||||
@@ -477,6 +491,9 @@ class RenderViewContextMenu
|
||||
@@ -475,6 +489,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 b130e9768c2d6..3e46b2fe18d0a 100644
|
||||
index 9070be4403de1..a449c46246acd 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 5e34ee23fa791..36be094844276 100644
|
||||
index a269d358300b8..bf31a3cecdee7 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
|
||||
@@ -149,6 +149,9 @@ void RenderViewContextMenuViews::RunMenuAt(views::Widget* parent,
|
||||
@@ -150,6 +150,9 @@ void RenderViewContextMenuViews::RunMenuAt(views::Widget* parent,
|
||||
bool RenderViewContextMenuViews::GetAcceleratorForCommandId(
|
||||
int command_id,
|
||||
ui::Accelerator* accel) const {
|
||||
|
@ -202,7 +202,7 @@ index 5e34ee23fa791..36be094844276 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) {
|
||||
@@ -385,6 +388,10 @@ void RenderViewContextMenuViews::AppendPlatformEditableItems() {
|
||||
@@ -386,6 +389,10 @@ void RenderViewContextMenuViews::AppendPlatformEditableItems() {
|
||||
}
|
||||
|
||||
void RenderViewContextMenuViews::Show() {
|
||||
|
@ -213,7 +213,7 @@ index 5e34ee23fa791..36be094844276 100644
|
|||
if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kKioskMode))
|
||||
return;
|
||||
|
||||
@@ -427,6 +434,11 @@ void RenderViewContextMenuViews::Show() {
|
||||
@@ -428,6 +435,11 @@ void RenderViewContextMenuViews::Show() {
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -226,7 +226,7 @@ index 5e34ee23fa791..36be094844276 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 55ba34c417e4a..e92f668868e74 100644
|
||||
index 8433cdc9c88b7..aea62cda5cd22 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 01a7fe089662d..5b67b639e3f09 100644
|
||||
index edf3c0f19409e..3a194411201fe 100644
|
||||
--- components/renderer_context_menu/render_view_context_menu_base.cc
|
||||
+++ components/renderer_context_menu/render_view_context_menu_base.cc
|
||||
@@ -380,6 +380,17 @@ bool RenderViewContextMenuBase::IsCommandIdChecked(int id) const {
|
||||
@@ -392,6 +392,17 @@ bool RenderViewContextMenuBase::IsCommandIdChecked(int id) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -327,7 +327,7 @@ index 01a7fe089662d..5b67b639e3f09 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 b607544ab0a48..a389e96cf5182 100644
|
||||
index cd028ee83b6e8..c5d382eb8a2ce 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 823f044316527..85439bf7ad2eb 100644
|
||||
index 0be2640c8173c..8bfdc6185690f 100644
|
||||
--- components/renderer_context_menu/views/toolkit_delegate_views.cc
|
||||
+++ components/renderer_context_menu/views/toolkit_delegate_views.cc
|
||||
@@ -30,6 +30,10 @@ void ToolkitDelegateViews::RunMenuAt(views::Widget* parent,
|
||||
@@ -31,6 +31,10 @@ void ToolkitDelegateViews::RunMenuAt(views::Widget* parent,
|
||||
anchor_position, type);
|
||||
}
|
||||
|
||||
|
@ -407,12 +407,12 @@ index 823f044316527..85439bf7ad2eb 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 eacdc12813204..9084effdaa121 100644
|
||||
index 7762b3e6673d9..5bd1544aaaa62 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::MenuSourceType type);
|
||||
ui::mojom::MenuSourceType type);
|
||||
views::MenuItemView* menu_view() { return menu_view_; }
|
||||
+ bool IsMenuRunning() const;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git chrome/browser/devtools/chrome_devtools_manager_delegate.cc chrome/browser/devtools/chrome_devtools_manager_delegate.cc
|
||||
index e84932c53009d..0e64ca8105f82 100644
|
||||
index 8c8d53b351c2f..c1fa3cd901335 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 e84932c53009d..0e64ca8105f82 100644
|
|||
using content::DevToolsAgentHost;
|
||||
|
||||
const char ChromeDevToolsManagerDelegate::kTypeApp[] = "app";
|
||||
@@ -285,6 +290,12 @@ std::string ChromeDevToolsManagerDelegate::GetTargetType(
|
||||
@@ -283,6 +288,12 @@ std::string ChromeDevToolsManagerDelegate::GetTargetType(
|
||||
return DevToolsAgentHost::kTypePage;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,22 +1,21 @@
|
|||
diff --git chrome/browser/file_select_helper.cc chrome/browser/file_select_helper.cc
|
||||
index 50fca3503b2a9..89a58b139af4a 100644
|
||||
index 5d563a5311ec1..7c8c70393ed4b 100644
|
||||
--- chrome/browser/file_select_helper.cc
|
||||
+++ chrome/browser/file_select_helper.cc
|
||||
@@ -239,6 +239,13 @@ void FileSelectHelper::OnListFile(
|
||||
void FileSelectHelper::LaunchConfirmationDialog(
|
||||
const base::FilePath& path,
|
||||
std::vector<ui::SelectedFileInfo> selected_files) {
|
||||
@@ -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).
|
||||
+ ConvertToFileChooserFileInfoList(selected_files);
|
||||
+ PerformContentAnalysisIfNeeded(std::move(chooser_files));
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
ShowFolderUploadConfirmationDialog(
|
||||
path,
|
||||
base::BindOnce(&FileSelectHelper::ConvertToFileChooserFileInfoList, this),
|
||||
@@ -466,31 +473,51 @@ FileSelectHelper::GetFileTypesFromAcceptType(
|
||||
auto model = CreateConfirmationDialog(
|
||||
entry->display_name_, std::move(chooser_files),
|
||||
base::BindOnce(&FileSelectHelper::PerformContentAnalysisIfNeeded,
|
||||
@@ -511,31 +517,51 @@ FileSelectHelper::GetFileTypesFromAcceptType(
|
||||
std::vector<base::FilePath::StringType>* extensions =
|
||||
&file_type->extensions.back();
|
||||
|
||||
|
@ -72,7 +71,7 @@ index 50fca3503b2a9..89a58b139af4a 100644
|
|||
if (extensions->size() > old_extension_size)
|
||||
valid_type_count++;
|
||||
}
|
||||
@@ -507,12 +534,28 @@ FileSelectHelper::GetFileTypesFromAcceptType(
|
||||
@@ -552,12 +578,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 ||
|
||||
|
@ -105,7 +104,7 @@ index 50fca3503b2a9..89a58b139af4a 100644
|
|||
}
|
||||
|
||||
return file_type;
|
||||
@@ -522,7 +565,8 @@ FileSelectHelper::GetFileTypesFromAcceptType(
|
||||
@@ -567,7 +609,8 @@ FileSelectHelper::GetFileTypesFromAcceptType(
|
||||
void FileSelectHelper::RunFileChooser(
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
scoped_refptr<content::FileSelectListener> listener,
|
||||
|
@ -115,7 +114,7 @@ index 50fca3503b2a9..89a58b139af4a 100644
|
|||
Profile* profile = Profile::FromBrowserContext(
|
||||
render_frame_host->GetProcess()->GetBrowserContext());
|
||||
|
||||
@@ -530,6 +574,7 @@ void FileSelectHelper::RunFileChooser(
|
||||
@@ -575,6 +618,7 @@ void FileSelectHelper::RunFileChooser(
|
||||
// message.
|
||||
scoped_refptr<FileSelectHelper> file_select_helper(
|
||||
new FileSelectHelper(profile));
|
||||
|
@ -124,10 +123,10 @@ index 50fca3503b2a9..89a58b139af4a 100644
|
|||
params.Clone());
|
||||
}
|
||||
diff --git chrome/browser/file_select_helper.h chrome/browser/file_select_helper.h
|
||||
index 138889a07790b..73d480d4f2525 100644
|
||||
index 921b36076c3f3..d61248be1997b 100644
|
||||
--- chrome/browser/file_select_helper.h
|
||||
+++ chrome/browser/file_select_helper.h
|
||||
@@ -63,7 +63,8 @@ class FileSelectHelper : public base::RefCountedThreadSafe<
|
||||
@@ -64,7 +64,8 @@ class FileSelectHelper : public base::RefCountedThreadSafe<
|
||||
static void RunFileChooser(
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
scoped_refptr<content::FileSelectListener> listener,
|
||||
|
@ -137,7 +136,7 @@ index 138889a07790b..73d480d4f2525 100644
|
|||
|
||||
// Enumerates all the files in directory.
|
||||
static void EnumerateDirectory(
|
||||
@@ -330,6 +331,9 @@ class FileSelectHelper : public base::RefCountedThreadSafe<
|
||||
@@ -336,6 +337,9 @@ class FileSelectHelper : public base::RefCountedThreadSafe<
|
||||
scoped_disallow_picture_in_picture_;
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
|
||||
|
@ -257,7 +256,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 72f687be6fb42..4fa78758dd4df 100644
|
||||
index 416c1bb5503ef..a6705c94c0dc2 100644
|
||||
--- ui/shell_dialogs/select_file_dialog_mac.mm
|
||||
+++ ui/shell_dialogs/select_file_dialog_mac.mm
|
||||
@@ -104,6 +104,10 @@ void SelectFileDialogImpl::SelectFileImpl(
|
||||
|
@ -272,7 +271,7 @@ index 72f687be6fb42..4fa78758dd4df 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 ed343dc032789..a7105f4c78a1c 100644
|
||||
index e3bd03f336edd..afc421d99112f 100644
|
||||
--- ui/shell_dialogs/select_file_dialog_win.cc
|
||||
+++ ui/shell_dialogs/select_file_dialog_win.cc
|
||||
@@ -251,6 +251,8 @@ void SelectFileDialogImpl::SelectFileImpl(
|
||||
|
|
|
@ -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 d64117586a5c3..c37d7a59c134e 100644
|
||||
index 0777e2fe71f04..546994cad2b14 100644
|
||||
--- ui/views/window/dialog_delegate.h
|
||||
+++ ui/views/window/dialog_delegate.h
|
||||
@@ -106,13 +106,18 @@ class VIEWS_EXPORT DialogDelegate : public WidgetDelegate {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git chrome/browser/download/chrome_download_manager_delegate.cc chrome/browser/download/chrome_download_manager_delegate.cc
|
||||
index 6b356ae53968e..da22286db5a3f 100644
|
||||
index e07f9d6b5aabd..f57b5da7e9364 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 6b356ae53968e..da22286db5a3f 100644
|
|||
using content::BrowserThread;
|
||||
using content::DownloadManager;
|
||||
using download::DownloadItem;
|
||||
@@ -520,6 +525,11 @@ ChromeDownloadManagerDelegate::ChromeDownloadManagerDelegate(Profile* profile)
|
||||
@@ -517,6 +522,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 6b356ae53968e..da22286db5a3f 100644
|
|||
}
|
||||
|
||||
ChromeDownloadManagerDelegate::~ChromeDownloadManagerDelegate() {
|
||||
@@ -579,6 +589,9 @@ void ChromeDownloadManagerDelegate::Shutdown() {
|
||||
@@ -576,6 +586,9 @@ void ChromeDownloadManagerDelegate::Shutdown() {
|
||||
download_manager_->RemoveObserver(this);
|
||||
download_manager_ = nullptr;
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ index 6b356ae53968e..da22286db5a3f 100644
|
|||
}
|
||||
|
||||
void ChromeDownloadManagerDelegate::OnDownloadCanceledAtShutdown(
|
||||
@@ -647,6 +660,12 @@ bool ChromeDownloadManagerDelegate::DetermineDownloadTarget(
|
||||
@@ -644,6 +657,12 @@ bool ChromeDownloadManagerDelegate::DetermineDownloadTarget(
|
||||
ReportPDFLoadStatus(PDFLoadStatus::kTriggeredNoGestureDriveByDownload);
|
||||
}
|
||||
|
||||
|
@ -56,7 +56,7 @@ index 6b356ae53968e..da22286db5a3f 100644
|
|||
DownloadTargetDeterminer::CompletionCallback target_determined_callback =
|
||||
base::BindOnce(&ChromeDownloadManagerDelegate::OnDownloadTargetDetermined,
|
||||
weak_ptr_factory_.GetWeakPtr(), download->GetId(),
|
||||
@@ -1080,8 +1099,11 @@ void ChromeDownloadManagerDelegate::OpenDownload(DownloadItem* download) {
|
||||
@@ -1119,8 +1138,11 @@ void ChromeDownloadManagerDelegate::OpenDownload(DownloadItem* download) {
|
||||
Browser* browser =
|
||||
web_contents ? chrome::FindBrowserWithTab(web_contents) : nullptr;
|
||||
std::unique_ptr<chrome::ScopedTabbedBrowserDisplayer> browser_displayer;
|
||||
|
@ -71,7 +71,7 @@ index 6b356ae53968e..da22286db5a3f 100644
|
|||
std::make_unique<chrome::ScopedTabbedBrowserDisplayer>(profile_);
|
||||
browser = browser_displayer->browser();
|
||||
diff --git chrome/browser/download/chrome_download_manager_delegate.h chrome/browser/download/chrome_download_manager_delegate.h
|
||||
index 32d23a0c98061..be6a99a33bdeb 100644
|
||||
index 7ae09b406f344..801d6c846e744 100644
|
||||
--- chrome/browser/download/chrome_download_manager_delegate.h
|
||||
+++ chrome/browser/download/chrome_download_manager_delegate.h
|
||||
@@ -19,6 +19,7 @@
|
||||
|
@ -82,7 +82,7 @@ index 32d23a0c98061..be6a99a33bdeb 100644
|
|||
#include "chrome/browser/download/download_completion_blocker.h"
|
||||
#include "chrome/browser/download/download_target_determiner_delegate.h"
|
||||
#include "components/download/public/common/download_danger_type.h"
|
||||
@@ -57,6 +58,12 @@ class CrxInstallError;
|
||||
@@ -58,6 +59,12 @@ class CrxInstallError;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -95,7 +95,7 @@ index 32d23a0c98061..be6a99a33bdeb 100644
|
|||
// This is the Chrome side helper for the download system.
|
||||
class ChromeDownloadManagerDelegate
|
||||
: public content::DownloadManagerDelegate,
|
||||
@@ -393,6 +400,10 @@ class ChromeDownloadManagerDelegate
|
||||
@@ -401,6 +408,10 @@ class ChromeDownloadManagerDelegate
|
||||
// Whether a file picker dialog is showing.
|
||||
bool is_file_picker_showing_;
|
||||
|
||||
|
|
|
@ -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 66ea000f8c048..02eeb15adceed 100644
|
||||
index da9c9d7c0f458..a97fc4e019775 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 66ea000f8c048..02eeb15adceed 100644
|
|||
|
||||
WebViewGuestDelegate* ChromeExtensionsAPIClient::CreateWebViewGuestDelegate(
|
||||
diff --git chrome/browser/extensions/api/tabs/tabs_api.cc chrome/browser/extensions/api/tabs/tabs_api.cc
|
||||
index d0ec6330ae8c1..c9e2857fa06b4 100644
|
||||
index f4fc8d090230a..0de22b5e1c0f1 100644
|
||||
--- chrome/browser/extensions/api/tabs/tabs_api.cc
|
||||
+++ chrome/browser/extensions/api/tabs/tabs_api.cc
|
||||
@@ -1603,7 +1603,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
|
||||
@@ -1646,7 +1646,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
|
||||
return RespondNow(Error(ExtensionTabUtil::kTabStripNotEditableError));
|
||||
}
|
||||
|
||||
|
@ -46,7 +46,7 @@ index d0ec6330ae8c1..c9e2857fa06b4 100644
|
|||
tab_strip->ActivateTabAt(tab_index);
|
||||
DCHECK_EQ(contents, tab_strip->GetActiveWebContents());
|
||||
}
|
||||
@@ -1617,7 +1617,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
|
||||
@@ -1660,7 +1660,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
|
||||
}
|
||||
|
||||
bool highlighted = *params->update_properties.highlighted;
|
||||
|
@ -55,7 +55,7 @@ index d0ec6330ae8c1..c9e2857fa06b4 100644
|
|||
tab_strip->ToggleSelectionAt(tab_index);
|
||||
}
|
||||
}
|
||||
@@ -1629,7 +1629,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
|
||||
@@ -1672,7 +1672,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
|
||||
kCannotUpdateMuteCaptured, base::NumberToString(tab_id))));
|
||||
}
|
||||
|
||||
|
@ -64,7 +64,7 @@ index d0ec6330ae8c1..c9e2857fa06b4 100644
|
|||
int opener_id = *params->update_properties.opener_tab_id;
|
||||
WebContents* opener_contents = nullptr;
|
||||
if (opener_id == tab_id) {
|
||||
@@ -1664,7 +1664,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
|
||||
@@ -1707,7 +1707,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
|
||||
->SetAutoDiscardable(state);
|
||||
}
|
||||
|
||||
|
@ -73,19 +73,17 @@ index d0ec6330ae8c1..c9e2857fa06b4 100644
|
|||
// Bug fix for crbug.com/1197888. Don't let the extension update the tab if
|
||||
// the user is dragging tabs.
|
||||
if (!ExtensionTabUtil::IsTabStripEditable()) {
|
||||
@@ -1685,8 +1685,9 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
|
||||
@@ -1728,7 +1728,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;
|
||||
- if (browser->profile()->IsIncognitoProfile() &&
|
||||
- !IsURLAllowedInIncognito(GURL(updated_url), browser->profile())) {
|
||||
+ auto* profile = Profile::FromBrowserContext(browser_context());
|
||||
+ if (profile->IsIncognitoProfile() &&
|
||||
+ !IsURLAllowedInIncognito(GURL(updated_url), profile)) {
|
||||
!IsURLAllowedInIncognito(GURL(updated_url))) {
|
||||
return RespondNow(Error(ErrorUtils::FormatErrorMessage(
|
||||
tabs_constants::kURLsNotAllowedInIncognitoError, updated_url)));
|
||||
}
|
||||
@@ -1700,7 +1701,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
|
||||
@@ -1743,7 +1744,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
|
||||
return RespondNow(Error(std::move(error)));
|
||||
}
|
||||
|
||||
|
@ -95,7 +93,7 @@ index d0ec6330ae8c1..c9e2857fa06b4 100644
|
|||
current_url, updated_url, js_callstack());
|
||||
}
|
||||
diff --git chrome/browser/extensions/extension_tab_util.cc chrome/browser/extensions/extension_tab_util.cc
|
||||
index a896cb1079d97..6681661f788f6 100644
|
||||
index 4d2c067a06041..6943da2585d22 100644
|
||||
--- chrome/browser/extensions/extension_tab_util.cc
|
||||
+++ chrome/browser/extensions/extension_tab_util.cc
|
||||
@@ -20,6 +20,7 @@
|
||||
|
@ -106,7 +104,7 @@ index a896cb1079d97..6681661f788f6 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"
|
||||
@@ -73,6 +74,10 @@
|
||||
@@ -74,6 +75,10 @@
|
||||
#include "third_party/blink/public/common/features.h"
|
||||
#include "url/gurl.h"
|
||||
|
||||
|
@ -117,20 +115,14 @@ index a896cb1079d97..6681661f788f6 100644
|
|||
using content::NavigationEntry;
|
||||
using content::WebContents;
|
||||
using extensions::mojom::APIPermissionID;
|
||||
@@ -696,6 +701,20 @@ bool ExtensionTabUtil::GetTabById(int tab_id,
|
||||
@@ -714,6 +719,14 @@ bool ExtensionTabUtil::GetTabById(int tab_id,
|
||||
}
|
||||
}
|
||||
|
||||
+#if BUILDFLAG(ENABLE_CEF)
|
||||
+ 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;
|
||||
+ }
|
||||
+ 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.
|
||||
+ return true;
|
||||
+ }
|
||||
+#endif // BUILDFLAG(ENABLE_CEF)
|
||||
|
|
|
@ -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 cf3c9a1871a35..0577e8f8b60ec 100644
|
||||
index 440b8aaca8f0f..fec585790788d 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 cf3c9a1871a35..0577e8f8b60ec 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"
|
||||
@@ -82,6 +85,11 @@
|
||||
@@ -75,6 +78,11 @@
|
||||
namespace policy {
|
||||
namespace {
|
||||
bool g_command_line_enabled_for_testing = false;
|
||||
|
@ -135,7 +135,7 @@ index cf3c9a1871a35..0577e8f8b60ec 100644
|
|||
} // namespace
|
||||
|
||||
ChromeBrowserPolicyConnector::ChromeBrowserPolicyConnector()
|
||||
@@ -278,6 +286,73 @@ void ChromeBrowserPolicyConnector::EnableCommandLineSupportForTesting() {
|
||||
@@ -255,6 +263,73 @@ void ChromeBrowserPolicyConnector::EnableCommandLineSupportForTesting() {
|
||||
g_command_line_enabled_for_testing = true;
|
||||
}
|
||||
|
||||
|
@ -209,7 +209,7 @@ index cf3c9a1871a35..0577e8f8b60ec 100644
|
|||
base::flat_set<std::string>
|
||||
ChromeBrowserPolicyConnector::device_affiliation_ids() const {
|
||||
if (!device_affiliation_ids_for_testing_.empty()) {
|
||||
@@ -357,25 +432,22 @@ ChromeBrowserPolicyConnector::CreatePolicyProviders() {
|
||||
@@ -318,25 +393,22 @@ ChromeBrowserPolicyConnector::CreatePolicyProviders() {
|
||||
std::unique_ptr<ConfigurationPolicyProvider>
|
||||
ChromeBrowserPolicyConnector::CreatePlatformProvider() {
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
|
@ -244,7 +244,7 @@ index cf3c9a1871a35..0577e8f8b60ec 100644
|
|||
auto loader = std::make_unique<PolicyLoaderMac>(
|
||||
base::ThreadPool::CreateSequencedTaskRunner(
|
||||
{base::MayBlock(), base::TaskPriority::BEST_EFFORT}),
|
||||
@@ -385,7 +457,7 @@ ChromeBrowserPolicyConnector::CreatePlatformProvider() {
|
||||
@@ -346,7 +418,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 cf3c9a1871a35..0577e8f8b60ec 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 e4c6792766ae4..0a0c054d9e4d1 100644
|
||||
index 40ce1cf15d277..e98c6e999fb5b 100644
|
||||
--- chrome/browser/policy/chrome_browser_policy_connector.h
|
||||
+++ chrome/browser/policy/chrome_browser_policy_connector.h
|
||||
@@ -28,6 +28,10 @@
|
||||
#include "components/policy/core/common/policy_loader_lacros.h"
|
||||
#endif // BUILDFLAG(IS_CHROMEOS_LACROS)
|
||||
@@ -23,6 +23,10 @@
|
||||
#include "components/policy/core/browser/android/policy_cache_updater_android.h"
|
||||
#endif
|
||||
|
||||
+#if BUILDFLAG(IS_MAC)
|
||||
+#include "base/apple/scoped_cftyperef.h"
|
||||
|
@ -268,7 +268,7 @@ index e4c6792766ae4..0a0c054d9e4d1 100644
|
|||
class PrefService;
|
||||
|
||||
namespace policy {
|
||||
@@ -135,6 +139,25 @@ class ChromeBrowserPolicyConnector : public BrowserPolicyConnector {
|
||||
@@ -128,6 +132,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 ec09803ffabcf..9a39e6172293f 100644
|
||||
index a467b25145684..8727050b93a35 100644
|
||||
--- chrome/common/chrome_paths.cc
|
||||
+++ chrome/common/chrome_paths.cc
|
||||
@@ -535,7 +535,8 @@ bool PathProvider(int key, base::FilePath* result) {
|
||||
return false;
|
||||
}
|
||||
@@ -525,7 +525,8 @@ bool PathProvider(int key, base::FilePath* result) {
|
||||
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 ec09803ffabcf..9a39e6172293f 100644
|
|||
cur = base::FilePath(policy::kPolicyPath);
|
||||
break;
|
||||
diff --git chrome/common/chrome_paths.h chrome/common/chrome_paths.h
|
||||
index 13abfd26b92b3..acb4d58f02650 100644
|
||||
index fbfe597d09d9a..b8067f8d9ecd7 100644
|
||||
--- chrome/common/chrome_paths.h
|
||||
+++ chrome/common/chrome_paths.h
|
||||
@@ -8,6 +8,7 @@
|
||||
|
@ -382,17 +382,17 @@ index 13abfd26b92b3..acb4d58f02650 100644
|
|||
#include "extensions/buildflags/buildflags.h"
|
||||
#include "third_party/widevine/cdm/buildflags.h"
|
||||
|
||||
@@ -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.
|
||||
@@ -51,7 +52,7 @@ enum {
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
DIR_OUTER_BUNDLE, // Directory that is the outermost Chromium bundle.
|
||||
#endif
|
||||
-#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 be1553785d5b5..2446e30bea57e 100755
|
||||
index 41f2f032eeaa6..cd191b61b9c1e 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,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git chrome/browser/printing/print_backend_service_manager.cc chrome/browser/printing/print_backend_service_manager.cc
|
||||
index 8fe9a3e263964..548609bc78b33 100644
|
||||
index 9f3d26990651f..e89f779746ac5 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 8fe9a3e263964..548609bc78b33 100644
|
|||
+ }
|
||||
+ return base::win::HandleToUint32(hwnd);
|
||||
#else
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return 0;
|
||||
NOTREACHED();
|
||||
#endif
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git chrome/browser/ui/bookmarks/bookmark_stats.cc chrome/browser/ui/bookmarks/bookmark_stats.cc
|
||||
index 7ae18c5a960b0..d48ba838efe6f 100644
|
||||
index bd47b3f13aa2a..0f4f3c47d2647 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 791ab794c8750..ca9e0851e2689 100644
|
||||
index 00510c991e657..830db4087c274 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 791ab794c8750..ca9e0851e2689 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 ee9f399e4c010..2182e42981f9d 100644
|
||||
index 58026d48e15a6..acb3b51f86943 100644
|
||||
--- chrome/browser/ui/views/profiles/profile_menu_coordinator.cc
|
||||
+++ chrome/browser/ui/views/profiles/profile_menu_coordinator.cc
|
||||
@@ -58,7 +58,9 @@ void ProfileMenuCoordinator::Show(bool is_source_accelerator) {
|
||||
is_incognito &= !browser.profile()->IsGuestSession();
|
||||
#endif
|
||||
@@ -52,7 +52,9 @@ void ProfileMenuCoordinator::Show(bool is_source_accelerator) {
|
||||
|
||||
std::unique_ptr<ProfileMenuViewBase> bubble;
|
||||
bool is_incognito = browser.profile()->IsIncognitoProfile();
|
||||
- if (is_incognito) {
|
||||
+ if (is_incognito ||
|
||||
+ (browser.profile()->IsOffTheRecord() &&
|
||||
|
|
|
@ -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 0b7e60d6742de..94af5f4d226bf 100644
|
||||
index cf4597e671afe..a9693c4e10d8e 100644
|
||||
--- chrome/browser/profiles/off_the_record_profile_impl.cc
|
||||
+++ chrome/browser/profiles/off_the_record_profile_impl.cc
|
||||
@@ -643,7 +643,9 @@ std::unique_ptr<Profile> Profile::CreateOffTheRecordProfile(
|
||||
@@ -647,7 +647,9 @@ std::unique_ptr<Profile> Profile::CreateOffTheRecordProfile(
|
||||
#endif
|
||||
if (!profile)
|
||||
profile = std::make_unique<OffTheRecordProfileImpl>(parent, otr_profile_id);
|
||||
|
@ -14,10 +14,10 @@ index 0b7e60d6742de..94af5f4d226bf 100644
|
|||
}
|
||||
|
||||
diff --git chrome/browser/profiles/profile.cc chrome/browser/profiles/profile.cc
|
||||
index 89254771117da..eb35e4595d1ad 100644
|
||||
index 4385d5d90f9c8..88aca5519660e 100644
|
||||
--- chrome/browser/profiles/profile.cc
|
||||
+++ chrome/browser/profiles/profile.cc
|
||||
@@ -81,6 +81,7 @@ base::LazyInstance<std::set<content::BrowserContext*>>::Leaky
|
||||
@@ -84,6 +84,7 @@ base::LazyInstance<std::set<content::BrowserContext*>>::Leaky
|
||||
|
||||
namespace {
|
||||
|
||||
|
@ -25,7 +25,7 @@ index 89254771117da..eb35e4595d1ad 100644
|
|||
const char kDevToolsOTRProfileIDPrefix[] = "Devtools::BrowserContext";
|
||||
const char kMediaRouterOTRProfileIDPrefix[] = "MediaRouter::Presentation";
|
||||
const char kTestOTRProfileIDPrefix[] = "Test::OTR";
|
||||
@@ -101,6 +102,8 @@ bool Profile::OTRProfileID::AllowsBrowserWindows() const {
|
||||
@@ -104,6 +105,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 89254771117da..eb35e4595d1ad 100644
|
|||
base::StartsWith(profile_id_, kDevToolsOTRProfileIDPrefix,
|
||||
base::CompareCase::SENSITIVE) ||
|
||||
base::StartsWith(profile_id_, kMediaRouterOTRProfileIDPrefix,
|
||||
@@ -138,6 +141,16 @@ Profile::OTRProfileID Profile::OTRProfileID::CreateUnique(
|
||||
@@ -141,6 +144,16 @@ Profile::OTRProfileID Profile::OTRProfileID::CreateUnique(
|
||||
base::Uuid::GenerateRandomV4().AsLowercaseString().c_str()));
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,7 @@ index 89254771117da..eb35e4595d1ad 100644
|
|||
Profile::OTRProfileID Profile::OTRProfileID::CreateUniqueForDevTools() {
|
||||
return CreateUnique(kDevToolsOTRProfileIDPrefix);
|
||||
diff --git chrome/browser/profiles/profile.h chrome/browser/profiles/profile.h
|
||||
index f79b0cd32e4fb..c797e6659a43f 100644
|
||||
index 8e96e47754dc7..c65184775fba7 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 f79b0cd32e4fb..c797e6659a43f 100644
|
|||
// Creates a unique OTR profile id to be used for DevTools browser contexts.
|
||||
static OTRProfileID CreateUniqueForDevTools();
|
||||
|
||||
@@ -503,6 +507,9 @@ class Profile : public content::BrowserContext {
|
||||
@@ -506,6 +510,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 f79b0cd32e4fb..c797e6659a43f 100644
|
|||
protected:
|
||||
// Creates an OffTheRecordProfile which points to this Profile.
|
||||
static std::unique_ptr<Profile> CreateOffTheRecordProfile(
|
||||
@@ -514,7 +521,6 @@ class Profile : public content::BrowserContext {
|
||||
@@ -517,7 +524,6 @@ class Profile : public content::BrowserContext {
|
||||
static PrefStore* CreateExtensionPrefStore(Profile*,
|
||||
bool incognito_pref_store);
|
||||
|
||||
|
@ -85,10 +85,10 @@ index f79b0cd32e4fb..c797e6659a43f 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 26667af1eb648..79bb0289f6150 100644
|
||||
index 3dd5f9818cfa0..7b3e3697f4ce3 100644
|
||||
--- chrome/browser/profiles/profile_impl.cc
|
||||
+++ chrome/browser/profiles/profile_impl.cc
|
||||
@@ -1012,7 +1012,9 @@ Profile* ProfileImpl::GetOffTheRecordProfile(const OTRProfileID& otr_profile_id,
|
||||
@@ -1038,7 +1038,9 @@ Profile* ProfileImpl::GetOffTheRecordProfile(const OTRProfileID& otr_profile_id,
|
||||
|
||||
otr_profiles_[otr_profile_id] = std::move(otr_profile);
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git chrome/browser/safe_browsing/BUILD.gn chrome/browser/safe_browsing/BUILD.gn
|
||||
index 19cc1b47ecf4a..56b0e471ff37a 100644
|
||||
index 949f93a7b032a..1c32ec4aa0b84 100644
|
||||
--- chrome/browser/safe_browsing/BUILD.gn
|
||||
+++ chrome/browser/safe_browsing/BUILD.gn
|
||||
@@ -39,6 +39,7 @@ static_library("safe_browsing") {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git chrome/browser/ui/startup/startup_browser_creator.cc chrome/browser/ui/startup/startup_browser_creator.cc
|
||||
index 5e4078d747c74..e1c41cb1a8cda 100644
|
||||
index ba443f5e8838d..a3f3c250f8006 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 5e4078d747c74..e1c41cb1a8cda 100644
|
|||
} // namespace
|
||||
|
||||
StartupProfileMode StartupProfileModeFromReason(
|
||||
@@ -1481,6 +1488,12 @@ void StartupBrowserCreator::ProcessCommandLineWithProfile(
|
||||
@@ -1479,6 +1486,12 @@ void StartupBrowserCreator::ProcessCommandLineWithProfile(
|
||||
{profile, mode}, last_opened_profiles);
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,7 @@ index 5e4078d747c74..e1c41cb1a8cda 100644
|
|||
// static
|
||||
void StartupBrowserCreator::ProcessCommandLineAlreadyRunning(
|
||||
const base::CommandLine& command_line,
|
||||
@@ -1490,6 +1503,11 @@ void StartupBrowserCreator::ProcessCommandLineAlreadyRunning(
|
||||
@@ -1488,6 +1501,11 @@ void StartupBrowserCreator::ProcessCommandLineAlreadyRunning(
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
diff --git chrome/browser/ui/webui/about/about_ui.cc chrome/browser/ui/webui/about/about_ui.cc
|
||||
index 63e740fe81847..ea422ae7bbda4 100644
|
||||
index e28af86de9298..fb182fa3f7c32 100644
|
||||
--- chrome/browser/ui/webui/about/about_ui.cc
|
||||
+++ chrome/browser/ui/webui/about/about_ui.cc
|
||||
@@ -92,6 +92,10 @@
|
||||
@@ -89,6 +89,10 @@
|
||||
#include "chrome/common/webui_url_constants.h"
|
||||
#endif // BUILDFLAG(IS_CHROMEOS)
|
||||
|
||||
|
@ -13,7 +13,7 @@ index 63e740fe81847..ea422ae7bbda4 100644
|
|||
using content::BrowserThread;
|
||||
|
||||
namespace {
|
||||
@@ -624,6 +628,11 @@ ChromeURLsUIConfig::ChromeURLsUIConfig()
|
||||
@@ -620,6 +624,11 @@ ChromeURLsUIConfig::ChromeURLsUIConfig()
|
||||
CreditsUIConfig::CreditsUIConfig()
|
||||
: AboutUIConfigBase(chrome::kChromeUICreditsHost) {}
|
||||
|
||||
|
@ -25,7 +25,7 @@ index 63e740fe81847..ea422ae7bbda4 100644
|
|||
#if !BUILDFLAG(IS_ANDROID)
|
||||
TermsUIConfig::TermsUIConfig()
|
||||
: AboutUIConfigBase(chrome::kChromeUITermsHost) {}
|
||||
@@ -725,6 +734,16 @@ void AboutUIHTMLSource::StartDataRequest(
|
||||
@@ -721,6 +730,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 a1f43d79b6f9b..281ee1e2c8a41 100644
|
||||
index 8b877339c4179..dcb347ef1878f 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 a1f43d79b6f9b..281ee1e2c8a41 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"
|
||||
#include "chrome/browser/ui/webui/autofill_and_password_manager_internals/autofill_internals_ui.h"
|
||||
@@ -211,6 +212,9 @@ void RegisterChromeWebUIConfigs() {
|
||||
@@ -215,6 +216,9 @@ void RegisterChromeWebUIConfigs() {
|
||||
map.AddWebUIConfig(std::make_unique<BluetoothInternalsUIConfig>());
|
||||
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<ComponentsUIConfig>());
|
||||
map.AddWebUIConfig(
|
||||
std::make_unique<security_interstitials::ConnectionHelpUIConfig>());
|
||||
map.AddWebUIConfig(std::make_unique<ChromeURLsUIConfig>());
|
||||
map.AddWebUIConfig(std::make_unique<CrashesUIConfig>());
|
||||
map.AddWebUIConfig(std::make_unique<commerce::CommerceInternalsUIConfig>());
|
||||
diff --git chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
|
||||
index 279f73938d406..c1bf263962e0c 100644
|
||||
index f9ca5f61c9c1f..a99993720a7ea 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 279f73938d406..c1bf263962e0c 100644
|
|||
+#include "cef/libcef/features/features.h"
|
||||
#include "chrome/browser/about_flags.h"
|
||||
#include "chrome/browser/buildflags.h"
|
||||
#include "chrome/browser/commerce/shopping_service_factory.h"
|
||||
@@ -538,6 +539,9 @@ ChromeWebUIControllerFactory::GetListOfAcceptableURLs() {
|
||||
#include "chrome/browser/devtools/devtools_ui_bindings.h"
|
||||
@@ -485,6 +486,9 @@ ChromeWebUIControllerFactory::GetListOfAcceptableURLs() {
|
||||
GURL(chrome::kChromeUIGpuURL),
|
||||
GURL(chrome::kChromeUIHistogramsURL),
|
||||
GURL(chrome::kChromeUIInspectURL),
|
||||
|
@ -113,7 +113,7 @@ index 279f73938d406..c1bf263962e0c 100644
|
|||
GURL(chrome::kChromeUINetExportURL),
|
||||
GURL(chrome::kChromeUIPrefsInternalsURL),
|
||||
diff --git chrome/common/webui_url_constants.cc chrome/common/webui_url_constants.cc
|
||||
index 248b6795e8cbe..c957f9d55613d 100644
|
||||
index 47932e80c59ea..805a9e8e3c3e6 100644
|
||||
--- chrome/common/webui_url_constants.cc
|
||||
+++ chrome/common/webui_url_constants.cc
|
||||
@@ -99,6 +99,9 @@ base::span<const base::cstring_view> ChromeURLHosts() {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
diff --git chrome/browser/ui/webui/version/version_handler.cc chrome/browser/ui/webui/version/version_handler.cc
|
||||
index 55541159e5fc8..8021d1d963f59 100644
|
||||
index 0ce1816cb372d..dfee4d62126b2 100644
|
||||
--- chrome/browser/ui/webui/version/version_handler.cc
|
||||
+++ chrome/browser/ui/webui/version/version_handler.cc
|
||||
@@ -27,12 +27,23 @@
|
||||
@@ -28,12 +28,23 @@
|
||||
#include "ui/base/l10n/l10n_util.h"
|
||||
#include "url/gurl.h"
|
||||
|
||||
|
@ -27,7 +27,7 @@ index 55541159e5fc8..8021d1d963f59 100644
|
|||
base::ScopedBlockingCall scoped_blocking_call(FROM_HERE,
|
||||
base::BlockingType::MAY_BLOCK);
|
||||
|
||||
@@ -48,6 +59,19 @@ void GetFilePaths(const base::FilePath& profile_path,
|
||||
@@ -49,6 +60,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 55541159e5fc8..8021d1d963f59 100644
|
|||
}
|
||||
|
||||
} // namespace
|
||||
@@ -111,23 +135,46 @@ void VersionHandler::HandleRequestPathInfo(const base::Value::List& args) {
|
||||
@@ -115,23 +139,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 f12ad5b23e75c..0f07abc1b85f5 100644
|
||||
index d046b78cb5825..096c0c806cf85 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 f12ad5b23e75c..0f07abc1b85f5 100644
|
|||
#include "chrome/browser/browser_process_impl.h"
|
||||
#include "chrome/browser/profiles/profile.h"
|
||||
#include "chrome/browser/ui/webui/version/version_handler.h"
|
||||
@@ -69,6 +70,10 @@
|
||||
@@ -70,6 +71,10 @@
|
||||
#include "chrome/browser/ui/webui/version/version_util_win.h"
|
||||
#endif
|
||||
|
||||
|
@ -146,7 +146,7 @@ index f12ad5b23e75c..0f07abc1b85f5 100644
|
|||
using content::WebUIDataSource;
|
||||
|
||||
namespace {
|
||||
@@ -89,6 +94,10 @@ void CreateAndAddVersionUIDataSource(Profile* profile) {
|
||||
@@ -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},
|
||||
|
@ -156,8 +156,8 @@ index f12ad5b23e75c..0f07abc1b85f5 100644
|
|||
+#endif
|
||||
{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) {
|
||||
{version_ui::kCopyVariationsLabel, IDS_VERSION_UI_COPY_VARIATIONS_LABEL},
|
||||
@@ -130,6 +139,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 f12ad5b23e75c..0f07abc1b85f5 100644
|
|||
}
|
||||
|
||||
std::string GetProductModifier() {
|
||||
@@ -246,6 +259,10 @@ void VersionUI::AddVersionDetailStrings(content::WebUIDataSource* html_source) {
|
||||
@@ -247,6 +260,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 6b753d716b55d..58d6419be0165 100644
|
||||
index 839526405ef3f..fb2d6f3a98c00 100644
|
||||
--- components/version_ui/resources/about_version.css
|
||||
+++ components/version_ui/resources/about_version.css
|
||||
@@ -135,3 +135,7 @@ body {
|
||||
@@ -138,3 +138,7 @@ body {
|
||||
position: fixed;
|
||||
width: 1px;
|
||||
}
|
||||
|
@ -214,7 +214,7 @@ index 6b753d716b55d..58d6419be0165 100644
|
|||
+ font-size: 0.8em;
|
||||
+}
|
||||
diff --git components/version_ui/resources/about_version.html components/version_ui/resources/about_version.html
|
||||
index 508c4ecfd790f..fed6933908951 100644
|
||||
index c04197bd7b397..7e461101115b1 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 508c4ecfd790f..fed6933908951 100644
|
|||
<tr><td class="label">$i18n{application_label}</td>
|
||||
<td class="version" id="version">
|
||||
<span id="copy-content">
|
||||
@@ -171,7 +183,15 @@ about:version template page
|
||||
@@ -175,7 +187,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 508c4ecfd790f..fed6933908951 100644
|
|||
<td class="version" id="profile_path">$i18n{profile_path}</td>
|
||||
</tr>
|
||||
</if>
|
||||
@@ -198,6 +218,17 @@ about:version template page
|
||||
@@ -208,6 +228,17 @@ about:version template page
|
||||
<td class="version" id="sanitizer">$i18n{sanitizer}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
@ -276,10 +276,10 @@ index 508c4ecfd790f..fed6933908951 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 fcd11ec05dc17..565657694f768 100644
|
||||
index 687a4c066dbc4..1f782c120ba3a 100644
|
||||
--- components/version_ui/resources/about_version.ts
|
||||
+++ components/version_ui/resources/about_version.ts
|
||||
@@ -50,9 +50,21 @@ function handleVariationInfo(
|
||||
@@ -75,9 +75,21 @@ function handleVariationInfo(
|
||||
* @param profilePath The profile path to display.
|
||||
*/
|
||||
function handlePathInfo(
|
||||
|
@ -303,7 +303,7 @@ index fcd11ec05dc17..565657694f768 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 f33bd808d6d56..75515ffa256b7 100644
|
||||
index 0a28810b49c9c..dfc56e70232ff 100644
|
||||
--- components/version_ui/version_ui_constants.cc
|
||||
+++ components/version_ui/version_ui_constants.cc
|
||||
@@ -6,6 +6,7 @@
|
||||
|
@ -314,7 +314,7 @@ index f33bd808d6d56..75515ffa256b7 100644
|
|||
|
||||
namespace version_ui {
|
||||
|
||||
@@ -90,4 +91,15 @@ const char kVersion[] = "version";
|
||||
@@ -93,4 +94,15 @@ const char kVersion[] = "version";
|
||||
const char kVersionModifier[] = "version_modifier";
|
||||
const char kVersionProcessorVariation[] = "version_processor_variation";
|
||||
|
||||
|
@ -331,7 +331,7 @@ index f33bd808d6d56..75515ffa256b7 100644
|
|||
+
|
||||
} // namespace version_ui
|
||||
diff --git components/version_ui/version_ui_constants.h components/version_ui/version_ui_constants.h
|
||||
index 212f7e2114c75..d35549eb15310 100644
|
||||
index 036b6427f56ae..2e68bc18be8c1 100644
|
||||
--- components/version_ui/version_ui_constants.h
|
||||
+++ components/version_ui/version_ui_constants.h
|
||||
@@ -7,6 +7,7 @@
|
||||
|
@ -342,7 +342,7 @@ index 212f7e2114c75..d35549eb15310 100644
|
|||
|
||||
namespace version_ui {
|
||||
|
||||
@@ -92,6 +93,17 @@ extern const char kVersion[];
|
||||
@@ -95,6 +96,17 @@ extern const char kVersion[];
|
||||
extern const char kVersionModifier[];
|
||||
extern const char kVersionProcessorVariation[];
|
||||
|
||||
|
@ -361,7 +361,7 @@ index 212f7e2114c75..d35549eb15310 100644
|
|||
|
||||
#endif // COMPONENTS_VERSION_UI_VERSION_UI_CONSTANTS_H_
|
||||
diff --git components/version_ui_strings.grdp components/version_ui_strings.grdp
|
||||
index 9f236e6217ee9..d2b7964c3a09f 100644
|
||||
index 738a21ef1e4ef..7d4775a8b7ae0 100644
|
||||
--- components/version_ui_strings.grdp
|
||||
+++ components/version_ui_strings.grdp
|
||||
@@ -76,6 +76,14 @@
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git chrome/common/features.gni chrome/common/features.gni
|
||||
index 276e7fbde552c..1fddfa229eeed 100644
|
||||
index 418e78ecb356b..8fe49cf32a374 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 276e7fbde552c..1fddfa229eeed 100644
|
|||
import("//components/compose/features.gni")
|
||||
import("//components/nacl/features.gni")
|
||||
import("//components/safe_browsing/buildflags.gni")
|
||||
@@ -31,7 +32,7 @@ assert(use_blink, "Chromium without blink shouldn't use anything in //chrome")
|
||||
@@ -32,7 +33,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 276e7fbde552c..1fddfa229eeed 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
|
||||
@@ -63,11 +64,13 @@ declare_args() {
|
||||
@@ -64,11 +65,13 @@ declare_args() {
|
||||
# optimize_webui was moved to ui/base/ui_features.gni
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git chrome/renderer/BUILD.gn chrome/renderer/BUILD.gn
|
||||
index ce023fa1c9ef0..10717d8ec7a90 100644
|
||||
index 2e4dc8c6f3e4a..f79b276435e6a 100644
|
||||
--- chrome/renderer/BUILD.gn
|
||||
+++ chrome/renderer/BUILD.gn
|
||||
@@ -5,6 +5,7 @@
|
||||
|
@ -10,7 +10,7 @@ index ce023fa1c9ef0..10717d8ec7a90 100644
|
|||
import("//chrome/common/features.gni")
|
||||
import("//components/nacl/features.gni")
|
||||
import("//components/offline_pages/buildflags/features.gni")
|
||||
@@ -138,6 +139,7 @@ static_library("renderer") {
|
||||
@@ -136,6 +137,7 @@ static_library("renderer") {
|
||||
":process_state",
|
||||
"//base/allocator:buildflags",
|
||||
"//build:chromeos_buildflags",
|
||||
|
@ -18,7 +18,7 @@ index ce023fa1c9ef0..10717d8ec7a90 100644
|
|||
"//chrome:resources",
|
||||
"//chrome:strings",
|
||||
"//chrome/common",
|
||||
@@ -256,6 +258,10 @@ static_library("renderer") {
|
||||
@@ -251,6 +253,10 @@ static_library("renderer") {
|
||||
]
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git chrome/app/chrome_main_delegate.cc chrome/app/chrome_main_delegate.cc
|
||||
index a419367526923..d06e0e2f5b09a 100644
|
||||
index 4569ff21cd37e..33749b8187efa 100644
|
||||
--- chrome/app/chrome_main_delegate.cc
|
||||
+++ chrome/app/chrome_main_delegate.cc
|
||||
@@ -42,6 +42,7 @@
|
||||
|
@ -10,7 +10,7 @@ index a419367526923..d06e0e2f5b09a 100644
|
|||
#include "chrome/browser/buildflags.h"
|
||||
#include "chrome/browser/chrome_content_browser_client.h"
|
||||
#include "chrome/browser/chrome_resource_bundle_helper.h"
|
||||
@@ -573,6 +574,7 @@ struct MainFunction {
|
||||
@@ -572,6 +573,7 @@ struct MainFunction {
|
||||
int (*function)(content::MainFunctionParams);
|
||||
};
|
||||
|
||||
|
@ -18,7 +18,7 @@ index a419367526923..d06e0e2f5b09a 100644
|
|||
// Initializes the user data dir. Must be called before InitializeLocalState().
|
||||
void InitializeUserDataDir(base::CommandLine* command_line) {
|
||||
#if BUILDFLAG(IS_CHROMEOS_LACROS)
|
||||
@@ -656,6 +658,7 @@ void InitializeUserDataDir(base::CommandLine* command_line) {
|
||||
@@ -655,6 +657,7 @@ void InitializeUserDataDir(base::CommandLine* command_line) {
|
||||
command_line->AppendSwitchPath(switches::kUserDataDir, user_data_dir);
|
||||
#endif // BUILDFLAG(IS_WIN)
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ index a419367526923..d06e0e2f5b09a 100644
|
|||
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
void InitLogging(const std::string& process_type) {
|
||||
@@ -788,6 +791,10 @@ ChromeMainDelegate::~ChromeMainDelegate() {
|
||||
@@ -790,6 +793,10 @@ ChromeMainDelegate::~ChromeMainDelegate() {
|
||||
ChromeMainDelegate::~ChromeMainDelegate() = default;
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
|
||||
|
@ -37,7 +37,7 @@ index a419367526923..d06e0e2f5b09a 100644
|
|||
std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
|
||||
InvokedIn invoked_in) {
|
||||
DUMP_WILL_BE_CHECK(base::ThreadPoolInstance::Get());
|
||||
@@ -813,7 +820,7 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
|
||||
@@ -815,7 +822,7 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
|
||||
// future session's metrics.
|
||||
DeferBrowserMetrics(user_data_dir);
|
||||
|
||||
|
@ -46,7 +46,7 @@ index a419367526923..d06e0e2f5b09a 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.
|
||||
@@ -960,7 +967,8 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
|
||||
@@ -962,7 +969,8 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
|
||||
|
||||
// Initializes the resource bundle and determines the locale.
|
||||
std::string actual_locale = LoadLocalState(
|
||||
|
@ -56,7 +56,7 @@ index a419367526923..d06e0e2f5b09a 100644
|
|||
chrome_feature_list_creator->SetApplicationLocale(actual_locale);
|
||||
chrome_feature_list_creator->OverrideCachedUIStrings();
|
||||
|
||||
@@ -977,6 +985,8 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
|
||||
@@ -979,6 +987,8 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
|
||||
new net::NetworkChangeNotifierFactoryAndroid());
|
||||
#endif
|
||||
|
||||
|
@ -65,7 +65,7 @@ index a419367526923..d06e0e2f5b09a 100644
|
|||
if (base::FeatureList::IsEnabled(
|
||||
features::kWriteBasicSystemProfileToPersistentHistogramsFile)) {
|
||||
bool record = true;
|
||||
@@ -987,6 +997,7 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
|
||||
@@ -989,6 +999,7 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
|
||||
if (record)
|
||||
chrome_content_browser_client_->startup_data()->RecordCoreSystemProfile();
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ index a419367526923..d06e0e2f5b09a 100644
|
|||
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
UmaSessionStats::OnStartup();
|
||||
@@ -1030,8 +1041,8 @@ void ChromeMainDelegate::CreateThreadPool(std::string_view name) {
|
||||
@@ -1032,8 +1043,8 @@ void ChromeMainDelegate::CreateThreadPool(std::string_view name) {
|
||||
std::make_unique<ChromeThreadProfilerClient>());
|
||||
|
||||
// `ChromeMainDelegateAndroid::PreSandboxStartup` creates the profiler a little
|
||||
|
@ -84,7 +84,7 @@ index a419367526923..d06e0e2f5b09a 100644
|
|||
// Start the sampling profiler as early as possible - namely, once the thread
|
||||
// pool has been created.
|
||||
sampling_profiler_ = std::make_unique<MainThreadStackSamplingProfiler>();
|
||||
@@ -1438,6 +1449,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
|
||||
@@ -1431,6 +1442,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
|
||||
std::string process_type =
|
||||
command_line.GetSwitchValueASCII(switches::kProcessType);
|
||||
|
||||
|
@ -92,15 +92,15 @@ index a419367526923..d06e0e2f5b09a 100644
|
|||
crash_reporter::InitializeCrashKeys();
|
||||
|
||||
#if BUILDFLAG(IS_POSIX)
|
||||
@@ -1453,6 +1465,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
|
||||
@@ -1446,6 +1458,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
|
||||
if (chrome::ProcessNeedsProfileDir(process_type)) {
|
||||
InitializeUserDataDir(base::CommandLine::ForCurrentProcess());
|
||||
}
|
||||
+#endif // !BUILDFLAG(ENABLE_CEF)
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS_LACROS)
|
||||
// Generate shared resource file only on browser process. This is to avoid
|
||||
@@ -1604,7 +1617,8 @@ void ChromeMainDelegate::PreSandboxStartup() {
|
||||
// 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() {
|
||||
#else
|
||||
const std::string loaded_locale =
|
||||
ui::ResourceBundle::InitSharedInstanceWithLocale(
|
||||
|
@ -110,7 +110,7 @@ index a419367526923..d06e0e2f5b09a 100644
|
|||
|
||||
base::FilePath resources_pack_path;
|
||||
base::PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path);
|
||||
@@ -1634,6 +1648,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
|
||||
@@ -1559,6 +1573,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
|
||||
CHECK(!loaded_locale.empty()) << "Locale could not be found for " << locale;
|
||||
}
|
||||
|
||||
|
@ -118,7 +118,7 @@ index a419367526923..d06e0e2f5b09a 100644
|
|||
#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC)
|
||||
// Zygote needs to call InitCrashReporter() in RunZygote().
|
||||
if (process_type != switches::kZygoteProcess &&
|
||||
@@ -1670,6 +1685,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
|
||||
@@ -1595,6 +1610,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 a419367526923..d06e0e2f5b09a 100644
|
|||
|
||||
#if BUILDFLAG(ENABLE_PDF)
|
||||
MaybePatchGdiGetFontData();
|
||||
@@ -1790,6 +1806,7 @@ void ChromeMainDelegate::ZygoteForked() {
|
||||
@@ -1713,6 +1729,7 @@ void ChromeMainDelegate::ZygoteForked() {
|
||||
SetUpProfilingShutdownHandler();
|
||||
}
|
||||
|
||||
|
@ -134,7 +134,7 @@ index a419367526923..d06e0e2f5b09a 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 =
|
||||
@@ -1802,6 +1819,7 @@ void ChromeMainDelegate::ZygoteForked() {
|
||||
@@ -1725,6 +1742,7 @@ void ChromeMainDelegate::ZygoteForked() {
|
||||
|
||||
// Reset the command line for the newly spawned process.
|
||||
crash_keys::SetCrashKeysFromCommandLine(*command_line);
|
||||
|
@ -142,7 +142,7 @@ index a419367526923..d06e0e2f5b09a 100644
|
|||
}
|
||||
|
||||
#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
|
||||
@@ -1912,6 +1930,7 @@ void ChromeMainDelegate::InitializeMemorySystem() {
|
||||
@@ -1835,6 +1853,7 @@ void ChromeMainDelegate::InitializeMemorySystem() {
|
||||
: memory_system::DispatcherParameters::
|
||||
AllocationTraceRecorderInclusion::kIgnore;
|
||||
|
||||
|
@ -150,7 +150,7 @@ index a419367526923..d06e0e2f5b09a 100644
|
|||
memory_system::Initializer()
|
||||
.SetGwpAsanParameters(gwp_asan_boost_sampling, process_type)
|
||||
.SetProfilingClientParameters(chrome::GetChannel(),
|
||||
@@ -1919,5 +1938,5 @@ void ChromeMainDelegate::InitializeMemorySystem() {
|
||||
@@ -1842,5 +1861,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 ac1361bd6bc2e..a303ca169c7f7 100644
|
||||
index 8f5c477acba39..ff2f90a8bf27b 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 ac1361bd6bc2e..a303ca169c7f7 100644
|
|||
|
||||
base::PathService::OverrideAndCreateIfNeeded(
|
||||
diff --git chrome/browser/chrome_browser_main.cc chrome/browser/chrome_browser_main.cc
|
||||
index 5b89cf0e9a761..8bf832888bd53 100644
|
||||
index d202767ab4f3f..41106d7b31e43 100644
|
||||
--- chrome/browser/chrome_browser_main.cc
|
||||
+++ chrome/browser/chrome_browser_main.cc
|
||||
@@ -52,6 +52,7 @@
|
||||
|
@ -243,7 +243,7 @@ index 5b89cf0e9a761..8bf832888bd53 100644
|
|||
#include "chrome/browser/about_flags.h"
|
||||
#include "chrome/browser/active_use_util.h"
|
||||
#include "chrome/browser/after_startup_task_utils.h"
|
||||
@@ -527,7 +528,7 @@ void ProcessSingletonNotificationCallbackImpl(
|
||||
@@ -528,7 +529,7 @@ void ProcessSingletonNotificationCallbackImpl(
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -252,7 +252,7 @@ index 5b89cf0e9a761..8bf832888bd53 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
|
||||
@@ -842,7 +843,7 @@ int ChromeBrowserMainParts::PreEarlyInitialization() {
|
||||
@@ -843,7 +844,7 @@ int ChromeBrowserMainParts::PreEarlyInitialization() {
|
||||
return content::RESULT_CODE_NORMAL_EXIT;
|
||||
}
|
||||
|
||||
|
@ -261,7 +261,7 @@ index 5b89cf0e9a761..8bf832888bd53 100644
|
|||
// If we are running stale binaries then relaunch and exit immediately.
|
||||
if (upgrade_util::IsRunningOldChrome()) {
|
||||
if (!upgrade_util::RelaunchChromeBrowser(
|
||||
@@ -855,7 +856,7 @@ int ChromeBrowserMainParts::PreEarlyInitialization() {
|
||||
@@ -856,7 +857,7 @@ int ChromeBrowserMainParts::PreEarlyInitialization() {
|
||||
// result in browser startup bailing.
|
||||
return chrome::RESULT_CODE_NORMAL_EXIT_UPGRADE_RELAUNCHED;
|
||||
}
|
||||
|
@ -270,7 +270,7 @@ index 5b89cf0e9a761..8bf832888bd53 100644
|
|||
|
||||
return load_local_state_result;
|
||||
}
|
||||
@@ -965,7 +966,7 @@ int ChromeBrowserMainParts::OnLocalStateLoaded(
|
||||
@@ -961,7 +962,7 @@ int ChromeBrowserMainParts::OnLocalStateLoaded(
|
||||
browser_process_->local_state());
|
||||
platform_management_service->RefreshCache(base::NullCallback());
|
||||
|
||||
|
@ -279,7 +279,7 @@ index 5b89cf0e9a761..8bf832888bd53 100644
|
|||
if (first_run::IsChromeFirstRun()) {
|
||||
bool stats_default;
|
||||
if (GoogleUpdateSettings::GetCollectStatsConsentDefault(&stats_default)) {
|
||||
@@ -978,7 +979,7 @@ int ChromeBrowserMainParts::OnLocalStateLoaded(
|
||||
@@ -974,7 +975,7 @@ int ChromeBrowserMainParts::OnLocalStateLoaded(
|
||||
: metrics::EnableMetricsDefault::OPT_IN);
|
||||
}
|
||||
}
|
||||
|
@ -288,7 +288,7 @@ index 5b89cf0e9a761..8bf832888bd53 100644
|
|||
|
||||
std::string locale =
|
||||
startup_data_->chrome_feature_list_creator()->actual_locale();
|
||||
@@ -1011,6 +1012,7 @@ int ChromeBrowserMainParts::ApplyFirstRunPrefs() {
|
||||
@@ -1007,6 +1008,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 5b89cf0e9a761..8bf832888bd53 100644
|
|||
std::unique_ptr<installer::InitialPreferences> installer_initial_prefs =
|
||||
startup_data_->chrome_feature_list_creator()->TakeInitialPrefs();
|
||||
if (!installer_initial_prefs)
|
||||
@@ -1044,6 +1046,7 @@ int ChromeBrowserMainParts::ApplyFirstRunPrefs() {
|
||||
@@ -1040,6 +1042,7 @@ int ChromeBrowserMainParts::ApplyFirstRunPrefs() {
|
||||
master_prefs_->confirm_to_quit);
|
||||
}
|
||||
#endif // BUILDFLAG(IS_MAC)
|
||||
|
@ -304,7 +304,7 @@ index 5b89cf0e9a761..8bf832888bd53 100644
|
|||
#endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
return content::RESULT_CODE_NORMAL_EXIT;
|
||||
}
|
||||
@@ -1105,6 +1108,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
|
||||
@@ -1112,6 +1115,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
|
||||
|
||||
browser_process_->browser_policy_connector()->OnResourceBundleCreated();
|
||||
|
||||
|
@ -312,7 +312,7 @@ index 5b89cf0e9a761..8bf832888bd53 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)
|
||||
@@ -1126,6 +1130,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
|
||||
@@ -1133,6 +1137,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 5b89cf0e9a761..8bf832888bd53 100644
|
|||
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
#if defined(ARCH_CPU_X86_64)
|
||||
@@ -1497,6 +1502,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
@@ -1504,6 +1509,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
browser_process_->PreMainMessageLoopRun();
|
||||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
|
@ -328,7 +328,7 @@ index 5b89cf0e9a761..8bf832888bd53 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)) {
|
||||
@@ -1508,6 +1514,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
@@ -1515,6 +1521,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
return ChromeBrowserMainPartsWin::HandleIconsCommands(
|
||||
*base::CommandLine::ForCurrentProcess());
|
||||
}
|
||||
|
@ -336,7 +336,7 @@ index 5b89cf0e9a761..8bf832888bd53 100644
|
|||
|
||||
ui::SelectFileDialog::SetFactory(
|
||||
std::make_unique<ChromeSelectFileDialogFactory>());
|
||||
@@ -1530,6 +1537,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
@@ -1537,6 +1544,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
}
|
||||
#endif // BUILDFLAG(CHROME_FOR_TESTING)
|
||||
|
||||
|
@ -344,7 +344,7 @@ index 5b89cf0e9a761..8bf832888bd53 100644
|
|||
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
|
||||
switches::kMakeDefaultBrowser)) {
|
||||
bool is_managed = g_browser_process->local_state()->IsManagedPreference(
|
||||
@@ -1543,18 +1551,22 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
@@ -1550,18 +1558,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 5b89cf0e9a761..8bf832888bd53 100644
|
|||
|
||||
#if !BUILDFLAG(IS_ANDROID) && BUILDFLAG(ENABLE_DOWNGRADE_PROCESSING)
|
||||
// Begin relaunch processing immediately if User Data migration is required
|
||||
@@ -1593,7 +1605,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
@@ -1600,7 +1612,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
}
|
||||
#endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS)
|
||||
|
||||
|
@ -376,7 +376,7 @@ index 5b89cf0e9a761..8bf832888bd53 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
|
||||
@@ -1602,7 +1614,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
@@ -1609,7 +1621,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 5b89cf0e9a761..8bf832888bd53 100644
|
|||
|
||||
// Desktop construction occurs here, (required before profile creation).
|
||||
PreProfileInit();
|
||||
@@ -1675,6 +1687,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
@@ -1682,6 +1694,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 5b89cf0e9a761..8bf832888bd53 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
|
||||
@@ -1714,6 +1727,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
@@ -1721,6 +1734,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
*base::CommandLine::ForCurrentProcess());
|
||||
}
|
||||
#endif // BUILDFLAG(IS_WIN)
|
||||
|
@ -401,7 +401,7 @@ index 5b89cf0e9a761..8bf832888bd53 100644
|
|||
|
||||
// Configure modules that need access to resources.
|
||||
net::NetModule::SetResourceProvider(ChromeNetResourceProvider);
|
||||
@@ -1805,6 +1819,11 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
@@ -1812,6 +1826,11 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
g_browser_process->profile_manager()->GetLastOpenedProfiles();
|
||||
}
|
||||
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
|
@ -413,7 +413,7 @@ index 5b89cf0e9a761..8bf832888bd53 100644
|
|||
// This step is costly.
|
||||
if (browser_creator_->Start(*base::CommandLine::ForCurrentProcess(),
|
||||
base::FilePath(), profile_info,
|
||||
@@ -1837,11 +1856,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
@@ -1844,11 +1863,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 e389b440fa666..88a1e390cb9e2 100644
|
||||
index 25b5c325f612d..76fdebb99df6c 100644
|
||||
--- chrome/browser/chrome_content_browser_client.cc
|
||||
+++ chrome/browser/chrome_content_browser_client.cc
|
||||
@@ -48,6 +48,7 @@
|
||||
|
@ -476,7 +476,7 @@ index e389b440fa666..88a1e390cb9e2 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"
|
||||
@@ -1515,6 +1516,8 @@ ChromeContentBrowserClient::GetPopupNavigationDelegateFactoryForTesting() {
|
||||
@@ -1516,6 +1517,8 @@ ChromeContentBrowserClient::GetPopupNavigationDelegateFactoryForTesting() {
|
||||
}
|
||||
|
||||
ChromeContentBrowserClient::ChromeContentBrowserClient() {
|
||||
|
@ -485,7 +485,7 @@ index e389b440fa666..88a1e390cb9e2 100644
|
|||
#if BUILDFLAG(ENABLE_PLUGINS)
|
||||
extra_parts_.push_back(
|
||||
std::make_unique<ChromeContentBrowserClientPluginsPart>());
|
||||
@@ -1552,6 +1555,11 @@ ChromeContentBrowserClient::~ChromeContentBrowserClient() {
|
||||
@@ -1553,6 +1556,11 @@ ChromeContentBrowserClient::~ChromeContentBrowserClient() {
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -497,7 +497,7 @@ index e389b440fa666..88a1e390cb9e2 100644
|
|||
// static
|
||||
void ChromeContentBrowserClient::RegisterLocalStatePrefs(
|
||||
PrefRegistrySimple* registry) {
|
||||
@@ -3966,28 +3974,25 @@ bool UpdatePreferredColorScheme(WebPreferences* web_prefs,
|
||||
@@ -4017,28 +4025,25 @@ bool UpdatePreferredColorScheme(WebPreferences* web_prefs,
|
||||
web_prefs->preferred_color_scheme;
|
||||
}
|
||||
#else
|
||||
|
@ -543,7 +543,7 @@ index e389b440fa666..88a1e390cb9e2 100644
|
|||
#endif // BUILDFLAG(IS_ANDROID)
|
||||
|
||||
// Reauth WebUI doesn't support dark mode yet because it shares the dialog
|
||||
@@ -4741,9 +4746,11 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated(
|
||||
@@ -4794,9 +4799,11 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated(
|
||||
&search::HandleNewTabURLReverseRewrite);
|
||||
#endif // BUILDFLAG(IS_ANDROID)
|
||||
|
||||
|
@ -555,7 +555,7 @@ index e389b440fa666..88a1e390cb9e2 100644
|
|||
}
|
||||
|
||||
base::FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() {
|
||||
@@ -6880,7 +6887,7 @@ void ChromeContentBrowserClient::OnNetworkServiceCreated(
|
||||
@@ -6903,7 +6910,7 @@ void ChromeContentBrowserClient::OnNetworkServiceCreated(
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -564,7 +564,7 @@ index e389b440fa666..88a1e390cb9e2 100644
|
|||
content::BrowserContext* context,
|
||||
bool in_memory,
|
||||
const base::FilePath& relative_partition_path,
|
||||
@@ -6898,6 +6905,8 @@ void ChromeContentBrowserClient::ConfigureNetworkContextParams(
|
||||
@@ -6921,6 +6928,8 @@ void ChromeContentBrowserClient::ConfigureNetworkContextParams(
|
||||
network_context_params->user_agent = GetUserAgentBasedOnPolicy(context);
|
||||
network_context_params->accept_language = GetApplicationLocale();
|
||||
}
|
||||
|
@ -573,7 +573,7 @@ index e389b440fa666..88a1e390cb9e2 100644
|
|||
}
|
||||
|
||||
std::vector<base::FilePath>
|
||||
@@ -8060,11 +8069,11 @@ void ChromeContentBrowserClient::OnKeepaliveRequestStarted(
|
||||
@@ -8087,11 +8096,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 e389b440fa666..88a1e390cb9e2 100644
|
|||
FROM_HERE, keepalive_deadline_ - now,
|
||||
base::BindOnce(
|
||||
&ChromeContentBrowserClient::OnKeepaliveTimerFired,
|
||||
@@ -8086,7 +8095,8 @@ void ChromeContentBrowserClient::OnKeepaliveRequestFinished() {
|
||||
@@ -8113,7 +8122,8 @@ void ChromeContentBrowserClient::OnKeepaliveRequestFinished() {
|
||||
--num_keepalive_requests_;
|
||||
if (num_keepalive_requests_ == 0) {
|
||||
DVLOG(1) << "Stopping the keepalive timer";
|
||||
|
@ -597,7 +597,7 @@ index e389b440fa666..88a1e390cb9e2 100644
|
|||
// This deletes the keep alive handle attached to the timer function and
|
||||
// unblock the shutdown sequence.
|
||||
}
|
||||
@@ -8260,7 +8270,7 @@ void ChromeContentBrowserClient::OnKeepaliveTimerFired(
|
||||
@@ -8288,7 +8298,7 @@ void ChromeContentBrowserClient::OnKeepaliveTimerFired(
|
||||
const auto now = base::TimeTicks::Now();
|
||||
const auto then = keepalive_deadline_;
|
||||
if (now < then) {
|
||||
|
@ -607,10 +607,10 @@ index e389b440fa666..88a1e390cb9e2 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 8f3e428979146..a29e251d492ab 100644
|
||||
index 5d587e8473cb2..5fd83e7515ba5 100644
|
||||
--- chrome/browser/chrome_content_browser_client.h
|
||||
+++ chrome/browser/chrome_content_browser_client.h
|
||||
@@ -149,6 +149,8 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
|
||||
@@ -148,6 +148,8 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
|
||||
|
||||
~ChromeContentBrowserClient() override;
|
||||
|
||||
|
@ -619,7 +619,7 @@ index 8f3e428979146..a29e251d492ab 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.
|
||||
@@ -713,7 +715,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
|
||||
@@ -716,7 +718,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
|
||||
override;
|
||||
void OnNetworkServiceCreated(
|
||||
network::mojom::NetworkService* network_service) override;
|
||||
|
@ -628,7 +628,7 @@ index 8f3e428979146..a29e251d492ab 100644
|
|||
content::BrowserContext* context,
|
||||
bool in_memory,
|
||||
const base::FilePath& relative_partition_path,
|
||||
@@ -1272,7 +1274,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
|
||||
@@ -1274,7 +1276,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
uint64_t num_keepalive_requests_ = 0;
|
||||
|
@ -638,7 +638,7 @@ index 8f3e428979146..a29e251d492ab 100644
|
|||
#endif
|
||||
|
||||
diff --git chrome/browser/prefs/browser_prefs.cc chrome/browser/prefs/browser_prefs.cc
|
||||
index 3e27913d47dc7..b727904f17ae6 100644
|
||||
index a6002045888c4..6b96b3891822f 100644
|
||||
--- chrome/browser/prefs/browser_prefs.cc
|
||||
+++ chrome/browser/prefs/browser_prefs.cc
|
||||
@@ -16,6 +16,7 @@
|
||||
|
@ -649,7 +649,7 @@ index 3e27913d47dc7..b727904f17ae6 100644
|
|||
#include "chrome/browser/about_flags.h"
|
||||
#include "chrome/browser/accessibility/accessibility_labels_service.h"
|
||||
#include "chrome/browser/accessibility/invert_bubble_prefs.h"
|
||||
@@ -212,6 +213,10 @@
|
||||
@@ -209,6 +210,10 @@
|
||||
#include "extensions/browser/pref_names.h"
|
||||
#endif // BUILDFLAG(ENABLE_EXTENSIONS_CORE)
|
||||
|
||||
|
@ -660,7 +660,7 @@ index 3e27913d47dc7..b727904f17ae6 100644
|
|||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
#include "chrome/browser/accessibility/animation_policy_prefs.h"
|
||||
#include "chrome/browser/apps/platform_apps/shortcut_manager.h"
|
||||
@@ -1888,7 +1893,8 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
|
||||
@@ -1843,7 +1848,8 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
|
||||
#endif // BUILDFLAG(GOOGLE_CHROME_BRANDING)
|
||||
#endif // BUILDFLAG(IS_WIN)
|
||||
|
||||
|
@ -670,7 +670,7 @@ index 3e27913d47dc7..b727904f17ae6 100644
|
|||
downgrade::RegisterPrefs(registry);
|
||||
#endif
|
||||
|
||||
@@ -1941,6 +1947,11 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
|
||||
@@ -1896,6 +1902,11 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
|
||||
|
||||
// This is intentionally last.
|
||||
RegisterLocalStatePrefsForMigration(registry);
|
||||
|
@ -682,7 +682,7 @@ index 3e27913d47dc7..b727904f17ae6 100644
|
|||
}
|
||||
|
||||
// Register prefs applicable to all profiles.
|
||||
@@ -2390,6 +2401,10 @@ void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
|
||||
@@ -2344,6 +2355,10 @@ void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
|
||||
const std::string& locale) {
|
||||
RegisterProfilePrefs(registry, locale);
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git chrome/browser/ui/browser_command_controller.cc chrome/browser/ui/browser_command_controller.cc
|
||||
index 14e7065d7dbd6..b01501b4253a3 100644
|
||||
index ec7c90dc23958..0fa7a7110cf43 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 14e7065d7dbd6..b01501b4253a3 100644
|
|||
// The order of commands in this switch statement must match the function
|
||||
// declaration order in browser.h!
|
||||
switch (id) {
|
||||
@@ -1207,11 +1215,13 @@ void BrowserCommandController::TabRestoreServiceLoaded(
|
||||
@@ -1203,11 +1211,13 @@ void BrowserCommandController::TabRestoreServiceLoaded(
|
||||
// BrowserCommandController, private:
|
||||
|
||||
bool BrowserCommandController::IsShowingMainUI() {
|
||||
|
@ -41,10 +41,10 @@ index 14e7065d7dbd6..b01501b4253a3 100644
|
|||
|
||||
void BrowserCommandController::InitCommandState() {
|
||||
diff --git chrome/browser/ui/toolbar/app_menu_model.cc chrome/browser/ui/toolbar/app_menu_model.cc
|
||||
index 32f5ef6e5ac36..6b82915434afe 100644
|
||||
index 5d09d33c4a730..205a4fbb6abe3 100644
|
||||
--- chrome/browser/ui/toolbar/app_menu_model.cc
|
||||
+++ chrome/browser/ui/toolbar/app_menu_model.cc
|
||||
@@ -717,10 +717,12 @@ FindAndEditSubMenuModel::FindAndEditSubMenuModel(
|
||||
@@ -714,10 +714,12 @@ FindAndEditSubMenuModel::FindAndEditSubMenuModel(
|
||||
ui::SimpleMenuModel::Delegate* delegate)
|
||||
: SimpleMenuModel(delegate) {
|
||||
AddItemWithStringIdAndVectorIcon(this, IDC_FIND, IDS_FIND, kSearchMenuIcon);
|
||||
|
@ -57,7 +57,7 @@ index 32f5ef6e5ac36..6b82915434afe 100644
|
|||
}
|
||||
|
||||
class SaveAndShareSubMenuModel : public ui::SimpleMenuModel {
|
||||
@@ -785,6 +787,57 @@ SaveAndShareSubMenuModel::SaveAndShareSubMenuModel(
|
||||
@@ -782,6 +784,57 @@ SaveAndShareSubMenuModel::SaveAndShareSubMenuModel(
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -115,7 +115,7 @@ index 32f5ef6e5ac36..6b82915434afe 100644
|
|||
} // namespace
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -1701,7 +1754,7 @@ bool AppMenuModel::IsCommandIdChecked(int command_id) const {
|
||||
@@ -1696,7 +1749,7 @@ bool AppMenuModel::IsCommandIdChecked(int command_id) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -124,7 +124,7 @@ index 32f5ef6e5ac36..6b82915434afe 100644
|
|||
GlobalError* error =
|
||||
GlobalErrorServiceFactory::GetForProfile(browser_->profile())
|
||||
->GetGlobalErrorByMenuItemCommandID(command_id);
|
||||
@@ -1717,6 +1770,30 @@ bool AppMenuModel::IsCommandIdEnabled(int command_id) const {
|
||||
@@ -1712,6 +1765,30 @@ bool AppMenuModel::IsCommandIdEnabled(int command_id) const {
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -155,7 +155,7 @@ index 32f5ef6e5ac36..6b82915434afe 100644
|
|||
bool AppMenuModel::IsCommandIdAlerted(int command_id) const {
|
||||
if (command_id == IDC_VIEW_PASSWORDS ||
|
||||
command_id == IDC_SHOW_PASSWORD_MANAGER) {
|
||||
@@ -1873,8 +1950,10 @@ void AppMenuModel::Build() {
|
||||
@@ -1868,8 +1945,10 @@ void AppMenuModel::Build() {
|
||||
IDS_CLEAR_BROWSING_DATA,
|
||||
kTrashCanRefreshIcon);
|
||||
|
||||
|
@ -166,7 +166,7 @@ index 32f5ef6e5ac36..6b82915434afe 100644
|
|||
AddSeparator(ui::NORMAL_SEPARATOR);
|
||||
|
||||
AddItemWithStringIdAndVectorIcon(this, IDC_PRINT, IDS_PRINT, kPrintMenuIcon);
|
||||
@@ -1977,6 +2056,11 @@ void AppMenuModel::Build() {
|
||||
@@ -1965,6 +2044,11 @@ void AppMenuModel::Build() {
|
||||
}
|
||||
#endif // !BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
|
||||
|
@ -179,10 +179,10 @@ index 32f5ef6e5ac36..6b82915434afe 100644
|
|||
}
|
||||
|
||||
diff --git chrome/browser/ui/toolbar/app_menu_model.h chrome/browser/ui/toolbar/app_menu_model.h
|
||||
index 426ca35c4c814..247cfd2d99731 100644
|
||||
index 84787f30b7b01..df979d0f711a0 100644
|
||||
--- chrome/browser/ui/toolbar/app_menu_model.h
|
||||
+++ chrome/browser/ui/toolbar/app_menu_model.h
|
||||
@@ -232,6 +232,7 @@ class AppMenuModel : public ui::SimpleMenuModel,
|
||||
@@ -231,6 +231,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 426ca35c4c814..247cfd2d99731 100644
|
|||
bool IsCommandIdAlerted(int command_id) const override;
|
||||
bool IsElementIdAlerted(ui::ElementIdentifier element_id) const override;
|
||||
bool GetAcceleratorForCommandId(int command_id,
|
||||
@@ -272,6 +273,8 @@ class AppMenuModel : public ui::SimpleMenuModel,
|
||||
@@ -271,6 +272,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 711d389229e08..780e1b9201c72 100644
|
||||
index cc1dbe6666468..c41b6e9cc4803 100644
|
||||
--- chrome/browser/ui/views/frame/browser_frame.cc
|
||||
+++ chrome/browser/ui/views/frame/browser_frame.cc
|
||||
@@ -115,15 +115,25 @@ ui::ColorProviderKey::SchemeVariant GetSchemeVariant(
|
||||
@@ -112,15 +112,25 @@ ui::ColorProviderKey::SchemeVariant GetSchemeVariant(
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// BrowserFrame, public:
|
||||
|
||||
|
@ -250,7 +250,7 @@ index 711d389229e08..780e1b9201c72 100644
|
|||
}
|
||||
|
||||
BrowserFrame::~BrowserFrame() {}
|
||||
@@ -229,10 +239,20 @@ void BrowserFrame::LayoutWebAppWindowTitle(
|
||||
@@ -226,10 +236,20 @@ void BrowserFrame::LayoutWebAppWindowTitle(
|
||||
}
|
||||
|
||||
int BrowserFrame::GetTopInset() const {
|
||||
|
@ -271,7 +271,7 @@ index 711d389229e08..780e1b9201c72 100644
|
|||
browser_frame_view_->UpdateThrobber(running);
|
||||
}
|
||||
|
||||
@@ -241,6 +261,8 @@ BrowserNonClientFrameView* BrowserFrame::GetFrameView() const {
|
||||
@@ -238,6 +258,8 @@ BrowserNonClientFrameView* BrowserFrame::GetFrameView() const {
|
||||
}
|
||||
|
||||
bool BrowserFrame::UseCustomFrame() const {
|
||||
|
@ -280,7 +280,7 @@ index 711d389229e08..780e1b9201c72 100644
|
|||
return native_browser_frame_->UseCustomFrame();
|
||||
}
|
||||
|
||||
@@ -255,20 +277,30 @@ bool BrowserFrame::ShouldDrawFrameHeader() const {
|
||||
@@ -252,20 +274,30 @@ bool BrowserFrame::ShouldDrawFrameHeader() const {
|
||||
void BrowserFrame::GetWindowPlacement(
|
||||
gfx::Rect* bounds,
|
||||
ui::mojom::WindowShowState* show_state) const {
|
||||
|
@ -311,7 +311,7 @@ index 711d389229e08..780e1b9201c72 100644
|
|||
browser_frame_view_->OnBrowserViewInitViewsComplete();
|
||||
}
|
||||
|
||||
@@ -369,6 +401,8 @@ ui::ColorProviderKey::ThemeInitializerSupplier* BrowserFrame::GetCustomTheme()
|
||||
@@ -366,6 +398,8 @@ ui::ColorProviderKey::ThemeInitializerSupplier* BrowserFrame::GetCustomTheme()
|
||||
}
|
||||
|
||||
void BrowserFrame::OnNativeWidgetWorkspaceChanged() {
|
||||
|
@ -320,7 +320,7 @@ index 711d389229e08..780e1b9201c72 100644
|
|||
chrome::SaveWindowWorkspace(browser_view_->browser(), GetWorkspace());
|
||||
chrome::SaveWindowVisibleOnAllWorkspaces(browser_view_->browser(),
|
||||
IsVisibleOnAllWorkspaces());
|
||||
@@ -575,6 +609,13 @@ void BrowserFrame::SelectNativeTheme() {
|
||||
@@ -572,6 +606,13 @@ void BrowserFrame::SelectNativeTheme() {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -334,7 +334,7 @@ index 711d389229e08..780e1b9201c72 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:
|
||||
@@ -640,5 +681,8 @@ bool BrowserFrame::RegenerateFrameOnThemeChange(
|
||||
@@ -637,5 +678,8 @@ bool BrowserFrame::RegenerateFrameOnThemeChange(
|
||||
}
|
||||
|
||||
bool BrowserFrame::IsIncognitoBrowser() const {
|
||||
|
@ -344,7 +344,7 @@ index 711d389229e08..780e1b9201c72 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 532705a04c47b..0272f27596df6 100644
|
||||
index 3d8a15049d4d2..66c4789581fe1 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 532705a04c47b..0272f27596df6 100644
|
|||
|
||||
// views::Widget:
|
||||
views::internal::RootView* CreateRootView() override;
|
||||
@@ -171,22 +172,26 @@ class BrowserFrame : public views::Widget, public views::ContextMenuController {
|
||||
@@ -172,22 +173,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 532705a04c47b..0272f27596df6 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 8c08f4c3f10fa..721a7b1d5f136 100644
|
||||
index 3944e4463304d..9f09d246c0b6a 100644
|
||||
--- chrome/browser/ui/views/frame/browser_view.cc
|
||||
+++ chrome/browser/ui/views/frame/browser_view.cc
|
||||
@@ -366,10 +366,6 @@ constexpr base::FeatureParam<base::TimeDelta> kLoadingTabAnimationFrameDelay = {
|
||||
@@ -361,10 +361,6 @@ constexpr base::FeatureParam<base::TimeDelta> kLoadingTabAnimationFrameDelay = {
|
||||
&kChangeFrameRateOfLoadingTabAnimation, "loading_tab_animation_frame_delay",
|
||||
base::Milliseconds(30)};
|
||||
|
||||
|
@ -408,10 +408,10 @@ index 8c08f4c3f10fa..721a7b1d5f136 100644
|
|||
-// locate this object using just the handle.
|
||||
-const char* const kBrowserViewKey = "__BROWSER_VIEW__";
|
||||
-
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
// UMA histograms that record animation smoothness for tab loading animation.
|
||||
constexpr char kTabLoadingSmoothnessHistogramName[] =
|
||||
@@ -769,6 +765,14 @@ class BrowserViewLayoutDelegateImpl : public BrowserViewLayoutDelegate {
|
||||
@@ -764,6 +760,14 @@ class BrowserViewLayoutDelegateImpl : public BrowserViewLayoutDelegate {
|
||||
return browser_view_->frame()->GetTopInset() - browser_view_->y();
|
||||
}
|
||||
|
||||
|
@ -426,7 +426,7 @@ index 8c08f4c3f10fa..721a7b1d5f136 100644
|
|||
bool IsToolbarVisible() const override {
|
||||
return browser_view_->IsToolbarVisible();
|
||||
}
|
||||
@@ -920,11 +924,21 @@ class BrowserView::AccessibilityModeObserver : public ui::AXModeObserver {
|
||||
@@ -915,11 +919,21 @@ class BrowserView::AccessibilityModeObserver : public ui::AXModeObserver {
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// BrowserView, public:
|
||||
|
||||
|
@ -449,7 +449,7 @@ index 8c08f4c3f10fa..721a7b1d5f136 100644
|
|||
SetShowIcon(
|
||||
::ShouldShowWindowIcon(browser_.get(), AppUsesWindowControlsOverlay()));
|
||||
|
||||
@@ -1014,8 +1028,15 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
|
||||
@@ -1009,8 +1023,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 8c08f4c3f10fa..721a7b1d5f136 100644
|
|||
|
||||
contents_separator_ =
|
||||
top_container_->AddChildView(std::make_unique<ContentsSeparator>());
|
||||
@@ -1095,7 +1116,9 @@ void BrowserView::ToggleCompactModeUI() {
|
||||
@@ -1094,7 +1115,9 @@ void BrowserView::ToggleCompactModeUI() {
|
||||
}
|
||||
|
||||
BrowserView::~BrowserView() {
|
||||
|
@ -477,7 +477,7 @@ index 8c08f4c3f10fa..721a7b1d5f136 100644
|
|||
|
||||
// Destroy the top controls slide controller first as it depends on the
|
||||
// tabstrip model and the browser frame.
|
||||
@@ -1103,7 +1126,9 @@ BrowserView::~BrowserView() {
|
||||
@@ -1102,7 +1125,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 8c08f4c3f10fa..721a7b1d5f136 100644
|
|||
|
||||
// Stop the animation timer explicitly here to avoid running it in a nested
|
||||
// message loop, which may run by Browser destructor.
|
||||
@@ -1112,17 +1137,18 @@ BrowserView::~BrowserView() {
|
||||
@@ -1111,17 +1136,18 @@ BrowserView::~BrowserView() {
|
||||
// Immersive mode may need to reparent views before they are removed/deleted.
|
||||
immersive_mode_controller_.reset();
|
||||
|
||||
|
@ -510,7 +510,7 @@ index 8c08f4c3f10fa..721a7b1d5f136 100644
|
|||
|
||||
// These are raw pointers to child views, so they need to be set to null
|
||||
// before `RemoveAllChildViews()` is called to avoid dangling.
|
||||
@@ -1703,6 +1729,16 @@ gfx::Point BrowserView::GetThemeOffsetFromBrowserView() const {
|
||||
@@ -1702,6 +1728,16 @@ gfx::Point BrowserView::GetThemeOffsetFromBrowserView() const {
|
||||
ThemeProperties::kFrameHeightAboveTabs - browser_view_origin.y());
|
||||
}
|
||||
|
||||
|
@ -527,7 +527,7 @@ index 8c08f4c3f10fa..721a7b1d5f136 100644
|
|||
// static:
|
||||
BrowserView::DevToolsDockedPlacement BrowserView::GetDevToolsDockedPlacement(
|
||||
const gfx::Rect& contents_webview_bounds,
|
||||
@@ -2118,9 +2154,14 @@ void BrowserView::OnExclusiveAccessUserInput() {
|
||||
@@ -2113,9 +2149,14 @@ void BrowserView::OnExclusiveAccessUserInput() {
|
||||
|
||||
bool BrowserView::ShouldHideUIForFullscreen() const {
|
||||
// Immersive mode needs UI for the slide-down top panel.
|
||||
|
@ -543,7 +543,7 @@ index 8c08f4c3f10fa..721a7b1d5f136 100644
|
|||
return frame_->GetFrameView()->ShouldHideTopUIForFullscreen();
|
||||
}
|
||||
|
||||
@@ -3308,7 +3349,8 @@ views::View* BrowserView::GetTopContainer() {
|
||||
@@ -3297,7 +3338,8 @@ views::View* BrowserView::GetTopContainer() {
|
||||
}
|
||||
|
||||
DownloadBubbleUIController* BrowserView::GetDownloadBubbleUIController() {
|
||||
|
@ -553,7 +553,7 @@ index 8c08f4c3f10fa..721a7b1d5f136 100644
|
|||
if (auto* download_button = toolbar_button_provider_->GetDownloadButton())
|
||||
return download_button->bubble_controller();
|
||||
return nullptr;
|
||||
@@ -3890,7 +3932,8 @@ void BrowserView::ReparentTopContainerForEndOfImmersive() {
|
||||
@@ -3865,7 +3907,8 @@ void BrowserView::ReparentTopContainerForEndOfImmersive() {
|
||||
if (top_container()->parent() == this)
|
||||
return;
|
||||
|
||||
|
@ -563,7 +563,7 @@ index 8c08f4c3f10fa..721a7b1d5f136 100644
|
|||
top_container()->DestroyLayer();
|
||||
AddChildViewAt(top_container(), 0);
|
||||
EnsureFocusOrder();
|
||||
@@ -4381,11 +4424,38 @@ void BrowserView::GetAccessiblePanes(std::vector<views::View*>* panes) {
|
||||
@@ -4356,11 +4399,38 @@ void BrowserView::GetAccessiblePanes(std::vector<views::View*>* panes) {
|
||||
bool BrowserView::ShouldDescendIntoChildForEventHandling(
|
||||
gfx::NativeView child,
|
||||
const gfx::Point& location) {
|
||||
|
@ -604,7 +604,7 @@ index 8c08f4c3f10fa..721a7b1d5f136 100644
|
|||
// Draggable regions are defined relative to the web contents.
|
||||
gfx::Point point_in_contents_web_view_coords(location);
|
||||
views::View::ConvertPointToTarget(GetWidget()->GetRootView(),
|
||||
@@ -4394,7 +4464,7 @@ bool BrowserView::ShouldDescendIntoChildForEventHandling(
|
||||
@@ -4369,7 +4439,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 8c08f4c3f10fa..721a7b1d5f136 100644
|
|||
point_in_contents_web_view_coords.x(),
|
||||
point_in_contents_web_view_coords.y()) ||
|
||||
WidgetOwnedByAnchorContainsPoint(point_in_contents_web_view_coords);
|
||||
@@ -4505,8 +4575,10 @@ void BrowserView::Layout(PassKey) {
|
||||
@@ -4480,8 +4550,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 8c08f4c3f10fa..721a7b1d5f136 100644
|
|||
|
||||
// Some of the situations when the BrowserView is laid out are:
|
||||
// - Enter/exit immersive fullscreen mode.
|
||||
@@ -4572,6 +4644,11 @@ void BrowserView::AddedToWidget() {
|
||||
@@ -4547,6 +4619,11 @@ void BrowserView::AddedToWidget() {
|
||||
SetThemeProfileForWindow(GetNativeWindow(), browser_->profile());
|
||||
#endif
|
||||
|
||||
|
@ -638,7 +638,7 @@ index 8c08f4c3f10fa..721a7b1d5f136 100644
|
|||
toolbar_->Init();
|
||||
|
||||
// TODO(pbos): Investigate whether the side panels should be creatable when
|
||||
@@ -4614,13 +4691,9 @@ void BrowserView::AddedToWidget() {
|
||||
@@ -4589,13 +4666,9 @@ void BrowserView::AddedToWidget() {
|
||||
|
||||
EnsureFocusOrder();
|
||||
|
||||
|
@ -654,7 +654,7 @@ index 8c08f4c3f10fa..721a7b1d5f136 100644
|
|||
using_native_frame_ = frame_->ShouldUseNativeFrame();
|
||||
|
||||
MaybeInitializeWebUITabStrip();
|
||||
@@ -5006,7 +5079,8 @@ void BrowserView::ProcessFullscreen(bool fullscreen, const int64_t display_id) {
|
||||
@@ -4964,7 +5037,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 8c08f4c3f10fa..721a7b1d5f136 100644
|
|||
}
|
||||
|
||||
void BrowserView::RequestFullscreen(bool fullscreen, int64_t display_id) {
|
||||
@@ -5512,6 +5586,8 @@ Profile* BrowserView::GetProfile() {
|
||||
@@ -5448,6 +5522,8 @@ Profile* BrowserView::GetProfile() {
|
||||
}
|
||||
|
||||
void BrowserView::UpdateUIForTabFullscreen() {
|
||||
|
@ -673,7 +673,7 @@ index 8c08f4c3f10fa..721a7b1d5f136 100644
|
|||
frame()->GetFrameView()->UpdateFullscreenTopUI();
|
||||
}
|
||||
|
||||
@@ -5534,6 +5610,8 @@ void BrowserView::HideDownloadShelf() {
|
||||
@@ -5470,6 +5546,8 @@ void BrowserView::HideDownloadShelf() {
|
||||
}
|
||||
|
||||
bool BrowserView::CanUserExitFullscreen() const {
|
||||
|
@ -683,10 +683,10 @@ index 8c08f4c3f10fa..721a7b1d5f136 100644
|
|||
}
|
||||
|
||||
diff --git chrome/browser/ui/views/frame/browser_view.h chrome/browser/ui/views/frame/browser_view.h
|
||||
index bdb273f5134b8..2750336aca016 100644
|
||||
index 8addda3741841..5be1d534b9bd8 100644
|
||||
--- chrome/browser/ui/views/frame/browser_view.h
|
||||
+++ chrome/browser/ui/views/frame/browser_view.h
|
||||
@@ -139,11 +139,16 @@ class BrowserView : public BrowserWindow,
|
||||
@@ -137,11 +137,16 @@ class BrowserView : public BrowserWindow,
|
||||
METADATA_HEADER(BrowserView, views::ClientView)
|
||||
|
||||
public:
|
||||
|
@ -703,7 +703,7 @@ index bdb273f5134b8..2750336aca016 100644
|
|||
void set_frame(BrowserFrame* frame) {
|
||||
frame_ = frame;
|
||||
paint_as_active_subscription_ =
|
||||
@@ -841,6 +846,10 @@ class BrowserView : public BrowserWindow,
|
||||
@@ -839,6 +844,10 @@ class BrowserView : public BrowserWindow,
|
||||
void Copy();
|
||||
void Paste();
|
||||
|
||||
|
@ -714,7 +714,7 @@ index bdb273f5134b8..2750336aca016 100644
|
|||
protected:
|
||||
// Enumerates where the devtools are docked relative to the browser's main
|
||||
// web contents.
|
||||
@@ -864,6 +873,8 @@ class BrowserView : public BrowserWindow,
|
||||
@@ -862,6 +871,8 @@ class BrowserView : public BrowserWindow,
|
||||
const gfx::Rect& contents_webview_bounds,
|
||||
const gfx::Rect& local_webview_container_bounds);
|
||||
|
||||
|
@ -724,7 +724,7 @@ index bdb273f5134b8..2750336aca016 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 148c255ec04d3..edce177e093ac 100644
|
||||
index 38064da1c8818..98ecdff6ce089 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 3489ec2810cdf..db6881a0e2923 100644
|
||||
index 961b599ffc364..92faacd1be534 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
|
||||
@@ -618,6 +618,11 @@ PictureInPictureBrowserFrameView::PictureInPictureBrowserFrameView(
|
||||
return window->GetProperty(chromeos::kWindowStateTypeKey);
|
||||
})));
|
||||
@@ -602,6 +602,11 @@ PictureInPictureBrowserFrameView::PictureInPictureBrowserFrameView(
|
||||
frame_background_ = std::make_unique<views::FrameBackground>();
|
||||
}
|
||||
#endif
|
||||
+
|
||||
+ if (!browser_view->browser()->SupportsWindowFeature(
|
||||
|
@ -857,7 +857,7 @@ index 3489ec2810cdf..db6881a0e2923 100644
|
|||
}
|
||||
|
||||
PictureInPictureBrowserFrameView::~PictureInPictureBrowserFrameView() {
|
||||
@@ -745,18 +750,42 @@ gfx::Rect PictureInPictureBrowserFrameView::GetWindowBoundsForClientBounds(
|
||||
@@ -729,18 +734,42 @@ gfx::Rect PictureInPictureBrowserFrameView::GetWindowBoundsForClientBounds(
|
||||
|
||||
int PictureInPictureBrowserFrameView::NonClientHitTest(
|
||||
const gfx::Point& point) {
|
||||
|
@ -908,7 +908,7 @@ index 3489ec2810cdf..db6881a0e2923 100644
|
|||
|
||||
// Allow dragging and resizing the window.
|
||||
int window_component = GetHTComponentForFrame(
|
||||
@@ -825,7 +854,8 @@ void PictureInPictureBrowserFrameView::Layout(PassKey) {
|
||||
@@ -809,7 +838,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 3489ec2810cdf..db6881a0e2923 100644
|
|||
top_bar_container_view_->SetBoundsRect(top_bar);
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
if (auto_pip_setting_overlay_) {
|
||||
@@ -1371,7 +1401,8 @@ gfx::Insets PictureInPictureBrowserFrameView::ResizeBorderInsets() const {
|
||||
@@ -1349,7 +1379,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 40993f5460555..3bf4fb49b71f3 100644
|
||||
index ba726946aa3cd..e62fe9c21290a 100644
|
||||
--- chrome/browser/ui/views/page_action/page_action_icon_controller.cc
|
||||
+++ chrome/browser/ui/views/page_action/page_action_icon_controller.cc
|
||||
@@ -98,6 +98,12 @@ void PageActionIconController::Init(const PageActionIconParams& params,
|
||||
@@ -97,6 +97,12 @@ void PageActionIconController::Init(const PageActionIconParams& params,
|
||||
};
|
||||
|
||||
for (PageActionIconType type : params.types_enabled) {
|
||||
|
@ -960,10 +960,10 @@ index 40993f5460555..3bf4fb49b71f3 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 a80a496c99a26..7cb24bf8505de 100644
|
||||
index 3cfed2fdd5acf..720b418456292 100644
|
||||
--- chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
|
||||
+++ chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
|
||||
@@ -604,29 +604,41 @@ gfx::Range BrowserTabStripController::ListTabsInGroup(
|
||||
@@ -605,29 +605,41 @@ gfx::Range BrowserTabStripController::ListTabsInGroup(
|
||||
}
|
||||
|
||||
bool BrowserTabStripController::IsFrameCondensed() const {
|
||||
|
@ -1006,10 +1006,10 @@ index a80a496c99a26..7cb24bf8505de 100644
|
|||
}
|
||||
|
||||
diff --git chrome/browser/ui/views/toolbar/toolbar_view.cc chrome/browser/ui/views/toolbar/toolbar_view.cc
|
||||
index 1b494d20b6342..c3eb67da3c3ba 100644
|
||||
index b85883d5057b2..71835868d795b 100644
|
||||
--- chrome/browser/ui/views/toolbar/toolbar_view.cc
|
||||
+++ chrome/browser/ui/views/toolbar/toolbar_view.cc
|
||||
@@ -193,7 +193,7 @@ class TabstripLikeBackground : public views::Background {
|
||||
@@ -186,7 +186,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 1b494d20b6342..c3eb67da3c3ba 100644
|
|||
SkColor frame_color =
|
||||
browser_view_->frame()->GetFrameView()->GetFrameColor(
|
||||
BrowserFrameActiveState::kUseCurrent);
|
||||
@@ -224,12 +224,13 @@ END_METADATA
|
||||
@@ -217,12 +217,13 @@ END_METADATA
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// ToolbarView, public:
|
||||
|
||||
|
@ -1034,7 +1034,7 @@ index 1b494d20b6342..c3eb67da3c3ba 100644
|
|||
SetID(VIEW_ID_TOOLBAR);
|
||||
|
||||
container_view_ = AddChildView(std::make_unique<ContainerView>());
|
||||
@@ -258,9 +259,24 @@ ToolbarView::~ToolbarView() {
|
||||
@@ -251,9 +252,24 @@ ToolbarView::~ToolbarView() {
|
||||
|
||||
for (const auto& view_and_command : GetViewCommandMap())
|
||||
chrome::RemoveCommandObserver(browser_, view_and_command.second, this);
|
||||
|
@ -1059,7 +1059,7 @@ index 1b494d20b6342..c3eb67da3c3ba 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
|
||||
@@ -283,12 +299,12 @@ void ToolbarView::Init() {
|
||||
@@ -276,12 +292,12 @@ void ToolbarView::Init() {
|
||||
|
||||
auto location_bar = std::make_unique<LocationBarView>(
|
||||
browser_, browser_->profile(), browser_->command_controller(), this,
|
||||
|
@ -1074,7 +1074,7 @@ index 1b494d20b6342..c3eb67da3c3ba 100644
|
|||
download_button =
|
||||
std::make_unique<DownloadToolbarButtonView>(browser_view_);
|
||||
}
|
||||
@@ -370,7 +386,8 @@ void ToolbarView::Init() {
|
||||
@@ -363,7 +379,8 @@ void ToolbarView::Init() {
|
||||
std::unique_ptr<media_router::CastToolbarButton> cast;
|
||||
if (!(features::IsToolbarPinningEnabled() &&
|
||||
base::FeatureList::IsEnabled(features::kPinnedCastButton))) {
|
||||
|
@ -1084,7 +1084,7 @@ index 1b494d20b6342..c3eb67da3c3ba 100644
|
|||
cast = media_router::CastToolbarButton::Create(browser_);
|
||||
}
|
||||
}
|
||||
@@ -383,7 +400,8 @@ void ToolbarView::Init() {
|
||||
@@ -376,7 +393,8 @@ void ToolbarView::Init() {
|
||||
|
||||
std::unique_ptr<send_tab_to_self::SendTabToSelfToolbarIconView>
|
||||
send_tab_to_self_button;
|
||||
|
@ -1094,7 +1094,7 @@ index 1b494d20b6342..c3eb67da3c3ba 100644
|
|||
send_tab_to_self_button =
|
||||
std::make_unique<send_tab_to_self::SendTabToSelfToolbarIconView>(
|
||||
browser_view_);
|
||||
@@ -845,7 +863,8 @@ void ToolbarView::Layout(PassKey) {
|
||||
@@ -836,7 +854,8 @@ void ToolbarView::Layout(PassKey) {
|
||||
|
||||
if (display_mode_ == DisplayMode::NORMAL) {
|
||||
LayoutCommon();
|
||||
|
@ -1105,10 +1105,10 @@ index 1b494d20b6342..c3eb67da3c3ba 100644
|
|||
|
||||
if (toolbar_controller_) {
|
||||
diff --git chrome/browser/ui/views/toolbar/toolbar_view.h chrome/browser/ui/views/toolbar/toolbar_view.h
|
||||
index b02224437ad20..81f639f5faf9f 100644
|
||||
index 01dfd343c678a..2cfa5dd830fba 100644
|
||||
--- chrome/browser/ui/views/toolbar/toolbar_view.h
|
||||
+++ chrome/browser/ui/views/toolbar/toolbar_view.h
|
||||
@@ -94,7 +94,8 @@ class ToolbarView : public views::AccessiblePaneView,
|
||||
@@ -93,7 +93,8 @@ class ToolbarView : public views::AccessiblePaneView,
|
||||
// needs to be displayed.
|
||||
};
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
diff --git chrome/browser/ui/views/sad_tab_view.cc chrome/browser/ui/views/sad_tab_view.cc
|
||||
index 28a1b08d6c699..22a43d559bec9 100644
|
||||
index 4c0f4df68c943..45867d8e99adb 100644
|
||||
--- chrome/browser/ui/views/sad_tab_view.cc
|
||||
+++ chrome/browser/ui/views/sad_tab_view.cc
|
||||
@@ -687,6 +687,11 @@ void SadTabView::OnBoundsChanged(const gfx::Rect& previous_bounds) {
|
||||
@@ -699,6 +699,11 @@ void SadTabView::OnBoundsChanged(const gfx::Rect& previous_bounds) {
|
||||
title_->SizeToFit(max_width);
|
||||
}
|
||||
|
||||
|
|
|
@ -54,21 +54,8 @@ 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 6ff75a6bb03e7..938113ef46a0d 100644
|
||||
index 624070f85e40b..2f0a5e6501f4d 100644
|
||||
--- third_party/blink/renderer/controller/BUILD.gn
|
||||
+++ third_party/blink/renderer/controller/BUILD.gn
|
||||
@@ -38,6 +38,7 @@ component("controller") {
|
||||
|
@ -89,7 +76,7 @@ index 6ff75a6bb03e7..938113ef46a0d 100644
|
|||
|
||||
if (is_linux || is_chromeos) {
|
||||
diff --git ui/events/keycodes/BUILD.gn ui/events/keycodes/BUILD.gn
|
||||
index 9cdd599f0d739..23d1ff5cc30fc 100644
|
||||
index 4f4fbfb769cf8..a794da2d8343b 100644
|
||||
--- ui/events/keycodes/BUILD.gn
|
||||
+++ ui/events/keycodes/BUILD.gn
|
||||
@@ -19,6 +19,8 @@ source_set("xkb") {
|
||||
|
@ -100,7 +87,7 @@ index 9cdd599f0d739..23d1ff5cc30fc 100644
|
|||
+
|
||||
deps = [
|
||||
"//base",
|
||||
"//build:chromeos_buildflags",
|
||||
"//ui/events:dom_keycode_converter",
|
||||
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
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git content/browser/devtools/devtools_http_handler.cc content/browser/devtools/devtools_http_handler.cc
|
||||
index 11c9cd82d0392..9c700bc625cd5 100644
|
||||
index ab719bac2aa24..b2b3b240bcd6c 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 11c9cd82d0392..9c700bc625cd5 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 ebfa887660e23..6a8958000fb64 100644
|
||||
index f9fd6c73e21d5..1cf4e38bebde7 100644
|
||||
--- content/browser/loader/navigation_url_loader_impl.cc
|
||||
+++ content/browser/loader/navigation_url_loader_impl.cc
|
||||
@@ -863,7 +863,7 @@ NavigationURLLoaderImpl::CreateNonNetworkLoaderFactory(
|
||||
@@ -862,7 +862,7 @@ NavigationURLLoaderImpl::CreateNonNetworkLoaderFactory(
|
||||
mojo::PendingRemote<network::mojom::URLLoaderFactory>
|
||||
terminal_external_protocol;
|
||||
bool handled = GetContentClient()->browser()->HandleExternalProtocol(
|
||||
|
@ -24,7 +24,7 @@ index ebfa887660e23..6a8958000fb64 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,
|
||||
@@ -875,6 +875,21 @@ NavigationURLLoaderImpl::CreateNonNetworkLoaderFactory(
|
||||
@@ -874,6 +874,21 @@ NavigationURLLoaderImpl::CreateNonNetworkLoaderFactory(
|
||||
*request_info.initiator_document_token)
|
||||
: nullptr,
|
||||
request_info.isolation_info, &terminal_external_protocol);
|
||||
|
@ -47,10 +47,10 @@ index ebfa887660e23..6a8958000fb64 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 21967547790ca..7bdf48b830a21 100644
|
||||
index a1b6aad3587e7..1ad9c4b2e50ad 100644
|
||||
--- content/public/browser/content_browser_client.cc
|
||||
+++ content/public/browser/content_browser_client.cc
|
||||
@@ -1138,7 +1138,7 @@ ContentBrowserClient::CreateURLLoaderHandlerForServiceWorkerNavigationPreload(
|
||||
@@ -1150,7 +1150,7 @@ ContentBrowserClient::CreateURLLoaderHandlerForServiceWorkerNavigationPreload(
|
||||
void ContentBrowserClient::OnNetworkServiceCreated(
|
||||
network::mojom::NetworkService* network_service) {}
|
||||
|
||||
|
@ -59,7 +59,7 @@ index 21967547790ca..7bdf48b830a21 100644
|
|||
BrowserContext* context,
|
||||
bool in_memory,
|
||||
const base::FilePath& relative_partition_path,
|
||||
@@ -1147,6 +1147,7 @@ void ContentBrowserClient::ConfigureNetworkContextParams(
|
||||
@@ -1159,6 +1159,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 21967547790ca..7bdf48b830a21 100644
|
|||
|
||||
std::vector<base::FilePath>
|
||||
diff --git content/public/browser/content_browser_client.h content/public/browser/content_browser_client.h
|
||||
index 0f6781dc459e1..3f3095cce2ba6 100644
|
||||
index 4d96255c40a8e..476bb6d52a68e 100644
|
||||
--- content/public/browser/content_browser_client.h
|
||||
+++ content/public/browser/content_browser_client.h
|
||||
@@ -1329,6 +1329,12 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
@@ -1352,6 +1352,12 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
bool opener_suppressed,
|
||||
bool* no_javascript_access);
|
||||
|
||||
|
@ -84,7 +84,7 @@ index 0f6781dc459e1..3f3095cce2ba6 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*
|
||||
@@ -2188,7 +2194,7 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
@@ -2203,7 +2209,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 0f6781dc459e1..3f3095cce2ba6 100644
|
|||
BrowserContext* context,
|
||||
bool in_memory,
|
||||
const base::FilePath& relative_partition_path,
|
||||
@@ -2412,6 +2418,22 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
@@ -2427,6 +2433,22 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
const net::IsolationInfo& isolation_info,
|
||||
mojo::PendingRemote<network::mojom::URLLoaderFactory>* out_factory);
|
||||
|
||||
|
@ -116,7 +116,7 @@ index 0f6781dc459e1..3f3095cce2ba6 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.
|
||||
@@ -2472,6 +2494,10 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
@@ -2487,6 +2509,10 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
// Used as part of the user agent string.
|
||||
virtual std::string GetProduct();
|
||||
|
||||
|
@ -128,7 +128,7 @@ index 0f6781dc459e1..3f3095cce2ba6 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 784e0a5166d6b..1fd1e9ee107f3 100644
|
||||
index 42c94f71f09cf..853c508260f08 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 784e0a5166d6b..1fd1e9ee107f3 100644
|
|||
// Notifies that a new RenderFrame has been created.
|
||||
virtual void RenderFrameCreated(RenderFrame* render_frame) {}
|
||||
|
||||
@@ -355,6 +358,10 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
@@ -358,6 +361,10 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
// This method may invalidate the frame.
|
||||
virtual void RunScriptsAtDocumentIdle(RenderFrame* render_frame) {}
|
||||
|
||||
|
@ -153,10 +153,10 @@ index 784e0a5166d6b..1fd1e9ee107f3 100644
|
|||
// started.
|
||||
virtual void SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() {}
|
||||
diff --git content/renderer/render_thread_impl.cc content/renderer/render_thread_impl.cc
|
||||
index 15e28effa2cbf..eb25a1adb7f6c 100644
|
||||
index c848b7f8f7650..34fbb26f068e5 100644
|
||||
--- content/renderer/render_thread_impl.cc
|
||||
+++ content/renderer/render_thread_impl.cc
|
||||
@@ -568,6 +568,8 @@ void RenderThreadImpl::Init() {
|
||||
@@ -594,6 +594,8 @@ void RenderThreadImpl::Init() {
|
||||
GetContentClient()->renderer()->CreateURLLoaderThrottleProvider(
|
||||
blink::URLLoaderThrottleProviderType::kFrame);
|
||||
|
||||
|
@ -166,10 +166,10 @@ index 15e28effa2cbf..eb25a1adb7f6c 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 da2515e0067a9..e792751f278b4 100644
|
||||
index 4547a080e0675..78f4530d1406a 100644
|
||||
--- content/renderer/renderer_blink_platform_impl.cc
|
||||
+++ content/renderer/renderer_blink_platform_impl.cc
|
||||
@@ -1037,6 +1037,15 @@ SkBitmap* RendererBlinkPlatformImpl::GetSadPageBitmap() {
|
||||
@@ -1031,6 +1031,15 @@ SkBitmap* RendererBlinkPlatformImpl::GetSadPageBitmap() {
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
@ -186,10 +186,10 @@ index da2515e0067a9..e792751f278b4 100644
|
|||
RendererBlinkPlatformImpl::CreateWebV8ValueConverter() {
|
||||
return std::make_unique<V8ValueConverterImpl>();
|
||||
diff --git content/renderer/renderer_blink_platform_impl.h content/renderer/renderer_blink_platform_impl.h
|
||||
index 69c52cb8333fc..ac2bbc7459864 100644
|
||||
index 17c01a1f03ad4..33a484f412bba 100644
|
||||
--- content/renderer/renderer_blink_platform_impl.h
|
||||
+++ content/renderer/renderer_blink_platform_impl.h
|
||||
@@ -245,6 +245,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
|
||||
@@ -244,6 +244,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
|
||||
InertAndMinimumIntervalOfUserLevelMemoryPressureSignal() override;
|
||||
#endif // BUILDFLAG(IS_ANDROID)
|
||||
|
||||
|
@ -200,10 +200,10 @@ index 69c52cb8333fc..ac2bbc7459864 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 6c08727a74408..2efb3de40164d 100644
|
||||
index 1390ea66ffe18..183a59f7566d7 100644
|
||||
--- content/shell/browser/shell_content_browser_client.cc
|
||||
+++ content/shell/browser/shell_content_browser_client.cc
|
||||
@@ -757,7 +757,7 @@ void ShellContentBrowserClient::OnNetworkServiceCreated(
|
||||
@@ -765,7 +765,7 @@ void ShellContentBrowserClient::OnNetworkServiceCreated(
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -212,7 +212,7 @@ index 6c08727a74408..2efb3de40164d 100644
|
|||
BrowserContext* context,
|
||||
bool in_memory,
|
||||
const base::FilePath& relative_partition_path,
|
||||
@@ -766,6 +766,7 @@ void ShellContentBrowserClient::ConfigureNetworkContextParams(
|
||||
@@ -774,6 +774,7 @@ void ShellContentBrowserClient::ConfigureNetworkContextParams(
|
||||
cert_verifier_creation_params) {
|
||||
ConfigureNetworkContextParamsForShell(context, network_context_params,
|
||||
cert_verifier_creation_params);
|
||||
|
@ -221,10 +221,10 @@ index 6c08727a74408..2efb3de40164d 100644
|
|||
|
||||
std::vector<base::FilePath>
|
||||
diff --git content/shell/browser/shell_content_browser_client.h content/shell/browser/shell_content_browser_client.h
|
||||
index a2514c8a9f8a8..3266b8a0bd781 100644
|
||||
index c6683ea8084fc..6c203dbb21777 100644
|
||||
--- content/shell/browser/shell_content_browser_client.h
|
||||
+++ content/shell/browser/shell_content_browser_client.h
|
||||
@@ -150,7 +150,7 @@ class ShellContentBrowserClient : public ContentBrowserClient {
|
||||
@@ -154,7 +154,7 @@ class ShellContentBrowserClient : public ContentBrowserClient {
|
||||
GetGeolocationSystemPermissionManager() override;
|
||||
void OnNetworkServiceCreated(
|
||||
network::mojom::NetworkService* network_service) override;
|
||||
|
@ -234,10 +234,10 @@ index a2514c8a9f8a8..3266b8a0bd781 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 d871e4d79774d..1faf20d69df19 100644
|
||||
index 0473210d9c3e6..631300399a748 100644
|
||||
--- headless/lib/browser/headless_content_browser_client.cc
|
||||
+++ headless/lib/browser/headless_content_browser_client.cc
|
||||
@@ -362,7 +362,7 @@ bool HeadlessContentBrowserClient::IsSharedStorageSelectURLAllowed(
|
||||
@@ -390,7 +390,7 @@ bool HeadlessContentBrowserClient::IsCookieDeprecationLabelAllowedForContext(
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -246,7 +246,7 @@ index d871e4d79774d..1faf20d69df19 100644
|
|||
content::BrowserContext* context,
|
||||
bool in_memory,
|
||||
const base::FilePath& relative_partition_path,
|
||||
@@ -372,6 +372,7 @@ void HeadlessContentBrowserClient::ConfigureNetworkContextParams(
|
||||
@@ -400,6 +400,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 d871e4d79774d..1faf20d69df19 100644
|
|||
|
||||
std::string HeadlessContentBrowserClient::GetProduct() {
|
||||
diff --git headless/lib/browser/headless_content_browser_client.h headless/lib/browser/headless_content_browser_client.h
|
||||
index 8313eb0e4d6a9..7189e626cf5ed 100644
|
||||
index b3d871de1d6f4..e47394d1e9809 100644
|
||||
--- headless/lib/browser/headless_content_browser_client.h
|
||||
+++ headless/lib/browser/headless_content_browser_client.h
|
||||
@@ -101,7 +101,7 @@ class HeadlessContentBrowserClient : public content::ContentBrowserClient {
|
||||
std::string* out_debug_message,
|
||||
bool* out_block_is_site_setting_specific) override;
|
||||
|
||||
@@ -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;
|
||||
- void ConfigureNetworkContextParams(
|
||||
+ bool ConfigureNetworkContextParams(
|
||||
content::BrowserContext* context,
|
||||
|
|
|
@ -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 e1ca048945905..db386eca4d8d3 100644
|
||||
index 5695fd36ce0e0..b109cefdeef6f 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(
|
||||
|
|
|
@ -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 8fdd8d02e6496..436fbbdc4e4eb 100644
|
||||
index 93957c7a15594..8e3e18a9c8992 100644
|
||||
--- content/app/content_main_runner_impl.cc
|
||||
+++ content/app/content_main_runner_impl.cc
|
||||
@@ -52,6 +52,7 @@
|
||||
|
@ -123,7 +123,7 @@ index 8fdd8d02e6496..436fbbdc4e4eb 100644
|
|||
#include "base/time/time.h"
|
||||
#include "base/trace_event/trace_event.h"
|
||||
#include "build/build_config.h"
|
||||
@@ -1351,6 +1352,11 @@ void ContentMainRunnerImpl::Shutdown() {
|
||||
@@ -1349,6 +1350,11 @@ void ContentMainRunnerImpl::Shutdown() {
|
||||
is_shutdown_ = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git chrome/chrome_elf/BUILD.gn chrome/chrome_elf/BUILD.gn
|
||||
index 37e2d2a50aa2c..bb6ac82cd9cb7 100644
|
||||
index a6072f97ed578..25a64c29e9c34 100644
|
||||
--- chrome/chrome_elf/BUILD.gn
|
||||
+++ chrome/chrome_elf/BUILD.gn
|
||||
@@ -7,6 +7,7 @@
|
||||
|
@ -10,7 +10,7 @@ index 37e2d2a50aa2c..bb6ac82cd9cb7 100644
|
|||
import("//chrome/process_version_rc_template.gni")
|
||||
import("//testing/test.gni")
|
||||
|
||||
@@ -106,9 +107,6 @@ source_set("constants") {
|
||||
@@ -100,9 +101,6 @@ source_set("constants") {
|
||||
|
||||
static_library("crash") {
|
||||
sources = [
|
||||
|
@ -20,7 +20,7 @@ index 37e2d2a50aa2c..bb6ac82cd9cb7 100644
|
|||
"crash/crash_helper.cc",
|
||||
"crash/crash_helper.h",
|
||||
]
|
||||
@@ -117,6 +115,7 @@ static_library("crash") {
|
||||
@@ -111,6 +109,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 37e2d2a50aa2c..bb6ac82cd9cb7 100644
|
|||
"//chrome/install_static:install_static_util",
|
||||
"//components/crash/core/app",
|
||||
"//components/crash/core/common", # crash_keys
|
||||
@@ -124,6 +123,17 @@ static_library("crash") {
|
||||
@@ -118,6 +117,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 4abce141b758e..c2624423ed44e 100644
|
||||
index c4535e6ad8dd8..119d5c159b894 100644
|
||||
--- components/crash/core/app/crash_reporter_client.cc
|
||||
+++ components/crash/core/app/crash_reporter_client.cc
|
||||
@@ -93,7 +93,7 @@ bool CrashReporterClient::GetShouldDumpLargerDumps() {
|
||||
@@ -70,7 +70,7 @@ bool CrashReporterClient::GetShouldDumpLargerDumps() {
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -159,7 +159,7 @@ index 4abce141b758e..c2624423ed44e 100644
|
|||
void CrashReporterClient::GetProductNameAndVersion(const char** product_name,
|
||||
const char** version) {
|
||||
}
|
||||
@@ -102,6 +102,7 @@ void CrashReporterClient::GetProductNameAndVersion(std::string* product_name,
|
||||
@@ -79,6 +79,7 @@ void CrashReporterClient::GetProductNameAndVersion(std::string* product_name,
|
||||
std::string* version,
|
||||
std::string* channel) {}
|
||||
|
||||
|
@ -167,7 +167,7 @@ index 4abce141b758e..c2624423ed44e 100644
|
|||
base::FilePath CrashReporterClient::GetReporterLogFilename() {
|
||||
return base::FilePath();
|
||||
}
|
||||
@@ -111,6 +112,7 @@ bool CrashReporterClient::HandleCrashDump(const char* crashdump_filename,
|
||||
@@ -88,6 +89,7 @@ bool CrashReporterClient::HandleCrashDump(const char* crashdump_filename,
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
@ -175,7 +175,7 @@ index 4abce141b758e..c2624423ed44e 100644
|
|||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
bool CrashReporterClient::GetCrashDumpLocation(std::wstring* crash_dir) {
|
||||
@@ -145,6 +147,28 @@ bool CrashReporterClient::ReportingIsEnforcedByPolicy(bool* breakpad_enabled) {
|
||||
@@ -122,6 +124,28 @@ bool CrashReporterClient::ReportingIsEnforcedByPolicy(bool* breakpad_enabled) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -204,7 +204,7 @@ index 4abce141b758e..c2624423ed44e 100644
|
|||
#if BUILDFLAG(IS_ANDROID)
|
||||
unsigned int CrashReporterClient::GetCrashDumpPercentage() {
|
||||
return 100;
|
||||
@@ -205,9 +229,4 @@ bool CrashReporterClient::ShouldMonitorCrashHandlerExpensively() {
|
||||
@@ -160,9 +184,4 @@ bool CrashReporterClient::ShouldMonitorCrashHandlerExpensively() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -215,7 +215,7 @@ index 4abce141b758e..c2624423ed44e 100644
|
|||
-
|
||||
} // namespace crash_reporter
|
||||
diff --git components/crash/core/app/crash_reporter_client.h components/crash/core/app/crash_reporter_client.h
|
||||
index a604df7a5ea6a..618fbde10a65c 100644
|
||||
index 4029756b90d1a..711546896101b 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 a604df7a5ea6a..618fbde10a65c 100644
|
|||
|
||||
#include "build/build_config.h"
|
||||
|
||||
@@ -96,7 +98,7 @@ class CrashReporterClient {
|
||||
@@ -72,7 +74,7 @@ class CrashReporterClient {
|
||||
virtual bool GetShouldDumpLargerDumps();
|
||||
#endif
|
||||
|
||||
|
@ -237,7 +237,7 @@ index a604df7a5ea6a..618fbde10a65c 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
|
||||
@@ -107,6 +109,7 @@ class CrashReporterClient {
|
||||
@@ -83,6 +85,7 @@ class CrashReporterClient {
|
||||
std::string* version,
|
||||
std::string* channel);
|
||||
|
||||
|
@ -245,7 +245,7 @@ index a604df7a5ea6a..618fbde10a65c 100644
|
|||
virtual base::FilePath GetReporterLogFilename();
|
||||
|
||||
// Custom crash minidump handler after the minidump is generated.
|
||||
@@ -116,6 +119,7 @@ class CrashReporterClient {
|
||||
@@ -92,6 +95,7 @@ class CrashReporterClient {
|
||||
// libc nor allocate memory normally.
|
||||
virtual bool HandleCrashDump(const char* crashdump_filename,
|
||||
uint64_t crash_pid);
|
||||
|
@ -253,7 +253,7 @@ index a604df7a5ea6a..618fbde10a65c 100644
|
|||
#endif
|
||||
|
||||
// The location where minidump files should be written. Returns true if
|
||||
@@ -213,6 +217,20 @@ class CrashReporterClient {
|
||||
@@ -178,6 +182,20 @@ class CrashReporterClient {
|
||||
|
||||
// Returns true if breakpad should run in the given process type.
|
||||
virtual bool EnableBreakpadForProcess(const std::string& process_type);
|
||||
|
|
|
@ -40,19 +40,19 @@ index b362e0aadbadd..1588232a6e4d4 100644
|
|||
virtual ~PruneCondition() {}
|
||||
|
||||
diff --git third_party/crashpad/crashpad/client/settings.cc third_party/crashpad/crashpad/client/settings.cc
|
||||
index 0174c62b52856..c87205500aef0 100644
|
||||
index 76d77c86072d5..9cb6be87eb46f 100644
|
||||
--- third_party/crashpad/crashpad/client/settings.cc
|
||||
+++ third_party/crashpad/crashpad/client/settings.cc
|
||||
@@ -117,7 +117,7 @@ void ScopedLockedFileHandleTraits::Free(FileHandle handle) {
|
||||
|
||||
struct Settings::Data {
|
||||
static constexpr uint32_t kSettingsMagic = 'CPds';
|
||||
@@ -122,7 +122,7 @@ struct Settings::Data {
|
||||
// Version number only used for incompatible changes to Data. Do not change
|
||||
// this when adding additional fields at the end. Modifying `kSettingsVersion`
|
||||
// will wipe away the entire struct when reading from other versions.
|
||||
- static constexpr uint32_t kSettingsVersion = 1;
|
||||
+ static constexpr uint32_t kSettingsVersion = 2;
|
||||
|
||||
enum Options : uint32_t {
|
||||
kUploadsEnabled = 1 << 0,
|
||||
@@ -128,6 +128,9 @@ struct Settings::Data {
|
||||
@@ -133,6 +133,9 @@ struct Settings::Data {
|
||||
options(0),
|
||||
padding_0(0),
|
||||
last_upload_attempt_time(0),
|
||||
|
@ -62,7 +62,7 @@ index 0174c62b52856..c87205500aef0 100644
|
|||
client_id() {}
|
||||
|
||||
uint32_t magic;
|
||||
@@ -135,6 +138,9 @@ struct Settings::Data {
|
||||
@@ -140,6 +143,9 @@ struct Settings::Data {
|
||||
uint32_t options;
|
||||
uint32_t padding_0;
|
||||
int64_t last_upload_attempt_time; // time_t
|
||||
|
@ -72,7 +72,7 @@ index 0174c62b52856..c87205500aef0 100644
|
|||
UUID client_id;
|
||||
};
|
||||
|
||||
@@ -234,6 +240,56 @@ bool Settings::IsLockExpired(const base::FilePath& file_path,
|
||||
@@ -239,6 +245,56 @@ bool Settings::IsLockExpired(const base::FilePath& file_path,
|
||||
}
|
||||
#endif // !CRASHPAD_FLOCK_ALWAYS_SUPPORTED
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
diff --git components/embedder_support/user_agent_utils.cc components/embedder_support/user_agent_utils.cc
|
||||
index 0d9ed98759c4b..48ed045b691a1 100644
|
||||
index d46582b54b943..46331e763cf72 100644
|
||||
--- components/embedder_support/user_agent_utils.cc
|
||||
+++ components/embedder_support/user_agent_utils.cc
|
||||
@@ -18,6 +18,7 @@
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "base/version.h"
|
||||
#include "build/branding_buildflags.h"
|
||||
#include "build/build_config.h"
|
||||
|
@ -10,7 +10,7 @@ index 0d9ed98759c4b..48ed045b691a1 100644
|
|||
#include "components/embedder_support/pref_names.h"
|
||||
#include "components/embedder_support/switches.h"
|
||||
#include "components/policy/core/common/policy_pref_names.h"
|
||||
@@ -38,6 +39,10 @@
|
||||
@@ -41,6 +42,10 @@
|
||||
#include "base/win/windows_version.h"
|
||||
#endif // BUILDFLAG(IS_WIN)
|
||||
|
||||
|
@ -21,7 +21,7 @@ index 0d9ed98759c4b..48ed045b691a1 100644
|
|||
namespace embedder_support {
|
||||
|
||||
namespace {
|
||||
@@ -253,6 +258,14 @@ std::vector<std::string> GetFormFactorsClientHint(
|
||||
@@ -332,6 +337,14 @@ blink::UserAgentBrandList ShuffleBrandList(
|
||||
|
||||
std::string GetProductAndVersion(
|
||||
UserAgentReductionEnterprisePolicyState user_agent_reduction) {
|
||||
|
|
|
@ -12,7 +12,7 @@ index 44a11ec90ec9b..4c35b35a97f28 100644
|
|||
# https://crbug.com/474506.
|
||||
"//clank/java/BUILD.gn",
|
||||
diff --git BUILD.gn BUILD.gn
|
||||
index 3d8fa4d09b729..381172ec653f4 100644
|
||||
index d91ef0419d702..f9b612ba8ac7a 100644
|
||||
--- BUILD.gn
|
||||
+++ BUILD.gn
|
||||
@@ -20,6 +20,7 @@ import("//build/config/sanitizers/sanitizers.gni")
|
||||
|
@ -23,7 +23,7 @@ index 3d8fa4d09b729..381172ec653f4 100644
|
|||
import("//chrome/enterprise_companion/buildflags.gni")
|
||||
import("//components/enterprise/buildflags/buildflags.gni")
|
||||
import("//components/nacl/features.gni")
|
||||
@@ -286,6 +287,10 @@ group("gn_all") {
|
||||
@@ -288,6 +289,10 @@ group("gn_all") {
|
||||
|
||||
deps += root_extra_deps
|
||||
|
||||
|
@ -35,7 +35,7 @@ index 3d8fa4d09b729..381172ec653f4 100644
|
|||
deps += [ "//printing:printing_unittests" ]
|
||||
}
|
||||
diff --git build/config/win/visual_studio_version.gni build/config/win/visual_studio_version.gni
|
||||
index 1da479dd5eebc..ff9c7e467997c 100644
|
||||
index bd41166938952..fba7843d79796 100644
|
||||
--- build/config/win/visual_studio_version.gni
|
||||
+++ build/config/win/visual_studio_version.gni
|
||||
@@ -5,15 +5,14 @@
|
||||
|
@ -57,7 +57,7 @@ index 1da479dd5eebc..ff9c7e467997c 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,14 +30,13 @@ if (visual_studio_path == "") {
|
||||
@@ -31,16 +30,15 @@ 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,8 +75,10 @@ index 1da479dd5eebc..ff9c7e467997c 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 4f99bf3e0ee60..d4b3f46070697 100644
|
||||
index ca413e1286916..70379761ebd59 100644
|
||||
--- chrome/chrome_paks.gni
|
||||
+++ chrome/chrome_paks.gni
|
||||
@@ -6,6 +6,7 @@ import("//ash/ambient/resources/resources.gni")
|
||||
|
@ -87,7 +89,7 @@ index 4f99bf3e0ee60..d4b3f46070697 100644
|
|||
import("//chrome/browser/buildflags.gni")
|
||||
import("//chrome/common/features.gni")
|
||||
import("//components/compose/features.gni")
|
||||
@@ -473,6 +474,10 @@ template("chrome_extra_paks") {
|
||||
@@ -479,6 +480,10 @@ template("chrome_extra_paks") {
|
||||
]
|
||||
deps += [ "//extensions:extensions_resources" ]
|
||||
}
|
||||
|
|
|
@ -1,8 +1,14 @@
|
|||
diff --git tools/gritsettings/resource_ids.spec tools/gritsettings/resource_ids.spec
|
||||
index 38cf9d8fd803f..f7fe30053dfca 100644
|
||||
index a5b89cfbae164..1c3532b2a8196 100644
|
||||
--- tools/gritsettings/resource_ids.spec
|
||||
+++ tools/gritsettings/resource_ids.spec
|
||||
@@ -1376,6 +1376,15 @@
|
||||
@@ -1385,11 +1385,20 @@
|
||||
"<(SHARED_INTERMEDIATE_DIR)/third_party/blink/public/strings/permission_element_generated_strings.grd": {
|
||||
"META": {"sizes": {"messages": [2000],}},
|
||||
"messages": [10080],
|
||||
- }
|
||||
+ },
|
||||
|
||||
# END "everything else" section.
|
||||
# Everything but chrome/, components/, content/, and ios/
|
||||
|
||||
|
@ -13,7 +19,7 @@ index 38cf9d8fd803f..f7fe30053dfca 100644
|
|||
+ "cef/libcef/resources/cef_strings.grd": {
|
||||
+ "META": {"align": 32000},
|
||||
+ "messages": [32000],
|
||||
+ },
|
||||
+ }
|
||||
+
|
||||
# Thinking about appending to the end?
|
||||
# Please read the header and find the right section above instead.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git third_party/libxml/BUILD.gn third_party/libxml/BUILD.gn
|
||||
index 1621a215784c9..5a13a75cea0dd 100644
|
||||
index 73c974cc34aba..2249501a1e0ad 100644
|
||||
--- third_party/libxml/BUILD.gn
|
||||
+++ third_party/libxml/BUILD.gn
|
||||
@@ -140,6 +140,7 @@ static_library("libxml") {
|
||||
|
|
|
@ -48,7 +48,7 @@ index a4fc1857349e4..65f620ac8e289 100644
|
|||
}
|
||||
|
||||
diff --git ui/gtk/native_theme_gtk.cc ui/gtk/native_theme_gtk.cc
|
||||
index d059f86ddad39..592b4d7903f15 100644
|
||||
index 184939bdb8b3d..bb13d7c74e20b 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 d059f86ddad39..592b4d7903f15 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 09aeff0a2303a..d5bb4283e3464 100644
|
||||
index 728069cfdba9a..3561f49631e5c 100644
|
||||
--- ui/native_theme/native_theme.cc
|
||||
+++ ui/native_theme/native_theme.cc
|
||||
@@ -143,6 +143,7 @@ void NativeTheme::NotifyOnNativeThemeUpdated() {
|
||||
@@ -146,6 +146,7 @@ void NativeTheme::NotifyOnNativeThemeUpdated() {
|
||||
color_provider_manager.ResetColorProviderCache();
|
||||
native_theme_observers_.Notify(&NativeThemeObserver::OnNativeThemeUpdated,
|
||||
this);
|
||||
|
@ -78,7 +78,7 @@ index 09aeff0a2303a..d5bb4283e3464 100644
|
|||
|
||||
RecordNumColorProvidersInitializedDuringOnNativeThemeUpdated(
|
||||
color_provider_manager.num_providers_initialized() -
|
||||
@@ -275,6 +276,13 @@ bool NativeTheme::IsForcedDarkMode() {
|
||||
@@ -288,6 +289,13 @@ bool NativeTheme::IsForcedDarkMode() {
|
||||
return kIsForcedDarkMode;
|
||||
}
|
||||
|
||||
|
@ -93,12 +93,12 @@ index 09aeff0a2303a..d5bb4283e3464 100644
|
|||
static bool kIsForcedHighContrast =
|
||||
base::CommandLine::ForCurrentProcess()->HasSwitch(
|
||||
diff --git ui/native_theme/native_theme.h ui/native_theme/native_theme.h
|
||||
index c8e200ba27bd5..a91635c24e213 100644
|
||||
index b2a7455c7e005..77170b90189c8 100644
|
||||
--- ui/native_theme/native_theme.h
|
||||
+++ ui/native_theme/native_theme.h
|
||||
@@ -604,6 +604,9 @@ class NATIVE_THEME_EXPORT NativeTheme {
|
||||
// Whether dark mode is forced via command-line flag.
|
||||
static bool IsForcedDarkMode();
|
||||
@@ -610,6 +610,9 @@ class NATIVE_THEME_EXPORT NativeTheme {
|
||||
// Calculates and returns the use overlay scrollbar setting.
|
||||
static bool CalculateUseOverlayScrollbar();
|
||||
|
||||
+ // Whether light mode is forced via command-line flag.
|
||||
+ static bool IsForcedLightMode();
|
||||
|
@ -107,10 +107,10 @@ index c8e200ba27bd5..a91635c24e213 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 23491b97bb068..4aa1ecef92f5f 100644
|
||||
index dc1224ca2fa27..b2a0ce01b4611 100644
|
||||
--- ui/native_theme/native_theme_mac.mm
|
||||
+++ ui/native_theme/native_theme_mac.mm
|
||||
@@ -586,11 +586,15 @@ void NativeThemeMac::PaintSelectedMenuItem(
|
||||
@@ -585,11 +585,15 @@ void NativeThemeMac::PaintSelectedMenuItem(
|
||||
|
||||
void NativeThemeMac::InitializeDarkModeStateAndObserver() {
|
||||
__block auto theme = this;
|
||||
|
@ -129,10 +129,10 @@ index 23491b97bb068..4aa1ecef92f5f 100644
|
|||
theme->NotifyOnNativeThemeUpdated();
|
||||
}];
|
||||
diff --git ui/native_theme/native_theme_win.cc ui/native_theme/native_theme_win.cc
|
||||
index c1523bbdbf16e..bc0af8c47b7c7 100644
|
||||
index 1b098cbb291fe..fc8f22b7db5a3 100644
|
||||
--- ui/native_theme/native_theme_win.cc
|
||||
+++ ui/native_theme/native_theme_win.cc
|
||||
@@ -680,14 +680,17 @@ bool NativeThemeWin::ShouldUseDarkColors() const {
|
||||
@@ -676,14 +676,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 c1523bbdbf16e..bc0af8c47b7c7 100644
|
|||
return NativeTheme::CalculatePreferredColorScheme();
|
||||
|
||||
// According to the spec, the preferred color scheme for web content is 'dark'
|
||||
@@ -1678,8 +1681,9 @@ void NativeThemeWin::RegisterColorFilteringRegkeyObserver() {
|
||||
@@ -1653,8 +1656,9 @@ void NativeThemeWin::RegisterColorFilteringRegkeyObserver() {
|
||||
}
|
||||
|
||||
void NativeThemeWin::UpdateDarkModeStatus() {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git ui/accessibility/platform/BUILD.gn ui/accessibility/platform/BUILD.gn
|
||||
index 2b3aad7a639c6..5188665feae79 100644
|
||||
index 2f7f2a8f81ec0..6bea20e981df9 100644
|
||||
--- ui/accessibility/platform/BUILD.gn
|
||||
+++ ui/accessibility/platform/BUILD.gn
|
||||
@@ -342,6 +342,10 @@ component("platform") {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git ui/gtk/gtk_ui.cc ui/gtk/gtk_ui.cc
|
||||
index 69fdf309dbb71..60c89be146d2a 100644
|
||||
index 771c253082e2a..47a28fd56750e 100644
|
||||
--- ui/gtk/gtk_ui.cc
|
||||
+++ ui/gtk/gtk_ui.cc
|
||||
@@ -31,6 +31,7 @@
|
||||
|
@ -27,7 +27,7 @@ index 69fdf309dbb71..60c89be146d2a 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 39e18820db0d0..0971f5b63d23d 100644
|
||||
index 50f3163e57544..db26d180ecb2a 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 39e18820db0d0..0971f5b63d23d 100644
|
|||
// Singleton OzonePlatform implementation for X11 platform.
|
||||
class OzonePlatformX11 : public OzonePlatform,
|
||||
public OSExchangeDataProviderFactoryOzone {
|
||||
@@ -261,7 +263,15 @@ class OzonePlatformX11 : public OzonePlatform,
|
||||
@@ -262,7 +264,15 @@ class OzonePlatformX11 : public OzonePlatform,
|
||||
TouchFactory::SetTouchDeviceListFromCommandLine();
|
||||
|
||||
#if BUILDFLAG(USE_GTK)
|
||||
|
@ -56,7 +56,7 @@ index 39e18820db0d0..0971f5b63d23d 100644
|
|||
#endif
|
||||
|
||||
menu_utils_ = std::make_unique<X11MenuUtils>();
|
||||
@@ -356,4 +366,8 @@ OzonePlatform* CreateOzonePlatformX11() {
|
||||
@@ -357,4 +367,8 @@ OzonePlatform* CreateOzonePlatformX11() {
|
||||
return new OzonePlatformX11;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git chrome/browser/chrome_resource_bundle_helper.cc chrome/browser/chrome_resource_bundle_helper.cc
|
||||
index 0cfc966050b60..bbc20cffaee1a 100644
|
||||
index 0e256b2a268ca..66ef8460d46ca 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 0cfc966050b60..bbc20cffaee1a 100644
|
|||
CHECK(!actual_locale.empty())
|
||||
<< "Locale could not be found for " << preferred_locale;
|
||||
|
||||
@@ -155,6 +150,7 @@ std::string InitResourceBundleAndDetermineLocale(PrefService* local_state,
|
||||
@@ -136,6 +131,7 @@ std::string InitResourceBundleAndDetermineLocale(PrefService* local_state,
|
||||
|
||||
std::string LoadLocalState(
|
||||
ChromeFeatureListCreator* chrome_feature_list_creator,
|
||||
|
@ -51,7 +51,7 @@ index 0cfc966050b60..bbc20cffaee1a 100644
|
|||
bool is_running_tests) {
|
||||
base::FilePath user_data_dir;
|
||||
if (!base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir))
|
||||
@@ -166,5 +162,6 @@ std::string LoadLocalState(
|
||||
@@ -147,5 +143,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 36bd7743e5b73..744918bde3012 100644
|
||||
index 3ba9c2e2971ad..f01e59a731f5e 100644
|
||||
--- ui/base/l10n/l10n_util.cc
|
||||
+++ ui/base/l10n/l10n_util.cc
|
||||
@@ -506,25 +506,7 @@ bool CheckAndResolveLocale(const std::string& locale,
|
||||
|
|
|
@ -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 6cc1e99acab04..a1d8b7caf1e2c 100644
|
||||
index 1f686ab2a03bd..c50f3ce1ed450 100644
|
||||
--- chrome/browser/ui/views/profiles/profile_menu_view_base.cc
|
||||
+++ chrome/browser/ui/views/profiles/profile_menu_view_base.cc
|
||||
@@ -1237,8 +1237,8 @@ int ProfileMenuViewBase::GetMaxHeight() const {
|
||||
@@ -1254,8 +1254,8 @@ int ProfileMenuViewBase::GetMaxHeight() const {
|
||||
->GetDisplayNearestPoint(anchor_rect.CenterPoint())
|
||||
.work_area();
|
||||
int available_space = screen_space.bottom() - anchor_rect.bottom();
|
||||
|
|
|
@ -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 f7ead5e49e4ba..85fb9738cd980 100644
|
||||
index a8658f076970c..a5b96df9014e0 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,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git base/message_loop/message_pump_win.cc base/message_loop/message_pump_win.cc
|
||||
index 94a1de886b530..dec2dd5f20721 100644
|
||||
index f28ebfee8218d..12f7539526c06 100644
|
||||
--- base/message_loop/message_pump_win.cc
|
||||
+++ base/message_loop/message_pump_win.cc
|
||||
@@ -2,6 +2,7 @@
|
||||
|
@ -10,7 +10,7 @@ index 94a1de886b530..dec2dd5f20721 100644
|
|||
#include "base/message_loop/message_pump_win.h"
|
||||
|
||||
#include <winbase.h>
|
||||
@@ -569,7 +570,17 @@ bool MessagePumpForUI::ProcessNextWindowsMessage() {
|
||||
@@ -572,7 +573,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 94a1de886b530..dec2dd5f20721 100644
|
|||
}
|
||||
if (has_msg)
|
||||
diff --git base/task/current_thread.cc base/task/current_thread.cc
|
||||
index c4f8862b21ccf..c8c80509abc91 100644
|
||||
index 8506e9f5b1800..43c99a9c72798 100644
|
||||
--- base/task/current_thread.cc
|
||||
+++ base/task/current_thread.cc
|
||||
@@ -51,6 +51,8 @@ void CurrentThread::AddDestructionObserver(
|
||||
|
@ -43,7 +43,7 @@ index c4f8862b21ccf..c8c80509abc91 100644
|
|||
current_->RemoveDestructionObserver(destruction_observer);
|
||||
}
|
||||
diff --git base/task/current_thread.h base/task/current_thread.h
|
||||
index 0be6acd709e53..cdadebb201547 100644
|
||||
index 7a3e7ce2de408..2ebbd5bd8ef55 100644
|
||||
--- base/task/current_thread.h
|
||||
+++ base/task/current_thread.h
|
||||
@@ -163,6 +163,12 @@ class BASE_EXPORT CurrentThread {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git components/metrics/persistent_system_profile.cc components/metrics/persistent_system_profile.cc
|
||||
index 5cfe0451159cf..96fdbcb5e8c09 100644
|
||||
index 5f53ff21a358c..6d88415e889dd 100644
|
||||
--- components/metrics/persistent_system_profile.cc
|
||||
+++ components/metrics/persistent_system_profile.cc
|
||||
@@ -400,6 +400,10 @@ bool PersistentSystemProfile::GetSystemProfile(
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git content/browser/web_contents/web_contents_view.h content/browser/web_contents/web_contents_view.h
|
||||
index 446020ac6a831..6e3f6d048704c 100644
|
||||
index 37cb1dac49610..6e5989c73bf08 100644
|
||||
--- content/browser/web_contents/web_contents_view.h
|
||||
+++ content/browser/web_contents/web_contents_view.h
|
||||
@@ -26,7 +26,7 @@ struct DropData;
|
||||
|
@ -12,10 +12,10 @@ index 446020ac6a831..6e3f6d048704c 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 6c8040666b520..d03d33415f033 100644
|
||||
index bd3bb10e2d6b1..0559c97775444 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
|
||||
@@ -204,6 +204,8 @@ void MimeHandlerViewGuest::CreateWebContents(
|
||||
@@ -211,6 +211,8 @@ void MimeHandlerViewGuest::CreateInnerPage(
|
||||
WebContents::CreateParams params(browser_context(),
|
||||
guest_site_instance.get());
|
||||
params.guest_delegate = this;
|
||||
|
|
|
@ -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 b1ffe26b43448..99266abd58e01 100644
|
||||
index 408edfb7578bb..c3e06bdbb4986 100644
|
||||
--- net/url_request/url_request_http_job.cc
|
||||
+++ net/url_request/url_request_http_job.cc
|
||||
@@ -2079,7 +2079,8 @@ bool URLRequestHttpJob::ShouldAddCookieHeader() const {
|
||||
@@ -2097,7 +2097,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 b1ffe26b43448..99266abd58e01 100644
|
|||
|
||||
bool URLRequestHttpJob::ShouldRecordPartitionedCookieUsage() const {
|
||||
diff --git services/network/public/cpp/resource_request.cc services/network/public/cpp/resource_request.cc
|
||||
index 28bf295032c89..e625f00f49603 100644
|
||||
index 57713d234ec93..dbf788d783740 100644
|
||||
--- services/network/public/cpp/resource_request.cc
|
||||
+++ services/network/public/cpp/resource_request.cc
|
||||
@@ -324,7 +324,8 @@ bool ResourceRequest::EqualsForTesting(const ResourceRequest& request) const {
|
||||
@@ -326,7 +326,8 @@ bool ResourceRequest::EqualsForTesting(const ResourceRequest& request) const {
|
||||
}
|
||||
|
||||
bool ResourceRequest::SendsCookies() const {
|
||||
|
|
|
@ -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 0ee26322fd5ce..25265759b31f3 100644
|
||||
index d640d545e78c8..c70cf04088f2c 100644
|
||||
--- net/test/embedded_test_server/embedded_test_server.cc
|
||||
+++ net/test/embedded_test_server/embedded_test_server.cc
|
||||
@@ -1088,7 +1088,7 @@ bool EmbeddedTestServer::PostTaskToIOThreadAndWait(base::OnceClosure closure) {
|
||||
@@ -1091,7 +1091,7 @@ bool EmbeddedTestServer::PostTaskToIOThreadAndWait(base::OnceClosure closure) {
|
||||
if (!base::CurrentThread::Get())
|
||||
temporary_loop = std::make_unique<base::SingleThreadTaskExecutor>();
|
||||
|
||||
|
@ -11,7 +11,7 @@ index 0ee26322fd5ce..25265759b31f3 100644
|
|||
if (!io_thread_->task_runner()->PostTaskAndReply(
|
||||
FROM_HERE, std::move(closure), run_loop.QuitClosure())) {
|
||||
return false;
|
||||
@@ -1115,7 +1115,7 @@ bool EmbeddedTestServer::PostTaskToIOThreadAndWaitWithResult(
|
||||
@@ -1118,7 +1118,7 @@ bool EmbeddedTestServer::PostTaskToIOThreadAndWaitWithResult(
|
||||
if (!base::CurrentThread::Get())
|
||||
temporary_loop = std::make_unique<base::SingleThreadTaskExecutor>();
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git net/url_request/url_request_job.cc net/url_request/url_request_job.cc
|
||||
index dc0381e682e2a..16f6666efdcda 100644
|
||||
index f1288aaa112e6..2b29bffdbbaf6 100644
|
||||
--- net/url_request/url_request_job.cc
|
||||
+++ net/url_request/url_request_job.cc
|
||||
@@ -36,6 +36,7 @@
|
||||
|
@ -27,7 +27,7 @@ index dc0381e682e2a..16f6666efdcda 100644
|
|||
} // namespace
|
||||
|
||||
// Each SourceStreams own the previous SourceStream in the chain, but the
|
||||
@@ -326,8 +337,7 @@ GURL URLRequestJob::ComputeReferrerForPolicy(
|
||||
@@ -325,8 +336,7 @@ GURL URLRequestJob::ComputeReferrerForPolicy(
|
||||
}
|
||||
|
||||
bool secure_referrer_but_insecure_destination =
|
||||
|
|
|
@ -56,10 +56,19 @@ 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 5a521aa5a6117..1a6454eb4f300 100644
|
||||
index e8f68eca2104c..c579cff86fbbb 100644
|
||||
--- content/browser/renderer_host/render_widget_host_impl.cc
|
||||
+++ content/browser/renderer_host/render_widget_host_impl.cc
|
||||
@@ -3232,6 +3232,11 @@ void RenderWidgetHostImpl::DecrementInFlightEventCount(
|
||||
@@ -791,7 +791,7 @@ void RenderWidgetHostImpl::WasHidden() {
|
||||
|
||||
// Cancel pending pointer lock requests, unless there's an open user prompt.
|
||||
// Prompts should remain open and functional across tab switches.
|
||||
- if (!delegate_->IsWaitingForPointerLockPrompt(this)) {
|
||||
+ if (!delegate_ || !delegate_->IsWaitingForPointerLockPrompt(this)) {
|
||||
RejectPointerLockOrUnlockIfNecessary(
|
||||
blink::mojom::PointerLockResult::kWrongDocument);
|
||||
}
|
||||
@@ -3248,6 +3248,11 @@ void RenderWidgetHostImpl::DecrementInFlightEventCount(
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -72,10 +81,10 @@ index 5a521aa5a6117..1a6454eb4f300 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 b8dadc4cca462..f5bbd83de86ab 100644
|
||||
index 01b87c84b32c0..e6061b75d201d 100644
|
||||
--- content/browser/renderer_host/render_widget_host_impl.h
|
||||
+++ content/browser/renderer_host/render_widget_host_impl.h
|
||||
@@ -836,6 +836,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl
|
||||
@@ -841,6 +841,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl
|
||||
|
||||
void ProgressFlingIfNeeded(base::TimeTicks current_time);
|
||||
void StopFling();
|
||||
|
|
|
@ -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 2096591596a26..5a0c3fd16eecf 100644
|
||||
index a7742298af440..a7dab9f4f770b 100644
|
||||
--- gpu/ipc/service/gpu_memory_buffer_factory_dxgi.cc
|
||||
+++ gpu/ipc/service/gpu_memory_buffer_factory_dxgi.cc
|
||||
@@ -179,7 +179,8 @@ gfx::GpuMemoryBufferHandle GpuMemoryBufferFactoryDXGI::CreateGpuMemoryBuffer(
|
||||
@@ -178,7 +178,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 2096591596a26..5a0c3fd16eecf 100644
|
|||
<< "Incorrect usage, usage=" << gfx::BufferUsageToString(usage);
|
||||
|
||||
D3D11_TEXTURE2D_DESC desc = {
|
||||
@@ -193,7 +194,9 @@ gfx::GpuMemoryBufferHandle GpuMemoryBufferFactoryDXGI::CreateGpuMemoryBuffer(
|
||||
@@ -192,7 +193,9 @@ gfx::GpuMemoryBufferHandle GpuMemoryBufferFactoryDXGI::CreateGpuMemoryBuffer(
|
||||
D3D11_BIND_SHADER_RESOURCE | D3D11_BIND_RENDER_TARGET,
|
||||
0,
|
||||
D3D11_RESOURCE_MISC_SHARED_NTHANDLE |
|
||||
|
@ -24,10 +24,10 @@ index 2096591596a26..5a0c3fd16eecf 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 596affaba0993..3c28ea80fc631 100644
|
||||
index b27bcf13d3a5f..df1b2d697f7cc 100644
|
||||
--- media/video/renderable_gpu_memory_buffer_video_frame_pool.cc
|
||||
+++ media/video/renderable_gpu_memory_buffer_video_frame_pool.cc
|
||||
@@ -205,7 +205,7 @@ gfx::Size GetBufferSizeInPixelsForVideoPixelFormat(
|
||||
@@ -193,7 +193,7 @@ gfx::Size GetBufferSizeInPixelsForVideoPixelFormat(
|
||||
bool FrameResources::Initialize() {
|
||||
auto* context = pool_->GetContext();
|
||||
|
||||
|
@ -36,7 +36,7 @@ index 596affaba0993..3c28ea80fc631 100644
|
|||
#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS)
|
||||
gfx::BufferUsage::SCANOUT_VEA_CPU_READ
|
||||
#else
|
||||
@@ -219,6 +219,23 @@ bool FrameResources::Initialize() {
|
||||
@@ -207,6 +207,23 @@ bool FrameResources::Initialize() {
|
||||
const gfx::Size buffer_size_in_pixels =
|
||||
GetBufferSizeInPixelsForVideoPixelFormat(format_, coded_size_);
|
||||
|
||||
|
@ -57,35 +57,15 @@ index 596affaba0993..3c28ea80fc631 100644
|
|||
+ }
|
||||
+#endif
|
||||
+
|
||||
// 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;
|
||||
}
|
||||
|
||||
constexpr gpu::SharedImageUsageSet kSharedImageUsage =
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
- gpu_memory_buffer_->SetColorSpace(color_space_);
|
||||
+ gpu_memory_buffer_->SetColorSpace(color_space_);
|
||||
#endif
|
||||
}
|
||||
gpu::SHARED_IMAGE_USAGE_MACOS_VIDEO_TOOLBOX |
|
||||
@@ -231,7 +248,7 @@ bool FrameResources::Initialize() {
|
||||
viz::GetSharedImageFormat(buffer_format);
|
||||
|
||||
@@ -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 {
|
||||
if (!shared_image_) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git net/base/directory_lister.cc net/base/directory_lister.cc
|
||||
index 9a9787aae0233..467cbef7f6c34 100644
|
||||
index ae3a99f31e2ec..213cc33f2cc8e 100644
|
||||
--- net/base/directory_lister.cc
|
||||
+++ net/base/directory_lister.cc
|
||||
@@ -200,7 +200,7 @@ void DirectoryLister::OnListFile(const DirectoryListerData& data) {
|
||||
|
|
|
@ -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 52ce9d2c8c5e2..b94e96d0c5b52 100644
|
||||
index 4675bec818108..da09caea5cb13 100644
|
||||
--- content/browser/renderer_host/render_view_host_impl.cc
|
||||
+++ content/browser/renderer_host/render_view_host_impl.cc
|
||||
@@ -743,6 +743,8 @@ bool RenderViewHostImpl::IsRenderViewLive() const {
|
||||
@@ -751,6 +751,8 @@ bool RenderViewHostImpl::IsRenderViewLive() const {
|
||||
}
|
||||
|
||||
void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
diff --git ui/base/resource/resource_bundle.cc ui/base/resource/resource_bundle.cc
|
||||
index f1e826da8bc65..d4a8c6f5a9290 100644
|
||||
index aae95534577aa..aad03d8ec994a 100644
|
||||
--- ui/base/resource/resource_bundle.cc
|
||||
+++ ui/base/resource/resource_bundle.cc
|
||||
@@ -932,6 +932,12 @@ ResourceBundle::ResourceBundle(Delegate* delegate)
|
||||
@@ -942,6 +942,12 @@ ResourceBundle::ResourceBundle(Delegate* delegate)
|
||||
: delegate_(delegate),
|
||||
locale_resources_data_lock_(new base::Lock),
|
||||
max_scale_factor_(k100Percent) {
|
||||
|
@ -15,7 +15,7 @@ index f1e826da8bc65..d4a8c6f5a9290 100644
|
|||
mangle_localized_strings_ = base::CommandLine::ForCurrentProcess()->HasSwitch(
|
||||
switches::kMangleLocalizedStrings);
|
||||
}
|
||||
@@ -941,6 +947,11 @@ ResourceBundle::~ResourceBundle() {
|
||||
@@ -951,6 +957,11 @@ ResourceBundle::~ResourceBundle() {
|
||||
UnloadLocaleResources();
|
||||
}
|
||||
|
||||
|
@ -28,10 +28,10 @@ index f1e826da8bc65..d4a8c6f5a9290 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 e2775058db121..691136d0e21d1 100644
|
||||
index 9323142348537..8a8ed019a0489 100644
|
||||
--- ui/base/resource/resource_bundle.h
|
||||
+++ ui/base/resource/resource_bundle.h
|
||||
@@ -220,6 +220,11 @@ class COMPONENT_EXPORT(UI_BASE) ResourceBundle {
|
||||
@@ -224,6 +224,11 @@ class COMPONENT_EXPORT(UI_BASE) ResourceBundle {
|
||||
ResourceBundle(const ResourceBundle&) = delete;
|
||||
ResourceBundle& operator=(const ResourceBundle&) = delete;
|
||||
|
||||
|
|
|
@ -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 98c865765c57d..f31210f9c3070 100644
|
||||
index d29dac8938055..c2bbba0d6c2ab 100644
|
||||
--- content/browser/renderer_host/render_frame_host_impl.cc
|
||||
+++ content/browser/renderer_host/render_frame_host_impl.cc
|
||||
@@ -9125,6 +9125,16 @@ void RenderFrameHostImpl::CreateNewWindow(
|
||||
@@ -9180,6 +9180,16 @@ void RenderFrameHostImpl::CreateNewWindow(
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@ index 98c865765c57d..f31210f9c3070 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.
|
||||
@@ -11466,6 +11476,7 @@ void RenderFrameHostImpl::CommitNavigation(
|
||||
@@ -11558,6 +11568,7 @@ void RenderFrameHostImpl::CommitNavigation(
|
||||
auto browser_calc_origin_to_commit =
|
||||
navigation_request->GetOriginToCommitWithDebugInfo();
|
||||
if (!process_lock.is_error_page() && !is_mhtml_subframe &&
|
||||
|
|
|
@ -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 f3a6fc7deec43..1f359e351fa85 100755
|
||||
index f0b8bacf57360..585e64876f44e 100755
|
||||
--- build/vs_toolchain.py
|
||||
+++ build/vs_toolchain.py
|
||||
@@ -114,9 +114,16 @@ def SetEnvironmentAndGetRuntimeDllDirs():
|
||||
@@ -136,9 +136,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 f3a6fc7deec43..1f359e351fa85 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
|
||||
@@ -165,6 +172,10 @@ def _RegistryGetValue(key, value):
|
||||
@@ -187,6 +194,10 @@ def _RegistryGetValue(key, value):
|
||||
def GetVisualStudioVersion():
|
||||
"""Return best available version of Visual Studio.
|
||||
"""
|
||||
|
|
|
@ -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 55548735a1d10..edca00d0d49d3 100644
|
||||
index 47b5f2b63ecf2..fa1a3be6d5e06 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 55548735a1d10..edca00d0d49d3 100644
|
|||
#include <set>
|
||||
#include <string_view>
|
||||
#include <utility>
|
||||
@@ -54,6 +55,7 @@
|
||||
@@ -53,6 +54,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 55548735a1d10..edca00d0d49d3 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"
|
||||
@@ -759,10 +761,12 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() {
|
||||
@@ -760,10 +762,12 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() {
|
||||
void RenderWidgetHostViewAura::UpdateBackgroundColor() {
|
||||
CHECK(GetBackgroundColor());
|
||||
|
||||
|
@ -35,7 +35,7 @@ index 55548735a1d10..edca00d0d49d3 100644
|
|||
}
|
||||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
@@ -2460,6 +2464,16 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) {
|
||||
@@ -2542,6 +2546,16 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) {
|
||||
window_->layer()->SetColor(GetBackgroundColor() ? *GetBackgroundColor()
|
||||
: SK_ColorWHITE);
|
||||
UpdateFrameSinkIdRegistration();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git ui/display/screen.cc ui/display/screen.cc
|
||||
index 3090a05e91f31..d9667f9526278 100644
|
||||
index 6fa7119d30df8..224d2113000fb 100644
|
||||
--- ui/display/screen.cc
|
||||
+++ ui/display/screen.cc
|
||||
@@ -108,13 +108,13 @@ base::TimeDelta Screen::CalculateIdleTime() const {
|
||||
|
@ -19,10 +19,10 @@ index 3090a05e91f31..d9667f9526278 100644
|
|||
|
||||
bool Screen::GetDisplayWithDisplayId(int64_t display_id,
|
||||
diff --git ui/display/win/screen_win.cc ui/display/win/screen_win.cc
|
||||
index 767d02f5b660a..f6926e4ef96fa 100644
|
||||
index 931443a2ef517..4352a30879c04 100644
|
||||
--- ui/display/win/screen_win.cc
|
||||
+++ ui/display/win/screen_win.cc
|
||||
@@ -619,7 +619,7 @@ gfx::Rect ScreenWin::ScreenToDIPRect(HWND hwnd, const gfx::Rect& pixel_bounds) {
|
||||
@@ -633,7 +633,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 767d02f5b660a..f6926e4ef96fa 100644
|
|||
}
|
||||
|
||||
// static
|
||||
@@ -634,7 +634,7 @@ gfx::Rect ScreenWin::DIPToScreenRect(HWND hwnd, const gfx::Rect& dip_bounds) {
|
||||
@@ -648,7 +648,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();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git net/cookies/cookie_monster.cc net/cookies/cookie_monster.cc
|
||||
index b8506e1b025df..d18163053f430 100644
|
||||
index 020b7141b4bf5..8879bae28f119 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 f78c6a467befc..97f1d21218eed 100644
|
||||
index 06a85c11e6604..c1d0bcfac60d4 100644
|
||||
--- services/network/cookie_manager.cc
|
||||
+++ services/network/cookie_manager.cc
|
||||
@@ -345,14 +345,9 @@ void CookieManager::AllowFileSchemeCookies(
|
||||
|
@ -80,10 +80,10 @@ index f78c6a467befc..97f1d21218eed 100644
|
|||
|
||||
void CookieManager::SetForceKeepSessionState() {
|
||||
diff --git services/network/network_context.cc services/network/network_context.cc
|
||||
index d18f5b091d33e..ff7f620d3750d 100644
|
||||
index cae84c27a26d6..ce496fd4f97ea 100644
|
||||
--- services/network/network_context.cc
|
||||
+++ services/network/network_context.cc
|
||||
@@ -2577,16 +2577,20 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
|
||||
@@ -2640,17 +2640,21 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
|
||||
network_service_->network_quality_estimator());
|
||||
}
|
||||
|
||||
|
@ -91,13 +91,15 @@ index d18f5b091d33e..ff7f620d3750d 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()) {
|
||||
|
@ -112,10 +114,10 @@ index d18f5b091d33e..ff7f620d3750d 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 83bce4a3bf9dc..c6efc2e4333fc 100644
|
||||
index f2c8a56442e0a..747948ea6d197 100644
|
||||
--- services/network/public/mojom/network_context.mojom
|
||||
+++ services/network/public/mojom/network_context.mojom
|
||||
@@ -359,6 +359,9 @@ struct NetworkContextParams {
|
||||
@@ -366,6 +366,9 @@ struct NetworkContextParams {
|
||||
// cookies. Otherwise it should be false.
|
||||
bool persist_session_cookies = false;
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
diff --git content/browser/storage_partition_impl.cc content/browser/storage_partition_impl.cc
|
||||
index a45a20da28026..6ab41c52f0b54 100644
|
||||
index c43bb22ce2326..f757f4aa5e822 100644
|
||||
--- content/browser/storage_partition_impl.cc
|
||||
+++ content/browser/storage_partition_impl.cc
|
||||
@@ -3336,9 +3336,12 @@ void StoragePartitionImpl::InitNetworkContext() {
|
||||
@@ -3335,9 +3335,12 @@ void StoragePartitionImpl::InitNetworkContext() {
|
||||
cert_verifier::mojom::CertVerifierCreationParamsPtr
|
||||
cert_verifier_creation_params =
|
||||
cert_verifier::mojom::CertVerifierCreationParams::New();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git base/trace_event/builtin_categories.h base/trace_event/builtin_categories.h
|
||||
index bf7628ed92355..a0911d52890b9 100644
|
||||
index ef993705e4a36..8d1d9a1be4603 100644
|
||||
--- base/trace_event/builtin_categories.h
|
||||
+++ base/trace_event/builtin_categories.h
|
||||
@@ -71,6 +71,8 @@
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
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();
|
|
@ -1,8 +1,8 @@
|
|||
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 @@
|
||||
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 @@
|
||||
#include "base/functional/bind.h"
|
||||
#include "base/location.h"
|
||||
#include "base/task/single_thread_task_runner.h"
|
||||
|
@ -10,7 +10,7 @@ index fbf6043fc4322..913b30ba2eed8 100644
|
|||
#include "ui/base/l10n/l10n_util.h"
|
||||
#include "ui/base/models/image_model.h"
|
||||
#include "ui/gfx/image/image.h"
|
||||
@@ -170,8 +171,10 @@ void SimpleMenuModel::AddSeparator(MenuSeparatorType separator_type) {
|
||||
@@ -171,8 +172,10 @@ void SimpleMenuModel::AddSeparator(MenuSeparatorType separator_type) {
|
||||
}
|
||||
|
||||
if (items_.at(last_visible_item).type == TYPE_SEPARATOR) {
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
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" ]
|
|
@ -1,11 +1,11 @@
|
|||
diff --git chrome/browser/ui/views/toolbar/app_menu.cc chrome/browser/ui/views/toolbar/app_menu.cc
|
||||
index 7d91e43c61417..8956ad4452b57 100644
|
||||
index e96fca7585c60..5cb08115ca9f8 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::MENU_SOURCE_NONE,
|
||||
views::MenuAnchorPosition::kTopRight, ui::mojom::MenuSourceType::kNone,
|
||||
- /*native_view_for_gestures=*/gfx::NativeView(), /*corners=*/std::nullopt,
|
||||
+ /*native_view_for_gestures=*/gfx::NativeView(),
|
||||
+ /*parent_widget=*/gfx::kNullAcceleratedWidget,
|
||||
|
@ -14,7 +14,7 @@ index 7d91e43c61417..8956ad4452b57 100644
|
|||
}
|
||||
|
||||
diff --git ui/base/models/menu_model.h ui/base/models/menu_model.h
|
||||
index 393dc941d9543..75618d210585a 100644
|
||||
index ecd8177fd48cb..63d94b6f39a7b 100644
|
||||
--- ui/base/models/menu_model.h
|
||||
+++ ui/base/models/menu_model.h
|
||||
@@ -17,8 +17,11 @@
|
||||
|
@ -29,7 +29,7 @@ index 393dc941d9543..75618d210585a 100644
|
|||
}
|
||||
|
||||
namespace ui {
|
||||
@@ -149,6 +152,27 @@ class COMPONENT_EXPORT(UI_BASE) MenuModel {
|
||||
@@ -153,6 +156,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 393dc941d9543..75618d210585a 100644
|
|||
virtual void MenuWillShow() {}
|
||||
|
||||
diff --git ui/gfx/render_text.cc ui/gfx/render_text.cc
|
||||
index c7d34b8b4e3d7..ce7a5c37e7b8a 100644
|
||||
index ec4c6eb4e76dd..1b74741b8b2ff 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 c7d34b8b4e3d7..ce7a5c37e7b8a 100644
|
|||
void RenderText::SetDisplayRect(const Rect& r) {
|
||||
if (r != display_rect_) {
|
||||
display_rect_ = r;
|
||||
@@ -2145,6 +2153,18 @@ void RenderText::OnTextAttributeChanged() {
|
||||
@@ -2144,6 +2152,18 @@ void RenderText::OnTextAttributeChanged() {
|
||||
text_elided_ = false;
|
||||
|
||||
layout_text_up_to_date_ = false;
|
||||
|
@ -96,10 +96,10 @@ index c7d34b8b4e3d7..ce7a5c37e7b8a 100644
|
|||
}
|
||||
|
||||
diff --git ui/gfx/render_text.h ui/gfx/render_text.h
|
||||
index ad2fb8c1a6078..d14890b136855 100644
|
||||
index 624a22c8c5478..707aca5f8342a 100644
|
||||
--- ui/gfx/render_text.h
|
||||
+++ ui/gfx/render_text.h
|
||||
@@ -360,6 +360,10 @@ class GFX_EXPORT RenderText {
|
||||
@@ -360,6 +360,10 @@ class COMPONENT_EXPORT(GFX) RenderText {
|
||||
void SetWhitespaceElision(std::optional<bool> elide_whitespace);
|
||||
std::optional<bool> whitespace_elision() const { return whitespace_elision_; }
|
||||
|
||||
|
@ -110,7 +110,7 @@ index ad2fb8c1a6078..d14890b136855 100644
|
|||
const Rect& display_rect() const { return display_rect_; }
|
||||
void SetDisplayRect(const Rect& r);
|
||||
|
||||
@@ -1107,6 +1111,8 @@ class GFX_EXPORT RenderText {
|
||||
@@ -1107,6 +1111,8 @@ class COMPONENT_EXPORT(GFX) RenderText {
|
||||
|
||||
// Tell whether or not the |layout_text_| needs an update or is up to date.
|
||||
mutable bool layout_text_up_to_date_ = false;
|
||||
|
@ -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 accbbb51263ba..7ba1eb32f1bb3 100644
|
||||
index d3267b9532029..9fa167d45b039 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 accbbb51263ba..7ba1eb32f1bb3 100644
|
|||
} // namespace
|
||||
|
||||
namespace views {
|
||||
@@ -497,6 +514,15 @@ void Label::SetElideBehavior(gfx::ElideBehavior elide_behavior) {
|
||||
OnPropertyChanged(&elide_behavior_, kPropertyEffectsPreferredSizeChanged);
|
||||
@@ -518,6 +535,15 @@ void Label::SetElideBehavior(gfx::ElideBehavior elide_behavior) {
|
||||
#endif // BUILDFLAG(SUPPORTS_AX_TEXT_OFFSETS)
|
||||
}
|
||||
|
||||
+void Label::SetDrawStringsFlags(int flags) {
|
||||
|
@ -213,7 +213,7 @@ index accbbb51263ba..7ba1eb32f1bb3 100644
|
|||
std::u16string Label::GetTooltipText() const {
|
||||
return tooltip_text_;
|
||||
}
|
||||
@@ -816,6 +842,16 @@ std::unique_ptr<gfx::RenderText> Label::CreateRenderText() const {
|
||||
@@ -837,6 +863,16 @@ std::unique_ptr<gfx::RenderText> Label::CreateRenderText() const {
|
||||
render_text->SelectRange(stored_selection_range_);
|
||||
}
|
||||
|
||||
|
@ -231,7 +231,7 @@ index accbbb51263ba..7ba1eb32f1bb3 100644
|
|||
}
|
||||
|
||||
diff --git ui/views/controls/label.h ui/views/controls/label.h
|
||||
index aae9bfa72f8f9..386cdead499f7 100644
|
||||
index 0bd787bbc8687..6745dcddc5829 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 aae9bfa72f8f9..386cdead499f7 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
|
||||
@@ -532,6 +536,7 @@ class VIEWS_EXPORT Label : public View,
|
||||
@@ -540,6 +544,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 aae9bfa72f8f9..386cdead499f7 100644
|
|||
std::unique_ptr<SelectionController> selection_controller_;
|
||||
|
||||
diff --git ui/views/controls/menu/menu_controller.cc ui/views/controls/menu/menu_controller.cc
|
||||
index bbbc64c5f4644..516aaa1468d17 100644
|
||||
index eea71e213db16..5e915151d5fa4 100644
|
||||
--- ui/views/controls/menu/menu_controller.cc
|
||||
+++ ui/views/controls/menu/menu_controller.cc
|
||||
@@ -579,7 +579,8 @@ void MenuController::Run(Widget* parent,
|
||||
@@ -578,7 +578,8 @@ void MenuController::Run(Widget* parent,
|
||||
MenuAnchorPosition position,
|
||||
bool context_menu,
|
||||
bool is_nested_drag,
|
||||
|
@ -267,7 +267,7 @@ index bbbc64c5f4644..516aaa1468d17 100644
|
|||
exit_type_ = ExitType::kNone;
|
||||
possible_drag_ = false;
|
||||
drag_in_progress_ = false;
|
||||
@@ -624,6 +625,7 @@ void MenuController::Run(Widget* parent,
|
||||
@@ -622,6 +623,7 @@ void MenuController::Run(Widget* parent,
|
||||
owner_->AddObserver(this);
|
||||
|
||||
native_view_for_gestures_ = native_view_for_gestures;
|
||||
|
@ -275,7 +275,7 @@ index bbbc64c5f4644..516aaa1468d17 100644
|
|||
|
||||
// Only create a MenuPreTargetHandler for non-nested menus. Nested menus
|
||||
// will use the existing one.
|
||||
@@ -2264,6 +2266,7 @@ void MenuController::OpenMenuImpl(MenuItemView* item, bool show) {
|
||||
@@ -2272,6 +2274,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 bbbc64c5f4644..516aaa1468d17 100644
|
|||
if (item->GetParentMenuItem()) {
|
||||
params.context = item->GetWidget();
|
||||
// (crbug.com/1414232) The item to be open is a submenu. Make sure
|
||||
@@ -2941,8 +2944,13 @@ MenuItemView* MenuController::FindInitialSelectableMenuItem(
|
||||
@@ -2965,8 +2968,13 @@ MenuItemView* MenuController::FindInitialSelectableMenuItem(
|
||||
|
||||
void MenuController::OpenSubmenuChangeSelectionIfCan() {
|
||||
MenuItemView* item = pending_state_.item;
|
||||
|
@ -298,7 +298,7 @@ index bbbc64c5f4644..516aaa1468d17 100644
|
|||
|
||||
// Show the sub-menu.
|
||||
SetSelection(item, SELECTION_OPEN_SUBMENU | SELECTION_UPDATE_IMMEDIATELY);
|
||||
@@ -2962,8 +2970,10 @@ void MenuController::OpenSubmenuChangeSelectionIfCan() {
|
||||
@@ -2986,8 +2994,10 @@ void MenuController::OpenSubmenuChangeSelectionIfCan() {
|
||||
void MenuController::CloseSubmenu() {
|
||||
MenuItemView* item = state_.item;
|
||||
DCHECK(item);
|
||||
|
@ -311,7 +311,7 @@ index bbbc64c5f4644..516aaa1468d17 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 e516d8035db49..2209823333fd7 100644
|
||||
index 24daa0f4c9d5d..fd7b977b597e7 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 e516d8035db49..2209823333fd7 100644
|
|||
|
||||
bool for_drop() const { return for_drop_; }
|
||||
|
||||
@@ -742,6 +744,8 @@ class VIEWS_EXPORT MenuController final : public gfx::AnimationDelegate,
|
||||
@@ -738,6 +740,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 e516d8035db49..2209823333fd7 100644
|
|||
bool possible_drag_ = false;
|
||||
|
||||
diff --git ui/views/controls/menu/menu_delegate.h ui/views/controls/menu/menu_delegate.h
|
||||
index ec079fa83c063..d644ab72fed07 100644
|
||||
index ea82da6dc2f45..575bd9484c2bf 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 ec079fa83c063..d644ab72fed07 100644
|
|||
virtual int GetMaxWidthForMenu(MenuItemView* menu);
|
||||
|
||||
diff --git ui/views/controls/menu/menu_host.cc ui/views/controls/menu/menu_host.cc
|
||||
index f315051d58d34..edffdf794b19d 100644
|
||||
index 4e87636d2778c..0492351fb3e01 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 14006cc21e5e2..a1e64d2b3aed1 100644
|
||||
index 212a38af0598d..0fb02b639aefd 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 14006cc21e5e2..a1e64d2b3aed1 100644
|
|||
} else if (paint_as_selected) {
|
||||
gfx::Rect item_bounds = GetLocalBounds();
|
||||
if (type_ == Type::kActionableSubMenu) {
|
||||
@@ -1171,6 +1180,13 @@ void MenuItemView::PaintMinorIconAndText(gfx::Canvas* canvas, SkColor color) {
|
||||
@@ -1177,6 +1186,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 fa8028a7a6d20..dc6d1210462a4 100644
|
||||
index 493fda82af500..38d3344d97074 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 c585f056973e2..02af08d23a9b9 100644
|
||||
index d9ee2469c6f5e..13bcee3f329ba 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 87427e16e1b60..eb5998419a8f3 100644
|
||||
index a1476c32d31c5..2c988a5bb3d4f 100644
|
||||
--- ui/views/controls/menu/menu_scroll_view_container.cc
|
||||
+++ ui/views/controls/menu/menu_scroll_view_container.cc
|
||||
@@ -254,6 +254,11 @@ MenuScrollViewContainer::MenuScrollViewContainer(SubmenuView* content_view)
|
||||
@@ -266,6 +266,11 @@ MenuScrollViewContainer::MenuScrollViewContainer(SubmenuView* content_view)
|
||||
scroll_down_button_ = background_view_->AddChildView(
|
||||
std::make_unique<MenuScrollButton>(content_view, false));
|
||||
|
||||
|
@ -761,18 +761,18 @@ index 87427e16e1b60..eb5998419a8f3 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 dcf4b60ad92c2..64fa80edefc1b 100644
|
||||
index 92b86fccb3a30..964351594f1e4 100644
|
||||
--- ui/views/test/ui_controls_factory_desktop_aura_ozone.cc
|
||||
+++ ui/views/test/ui_controls_factory_desktop_aura_ozone.cc
|
||||
@@ -16,6 +16,7 @@
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "base/run_loop.h"
|
||||
#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"
|
||||
@@ -181,9 +182,11 @@ bool SendMouseMoveNotifyWhenDone(int screen_x,
|
||||
@@ -171,9 +172,11 @@ bool SendMouseMoveNotifyWhenDone(int screen_x,
|
||||
aura::test::QueryLatestMousePositionRequestInHost(host);
|
||||
host->ConvertPixelsToDIP(&root_current_location);
|
||||
|
||||
|
@ -782,10 +782,10 @@ index dcf4b60ad92c2..64fa80edefc1b 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 14d175dacf2ae..7a7c051f6ee08 100644
|
||||
index d3f42b37d06fa..fbf1b94c7e07a 100644
|
||||
--- ui/views/view.h
|
||||
+++ ui/views/view.h
|
||||
@@ -25,6 +25,7 @@
|
||||
|
@ -796,7 +796,7 @@ index 14d175dacf2ae..7a7c051f6ee08 100644
|
|||
#include "base/types/pass_key.h"
|
||||
#include "build/build_config.h"
|
||||
#include "third_party/skia/include/core/SkPath.h"
|
||||
@@ -290,7 +291,8 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
|
||||
@@ -289,7 +290,8 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
|
||||
public ui::EventTarget,
|
||||
public ui::EventHandler,
|
||||
public ui::PropertyHandler,
|
||||
|
@ -806,7 +806,7 @@ index 14d175dacf2ae..7a7c051f6ee08 100644
|
|||
// Do not remove this macro!
|
||||
// The macro is maintained by the memory safety team.
|
||||
ADVANCED_MEMORY_SAFETY_CHECKS();
|
||||
@@ -610,7 +612,7 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
|
||||
@@ -609,7 +611,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().
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
diff --git ui/views/controls/textfield/textfield.cc ui/views/controls/textfield/textfield.cc
|
||||
index 931fd32050882..06f009728d812 100644
|
||||
index 85bb58edd7041..36d9bf3ae5263 100644
|
||||
--- ui/views/controls/textfield/textfield.cc
|
||||
+++ ui/views/controls/textfield/textfield.cc
|
||||
@@ -3017,6 +3017,10 @@ void Textfield::OnCursorBlinkTimerFired() {
|
||||
@@ -3028,6 +3028,10 @@ void Textfield::OnCursorBlinkTimerFired() {
|
||||
void Textfield::OnEnabledChanged() {
|
||||
if (GetInputMethod())
|
||||
GetInputMethod()->OnTextInputTypeChanged(this);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git chrome/browser/extensions/api/sessions/sessions_api.cc chrome/browser/extensions/api/sessions/sessions_api.cc
|
||||
index 747d429ae99a5..c8dd80409068b 100644
|
||||
index ea4123fa52305..aee79b9db521e 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 747d429ae99a5..c8dd80409068b 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 6156dd1ccab4c..a2721ea15863e 100644
|
||||
index 60c1a8d04fdb6..728a44ee45ab7 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
|
||||
@@ -43,6 +43,7 @@ ui::mojom::WindowShowState ChromeNativeAppWindowViewsAura::GetRestorableState(
|
||||
@@ -37,6 +37,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 72c5c119911a6..7c1bccc2a048e 100644
|
||||
index 7684afb6afe8e..fe3195fdbc37b 100644
|
||||
--- content/browser/renderer_host/render_widget_host_view_base.cc
|
||||
+++ content/browser/renderer_host/render_widget_host_view_base.cc
|
||||
@@ -590,6 +590,14 @@ float RenderWidgetHostViewBase::GetScaleOverrideForCapture() const {
|
||||
@@ -586,6 +586,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 a131d58351110..196fe4d25d4a7 100644
|
||||
index 41b34a27176a3..bdf5f9d4bb61e 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 e9bb4ee5bccee..e6172b1a8d53f 100644
|
||||
index 2c79ae48b7069..81cd4a84b0a6c 100644
|
||||
--- ui/aura/native_window_occlusion_tracker_win.cc
|
||||
+++ ui/aura/native_window_occlusion_tracker_win.cc
|
||||
@@ -102,6 +102,13 @@ void NativeWindowOcclusionTrackerWin::Enable(Window* window) {
|
||||
@@ -100,6 +100,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 e9bb4ee5bccee..e6172b1a8d53f 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 526b6129d6d01..1937a441b930d 100644
|
||||
index aeaf8e35f7eda..4b7cc3f03d3cf 100644
|
||||
--- ui/base/mojom/window_show_state.mojom
|
||||
+++ ui/base/mojom/window_show_state.mojom
|
||||
@@ -23,6 +23,7 @@ enum WindowShowState {
|
||||
@@ -20,6 +20,7 @@ enum WindowShowState {
|
||||
kMaximized = 3,
|
||||
kInactive = 4, // Views only, not persisted.
|
||||
kFullscreen = 5,
|
||||
|
@ -246,10 +246,10 @@ index 526b6129d6d01..1937a441b930d 100644
|
|||
+ [MinVersion=1] kEnd = 7,
|
||||
};
|
||||
diff --git ui/ozone/platform/x11/x11_window.cc ui/ozone/platform/x11/x11_window.cc
|
||||
index c21f3aa2e68f7..0a2443e772767 100644
|
||||
index 9dc4c165beecb..26a1c56f2c9d7 100644
|
||||
--- ui/ozone/platform/x11/x11_window.cc
|
||||
+++ ui/ozone/platform/x11/x11_window.cc
|
||||
@@ -1860,7 +1860,8 @@ void X11Window::CreateXWindow(const PlatformWindowInitProperties& properties) {
|
||||
@@ -1861,7 +1861,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 628494b15591f..32cbfb8314439 100644
|
||||
index 9690d769e804f..4e2f015d1a142 100644
|
||||
--- ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc
|
||||
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc
|
||||
@@ -282,8 +282,8 @@ void DesktopWindowTreeHostPlatform::Init(const Widget::InitParams& params) {
|
||||
@@ -269,8 +269,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 85c36216bbadf..2f6b48b656102 100644
|
||||
index 928f50fe35775..423ebc5a0f025 100644
|
||||
--- ui/views/widget/native_widget_mac.mm
|
||||
+++ ui/views/widget/native_widget_mac.mm
|
||||
@@ -662,6 +662,7 @@ void NativeWidgetMac::Show(ui::mojom::WindowShowState show_state,
|
||||
@@ -655,6 +655,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 85c36216bbadf..2f6b48b656102 100644
|
|||
break;
|
||||
case ui::mojom::WindowShowState::kEnd:
|
||||
diff --git ui/views/widget/widget.cc ui/views/widget/widget.cc
|
||||
index ed69823cc34d7..116588f1f9e45 100644
|
||||
index 75e3107153ea0..07b0037be4ecf 100644
|
||||
--- ui/views/widget/widget.cc
|
||||
+++ ui/views/widget/widget.cc
|
||||
@@ -423,7 +423,8 @@ void Widget::Init(InitParams params) {
|
||||
@@ -425,7 +425,8 @@ void Widget::Init(InitParams params) {
|
||||
}
|
||||
|
||||
params.child |= (params.type == InitParams::TYPE_CONTROL);
|
||||
|
@ -531,7 +531,7 @@ index ed69823cc34d7..116588f1f9e45 100644
|
|||
is_headless_ = params.ShouldInitAsHeadless();
|
||||
is_autosized_ = params.autosize;
|
||||
|
||||
@@ -530,9 +531,14 @@ void Widget::Init(InitParams params) {
|
||||
@@ -535,9 +536,14 @@ void Widget::Init(InitParams params) {
|
||||
|
||||
if (show_state == ui::mojom::WindowShowState::kMaximized) {
|
||||
Maximize();
|
||||
|
@ -545,8 +545,8 @@ index ed69823cc34d7..116588f1f9e45 100644
|
|||
+ Hide();
|
||||
}
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
@@ -546,7 +552,12 @@ void Widget::Init(InitParams params) {
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
@@ -551,7 +557,12 @@ void Widget::Init(InitParams params) {
|
||||
} else if (delegate) {
|
||||
SetContentsView(delegate->TransferOwnershipOfContentsView());
|
||||
if (should_set_initial_bounds) {
|
||||
|
@ -560,7 +560,7 @@ index ed69823cc34d7..116588f1f9e45 100644
|
|||
}
|
||||
}
|
||||
|
||||
@@ -1736,10 +1747,16 @@ void Widget::OnNativeWidgetParentChanged(gfx::NativeView parent) {
|
||||
@@ -1729,10 +1740,16 @@ void Widget::OnNativeWidgetParentChanged(gfx::NativeView parent) {
|
||||
}
|
||||
|
||||
gfx::Size Widget::GetMinimumSize() const {
|
||||
|
@ -577,7 +577,7 @@ index ed69823cc34d7..116588f1f9e45 100644
|
|||
return non_client_view_ ? non_client_view_->GetMaximumSize() : gfx::Size();
|
||||
}
|
||||
|
||||
@@ -1990,7 +2007,8 @@ bool Widget::SetInitialFocus(ui::mojom::WindowShowState show_state) {
|
||||
@@ -1984,7 +2001,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 ed69823cc34d7..116588f1f9e45 100644
|
|||
// focus when the window is restored.
|
||||
if (v)
|
||||
diff --git ui/views/widget/widget.h ui/views/widget/widget.h
|
||||
index 42c7ccb7a26f0..0483a550d415f 100644
|
||||
index 0510a8c1383bb..aa6ca922ce596 100644
|
||||
--- ui/views/widget/widget.h
|
||||
+++ ui/views/widget/widget.h
|
||||
@@ -366,6 +366,8 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
|
||||
@@ -368,6 +368,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 42c7ccb7a26f0..0483a550d415f 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
|
||||
@@ -779,7 +781,7 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
|
||||
@@ -768,7 +770,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 328cf96499fa2..879fb9820ee38 100644
|
||||
index 509bbf34ed99b..71c33ad95e880 100644
|
||||
--- ui/views/win/hwnd_message_handler.cc
|
||||
+++ ui/views/win/hwnd_message_handler.cc
|
||||
@@ -774,7 +774,11 @@ bool HWNDMessageHandler::IsVisible() const {
|
||||
@@ -773,7 +773,11 @@ bool HWNDMessageHandler::IsVisible() const {
|
||||
}
|
||||
|
||||
bool HWNDMessageHandler::IsActive() const {
|
||||
|
@ -655,7 +655,7 @@ index 328cf96499fa2..879fb9820ee38 100644
|
|||
}
|
||||
|
||||
bool HWNDMessageHandler::IsMinimized() const {
|
||||
@@ -3229,10 +3233,13 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
|
||||
@@ -3136,10 +3140,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.
|
||||
|
|
|
@ -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 050ff22c63d6a..f5f553df64bd4 100644
|
||||
index 1db2476ae1c2a..89fe45d2ec8f3 100644
|
||||
--- components/viz/service/BUILD.gn
|
||||
+++ components/viz/service/BUILD.gn
|
||||
@@ -264,6 +264,8 @@ viz_component("service") {
|
||||
@@ -268,6 +268,8 @@ viz_component("service") {
|
||||
"transitions/surface_animation_manager.h",
|
||||
"transitions/transferable_resource_tracker.cc",
|
||||
"transitions/transferable_resource_tracker.h",
|
||||
|
@ -93,7 +93,7 @@ index 050ff22c63d6a..f5f553df64bd4 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 87722045daafa..67c673ab71171 100644
|
||||
index 4be4660c007ee..a689ba262bb81 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 87722045daafa..67c673ab71171 100644
|
|||
#include "ui/base/ui_base_switches.h"
|
||||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
@@ -147,6 +149,20 @@ OutputSurfaceProviderImpl::CreateSoftwareOutputDeviceForPlatform(
|
||||
@@ -146,6 +148,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 7962a863f488a..bca9de4548799 100644
|
||||
index 793fe1b921b05..161ce2335c265 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 7962a863f488a..bca9de4548799 100644
|
|||
class GpuHostImpl;
|
||||
class HostFrameSinkManager;
|
||||
class HostGpuMemoryBufferManager;
|
||||
@@ -119,6 +120,8 @@ class COMPONENT_EXPORT(MOJO_CPP_BINDINGS) SyncCallRestrictions {
|
||||
@@ -125,6 +126,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 58da7f0697dd2..96e3f6358d9a4 100644
|
||||
index c0809410472cc..8d2f98b2ab577 100644
|
||||
--- ui/compositor/compositor.h
|
||||
+++ ui/compositor/compositor.h
|
||||
@@ -33,7 +33,9 @@
|
||||
@@ -32,7 +32,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 58da7f0697dd2..96e3f6358d9a4 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"
|
||||
@@ -141,6 +143,14 @@ class COMPOSITOR_EXPORT ContextFactory {
|
||||
@@ -140,6 +142,14 @@ class COMPOSITOR_EXPORT ContextFactory {
|
||||
virtual viz::HostFrameSinkManager* GetHostFrameSinkManager() = 0;
|
||||
};
|
||||
|
||||
|
@ -251,7 +251,7 @@ index 58da7f0697dd2..96e3f6358d9a4 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
|
||||
@@ -184,6 +194,9 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
|
||||
@@ -183,6 +193,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 58da7f0697dd2..96e3f6358d9a4 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
|
||||
@@ -563,6 +576,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
|
||||
@@ -562,6 +575,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
|
||||
simple_begin_frame_observers_;
|
||||
std::unique_ptr<ui::HostBeginFrameObserver> host_begin_frame_observer_;
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
diff --git content/browser/web_contents/web_contents_impl.cc content/browser/web_contents/web_contents_impl.cc
|
||||
index f25b2cc6c138a..75d0f1d479668 100644
|
||||
index c93722f2fc534..aa48180f8e470 100644
|
||||
--- content/browser/web_contents/web_contents_impl.cc
|
||||
+++ content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -3651,6 +3651,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
|
||||
@@ -3754,6 +3754,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 f25b2cc6c138a..75d0f1d479668 100644
|
|||
std::unique_ptr<WebContentsViewDelegate> delegate =
|
||||
GetContentClient()->browser()->GetWebContentsViewDelegate(this);
|
||||
|
||||
@@ -3661,6 +3667,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
|
||||
@@ -3764,6 +3770,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
|
||||
view_ = CreateWebContentsView(this, std::move(delegate),
|
||||
&render_view_host_delegate_view_);
|
||||
}
|
||||
|
@ -23,17 +23,17 @@ index f25b2cc6c138a..75d0f1d479668 100644
|
|||
CHECK(render_view_host_delegate_view_);
|
||||
CHECK(view_.get());
|
||||
|
||||
@@ -3858,6 +3865,9 @@ void WebContentsImpl::RenderWidgetCreated(
|
||||
OPTIONAL_TRACE_EVENT1("content", "WebContentsImpl::RenderWidgetCreated",
|
||||
@@ -3962,6 +3969,9 @@ void WebContentsImpl::RenderWidgetCreated(
|
||||
"render_widget_host", render_widget_host);
|
||||
created_widgets_.insert(render_widget_host);
|
||||
CHECK(!created_widgets_.contains(render_widget_host->GetFrameSinkId()));
|
||||
created_widgets_[render_widget_host->GetFrameSinkId()] = render_widget_host;
|
||||
+
|
||||
+ observers_.NotifyObservers(
|
||||
+ &WebContentsObserver::RenderWidgetCreated, render_widget_host);
|
||||
}
|
||||
|
||||
void WebContentsImpl::RenderWidgetDeleted(
|
||||
@@ -4741,6 +4751,15 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
@@ -4847,6 +4857,15 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
create_params.picture_in_picture_options = *(params.pip_options);
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,7 @@ index f25b2cc6c138a..75d0f1d479668 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.
|
||||
@@ -9156,6 +9175,9 @@ void WebContentsImpl::SetFocusedFrame(FrameTreeNode* node,
|
||||
@@ -9305,6 +9324,9 @@ void WebContentsImpl::SetFocusedFrame(FrameTreeNode* node,
|
||||
}
|
||||
|
||||
CloseListenerManager::DidChangeFocusedFrame(this);
|
||||
|
@ -60,11 +60,11 @@ index f25b2cc6c138a..75d0f1d479668 100644
|
|||
|
||||
FrameTree* WebContentsImpl::GetOwnedPictureInPictureFrameTree() {
|
||||
diff --git content/public/browser/web_contents.h content/public/browser/web_contents.h
|
||||
index 09099f8ba7b05..7f4ef83efa8af 100644
|
||||
index 825e0d9d641bf..13954b3f5b45c 100644
|
||||
--- content/public/browser/web_contents.h
|
||||
+++ content/public/browser/web_contents.h
|
||||
@@ -110,10 +110,12 @@ class BrowserContext;
|
||||
class BrowserPluginGuestDelegate;
|
||||
@@ -111,10 +111,12 @@ class BrowserPluginGuestDelegate;
|
||||
class GuestPageHolder;
|
||||
class RenderFrameHost;
|
||||
class RenderViewHost;
|
||||
+class RenderViewHostDelegateView;
|
||||
|
@ -76,7 +76,7 @@ index 09099f8ba7b05..7f4ef83efa8af 100644
|
|||
class WebUI;
|
||||
struct DropData;
|
||||
struct MHTMLGenerationParams;
|
||||
@@ -259,6 +261,10 @@ class WebContents : public PageNavigator, public base::SupportsUserData {
|
||||
@@ -275,6 +277,10 @@ class WebContents : public PageNavigator, public base::SupportsUserData {
|
||||
network::mojom::WebSandboxFlags starting_sandbox_flags =
|
||||
network::mojom::WebSandboxFlags::kNone;
|
||||
|
||||
|
@ -88,10 +88,10 @@ index 09099f8ba7b05..7f4ef83efa8af 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 19dff7ea3f62e..af796b114b3e1 100644
|
||||
index 77ee6ba6c65c9..59f7c8cc58b60 100644
|
||||
--- content/public/browser/web_contents_delegate.h
|
||||
+++ content/public/browser/web_contents_delegate.h
|
||||
@@ -65,9 +65,11 @@ class EyeDropperListener;
|
||||
@@ -67,9 +67,11 @@ class EyeDropperListener;
|
||||
class FileSelectListener;
|
||||
class JavaScriptDialogManager;
|
||||
class RenderFrameHost;
|
||||
|
@ -103,7 +103,7 @@ index 19dff7ea3f62e..af796b114b3e1 100644
|
|||
struct ContextMenuParams;
|
||||
struct DropData;
|
||||
struct MediaPlayerWatchTime;
|
||||
@@ -366,6 +368,14 @@ class CONTENT_EXPORT WebContentsDelegate {
|
||||
@@ -368,6 +370,14 @@ class CONTENT_EXPORT WebContentsDelegate {
|
||||
const StoragePartitionConfig& partition_config,
|
||||
SessionStorageNamespace* session_storage_namespace);
|
||||
|
||||
|
@ -119,10 +119,10 @@ index 19dff7ea3f62e..af796b114b3e1 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 58e3918a83b1a..d5e94d504bb2f 100644
|
||||
index 0379a5ca835e3..950c4a8d8e508 100644
|
||||
--- content/public/browser/web_contents_observer.h
|
||||
+++ content/public/browser/web_contents_observer.h
|
||||
@@ -255,6 +255,9 @@ class CONTENT_EXPORT WebContentsObserver : public base::CheckedObserver {
|
||||
@@ -244,6 +244,9 @@ class CONTENT_EXPORT WebContentsObserver : public base::CheckedObserver {
|
||||
// controlled by the capturing tab.
|
||||
virtual void OnCapturedSurfaceControl() {}
|
||||
|
||||
|
@ -132,7 +132,7 @@ index 58e3918a83b1a..d5e94d504bb2f 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() {}
|
||||
@@ -922,6 +925,10 @@ class CONTENT_EXPORT WebContentsObserver : public base::CheckedObserver {
|
||||
@@ -917,6 +920,10 @@ class CONTENT_EXPORT WebContentsObserver : public base::CheckedObserver {
|
||||
// WebContents has gained/lost focus.
|
||||
virtual void OnFocusChangedInPage(FocusedNodeDetails* details) {}
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
diff --git third_party/blink/public/platform/platform.h third_party/blink/public/platform/platform.h
|
||||
index 700e93a9ed053..9d5d1f67adb07 100644
|
||||
index f2be7de2e13b7..4708b9ee705b3 100644
|
||||
--- third_party/blink/public/platform/platform.h
|
||||
+++ third_party/blink/public/platform/platform.h
|
||||
@@ -810,6 +810,11 @@ class BLINK_PLATFORM_EXPORT Platform {
|
||||
@@ -812,6 +812,11 @@ class BLINK_PLATFORM_EXPORT Platform {
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -13,9 +13,9 @@ index 700e93a9ed053..9d5d1f67adb07 100644
|
|||
+
|
||||
private:
|
||||
static void InitializeMainThreadCommon(
|
||||
Platform* platform,
|
||||
std::unique_ptr<MainThread> main_thread);
|
||||
diff --git third_party/blink/renderer/core/inspector/devtools_session.cc third_party/blink/renderer/core/inspector/devtools_session.cc
|
||||
index bc9094123bfcf..021cb3cfdefb1 100644
|
||||
index 128bb7d84c392..dd4f22aee9a52 100644
|
||||
--- third_party/blink/renderer/core/inspector/devtools_session.cc
|
||||
+++ third_party/blink/renderer/core/inspector/devtools_session.cc
|
||||
@@ -16,6 +16,7 @@
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
diff --git third_party/blink/public/web/web_view.h third_party/blink/public/web/web_view.h
|
||||
index 746af7113a66d..63346d59fe411 100644
|
||||
index 083af135d890c..799ef161a493a 100644
|
||||
--- third_party/blink/public/web/web_view.h
|
||||
+++ third_party/blink/public/web/web_view.h
|
||||
@@ -341,6 +341,7 @@ class BLINK_EXPORT WebView {
|
||||
@@ -344,6 +344,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 746af7113a66d..63346d59fe411 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 b5281ba471641..f5704e97f557e 100644
|
||||
index f5fe2e0614486..58d48b08dec6d 100644
|
||||
--- third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
+++ third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
@@ -253,8 +253,13 @@ void WebView::SetUseExternalPopupMenus(bool use_external_popup_menus) {
|
||||
@@ -257,8 +257,13 @@ void WebView::SetUseExternalPopupMenus(bool use_external_popup_menus) {
|
||||
g_should_use_external_popup_menus = use_external_popup_menus;
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,7 @@ index b5281ba471641..f5704e97f557e 100644
|
|||
}
|
||||
|
||||
namespace {
|
||||
@@ -616,6 +621,7 @@ WebViewImpl::WebViewImpl(
|
||||
@@ -617,6 +622,7 @@ WebViewImpl::WebViewImpl(
|
||||
blink::ZoomFactorToZoomLevel(kMinimumBrowserZoomFactor)),
|
||||
maximum_zoom_level_(
|
||||
blink::ZoomFactorToZoomLevel(kMaximumBrowserZoomFactor)),
|
||||
|
@ -39,7 +39,7 @@ index b5281ba471641..f5704e97f557e 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 e85443e4492d3..228fe7496b6d2 100644
|
||||
index d5397c53559ba..ae75834087808 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 e85443e4492d3..228fe7496b6d2 100644
|
|||
|
||||
// Returns whether frames under this WebView are backed by a compositor.
|
||||
bool does_composite() const { return does_composite_; }
|
||||
@@ -873,6 +874,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
||||
@@ -877,6 +878,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 e85443e4492d3..228fe7496b6d2 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 81d3ec54e4dae..0fa937e36579a 100644
|
||||
index 9326028540aae..6f2eb37355383 100644
|
||||
--- third_party/blink/renderer/core/page/chrome_client_impl.cc
|
||||
+++ third_party/blink/renderer/core/page/chrome_client_impl.cc
|
||||
@@ -973,7 +973,7 @@ PopupMenu* ChromeClientImpl::OpenPopupMenu(LocalFrame& frame,
|
||||
@@ -971,7 +971,7 @@ PopupMenu* ChromeClientImpl::OpenPopupMenu(LocalFrame& frame,
|
||||
HTMLSelectElement& select) {
|
||||
NotifyPopupOpeningObservers();
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ index db8209bbcc214..b50bce7fae5b5 100644
|
|||
HICON GetSmallAppIcon();
|
||||
|
||||
diff --git chrome/common/chrome_constants.cc chrome/common/chrome_constants.cc
|
||||
index ba30144d3e7be..ec2d3c5e7298c 100644
|
||||
index 298138e77b9f6..cce479212b682 100644
|
||||
--- chrome/common/chrome_constants.cc
|
||||
+++ chrome/common/chrome_constants.cc
|
||||
@@ -6,6 +6,7 @@
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git sandbox/policy/win/sandbox_win.cc sandbox/policy/win/sandbox_win.cc
|
||||
index b550651a8a981..f5664314075dc 100644
|
||||
index 5f5857379ad34..1de09e19a2350 100644
|
||||
--- sandbox/policy/win/sandbox_win.cc
|
||||
+++ sandbox/policy/win/sandbox_win.cc
|
||||
@@ -963,6 +963,17 @@ ResultCode SandboxWin::StartSandboxedProcess(
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git base/time/time.h base/time/time.h
|
||||
index 09bf6df3f8301..a389b92b49be7 100644
|
||||
index 36b7d12bf5b8e..6b07c2bb11b4c 100644
|
||||
--- base/time/time.h
|
||||
+++ base/time/time.h
|
||||
@@ -134,6 +134,13 @@ constexpr bool isnan(double d) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git sandbox/win/src/sandbox_policy.h sandbox/win/src/sandbox_policy.h
|
||||
index 70c3179ee66ff..9493ee22c541e 100644
|
||||
index 17699e60e60be..53658b54f4fa7 100644
|
||||
--- sandbox/win/src/sandbox_policy.h
|
||||
+++ sandbox/win/src/sandbox_policy.h
|
||||
@@ -282,7 +282,7 @@ class [[clang::lto_visibility_public]] TargetPolicy {
|
||||
|
@ -12,7 +12,7 @@ index 70c3179ee66ff..9493ee22c541e 100644
|
|||
|
||||
} // namespace sandbox
|
||||
diff --git sandbox/win/src/sandbox_policy_base.cc sandbox/win/src/sandbox_policy_base.cc
|
||||
index 1c8ae730e5dd3..5d04f11a770c5 100644
|
||||
index bb144af1a7e12..2a05c5a62c941 100644
|
||||
--- sandbox/win/src/sandbox_policy_base.cc
|
||||
+++ sandbox/win/src/sandbox_policy_base.cc
|
||||
@@ -194,12 +194,12 @@ PolicyGlobal* ConfigBase::policy() {
|
||||
|
@ -49,10 +49,10 @@ index 1c8ae730e5dd3..5d04f11a770c5 100644
|
|||
// Can only set this once - as there is only one region sent to the child.
|
||||
CHECK(!delegate_data_);
|
||||
diff --git sandbox/win/src/sandbox_policy_base.h sandbox/win/src/sandbox_policy_base.h
|
||||
index 291dea81a1b18..1850dd502d74b 100644
|
||||
index af905fba23ac1..cba2426b098a8 100644
|
||||
--- sandbox/win/src/sandbox_policy_base.h
|
||||
+++ sandbox/win/src/sandbox_policy_base.h
|
||||
@@ -120,7 +120,7 @@ class ConfigBase final : public TargetConfig {
|
||||
@@ -117,7 +117,7 @@ class ConfigBase final : public TargetConfig {
|
||||
|
||||
// Should only be called once the object is configured.
|
||||
PolicyGlobal* policy();
|
||||
|
@ -61,7 +61,7 @@ index 291dea81a1b18..1850dd502d74b 100644
|
|||
std::vector<std::wstring>& blocklisted_dlls();
|
||||
AppContainerBase* app_container();
|
||||
IntegrityLevel integrity_level() { return integrity_level_; }
|
||||
@@ -175,7 +175,7 @@ class PolicyBase final : public TargetPolicy {
|
||||
@@ -172,7 +172,7 @@ class PolicyBase final : public TargetPolicy {
|
||||
ResultCode SetStdoutHandle(HANDLE handle) override;
|
||||
ResultCode SetStderrHandle(HANDLE handle) override;
|
||||
void AddHandleToShare(HANDLE handle) override;
|
||||
|
@ -70,7 +70,7 @@ index 291dea81a1b18..1850dd502d74b 100644
|
|||
|
||||
// Creates a Job object with the level specified in a previous call to
|
||||
// SetJobLevel().
|
||||
@@ -239,13 +239,13 @@ class PolicyBase final : public TargetPolicy {
|
||||
@@ -236,13 +236,13 @@ class PolicyBase final : public TargetPolicy {
|
||||
// time.
|
||||
|
||||
// Returns nullopt if no data has been set, or a view into the data.
|
||||
|
|
|
@ -249,9 +249,10 @@ void RootWindowManager::OtherBrowserClosed(int browser_id,
|
|||
|
||||
// Track ownership of popup browsers that don't have a RootWindow.
|
||||
if (opener_browser_id > 0) {
|
||||
DCHECK(other_browser_owners_.contains(opener_browser_id));
|
||||
DCHECK(other_browser_owners_.find(opener_browser_id) !=
|
||||
other_browser_owners_.end());
|
||||
auto& child_set = other_browser_owners_[opener_browser_id];
|
||||
DCHECK(child_set.contains(browser_id));
|
||||
DCHECK(child_set.find(browser_id) != child_set.end());
|
||||
child_set.erase(browser_id);
|
||||
if (child_set.empty()) {
|
||||
other_browser_owners_.erase(opener_browser_id);
|
||||
|
@ -313,7 +314,8 @@ void RootWindowManager::OnAbortOrClosePopup(int opener_browser_id,
|
|||
|
||||
// Close all other associated popups if the opener is closing. These popups
|
||||
// don't have a RootWindow (e.g. when running with `--use-default-popup`).
|
||||
if (popup_id < 0 && other_browser_owners_.contains(opener_browser_id)) {
|
||||
if (popup_id < 0 && other_browser_owners_.find(opener_browser_id) !=
|
||||
other_browser_owners_.end()) {
|
||||
// Use a copy as the original set may be modified in OtherBrowserClosed
|
||||
// while iterating.
|
||||
auto set = other_browser_owners_[opener_browser_id];
|
||||
|
|
|
@ -357,13 +357,11 @@ namespace {
|
|||
|
||||
class RedirectMismatchedFromHandlerTest : public CertificateErrorTest {
|
||||
public:
|
||||
RedirectMismatchedFromHandlerTest(bool continue_invalid_certificate,
|
||||
bool redirect_from_https)
|
||||
RedirectMismatchedFromHandlerTest(bool continue_invalid_certificate)
|
||||
: CertificateErrorTest(
|
||||
/*cert_type=*/CEF_TEST_CERT_OK_DOMAIN,
|
||||
/*expect_load_success=*/continue_invalid_certificate,
|
||||
/*expect_certificate_error=*/true),
|
||||
redirect_from_https_(redirect_from_https) {}
|
||||
/*expect_certificate_error=*/true) {}
|
||||
|
||||
CefRefPtr<CefResourceHandler> GetResourceHandler(
|
||||
CefRefPtr<CefBrowser> browser,
|
||||
|
@ -384,8 +382,7 @@ class RedirectMismatchedFromHandlerTest : public CertificateErrorTest {
|
|||
|
||||
protected:
|
||||
std::string GetStartURL() const override {
|
||||
return redirect_from_https_ ? "https://certificate-test.com/index.html"
|
||||
: "http://certificate-test.com/index.html";
|
||||
return "https://certificate-test.com/index.html";
|
||||
}
|
||||
|
||||
std::string GetEndURL() const override {
|
||||
|
@ -393,9 +390,6 @@ class RedirectMismatchedFromHandlerTest : public CertificateErrorTest {
|
|||
return client::AsciiStrReplace(server_origin(), "localhost", "127.0.0.1") +
|
||||
"/index.html";
|
||||
}
|
||||
|
||||
private:
|
||||
const bool redirect_from_https_;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
@ -403,8 +397,7 @@ class RedirectMismatchedFromHandlerTest : public CertificateErrorTest {
|
|||
TEST(CertificateErrorTest, RedirectMismatchedFromHttpsResourceCancel) {
|
||||
CefRefPtr<RedirectMismatchedFromHandlerTest> handler =
|
||||
new RedirectMismatchedFromHandlerTest(
|
||||
/*continue_invalid_certificate=*/false,
|
||||
/*redirect_from_https=*/true);
|
||||
/*continue_invalid_certificate=*/false);
|
||||
handler->ExecuteTest();
|
||||
ReleaseAndWaitForDestructor(handler);
|
||||
}
|
||||
|
@ -412,26 +405,7 @@ TEST(CertificateErrorTest, RedirectMismatchedFromHttpsResourceCancel) {
|
|||
TEST(CertificateErrorTest, RedirectMismatchedFromHttpsResourceContinue) {
|
||||
CefRefPtr<RedirectMismatchedFromHandlerTest> handler =
|
||||
new RedirectMismatchedFromHandlerTest(
|
||||
/*continue_invalid_certificate=*/true,
|
||||
/*redirect_from_https=*/true);
|
||||
handler->ExecuteTest();
|
||||
ReleaseAndWaitForDestructor(handler);
|
||||
}
|
||||
|
||||
TEST(CertificateErrorTest, RedirectMismatchedFromHttpResourceCancel) {
|
||||
CefRefPtr<RedirectMismatchedFromHandlerTest> handler =
|
||||
new RedirectMismatchedFromHandlerTest(
|
||||
/*continue_invalid_certificate=*/false,
|
||||
/*redirect_from_https=*/false);
|
||||
handler->ExecuteTest();
|
||||
ReleaseAndWaitForDestructor(handler);
|
||||
}
|
||||
|
||||
TEST(CertificateErrorTest, RedirectMismatchedFromHttpResourceContinue) {
|
||||
CefRefPtr<RedirectMismatchedFromHandlerTest> handler =
|
||||
new RedirectMismatchedFromHandlerTest(
|
||||
/*continue_invalid_certificate=*/true,
|
||||
/*redirect_from_https=*/false);
|
||||
/*continue_invalid_certificate=*/true);
|
||||
handler->ExecuteTest();
|
||||
ReleaseAndWaitForDestructor(handler);
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
// can be found in the LICENSE file.
|
||||
|
||||
#include "include/base/cef_callback.h"
|
||||
#include "include/test/cef_test_helpers.h"
|
||||
#include "include/wrapper/cef_closure_task.h"
|
||||
#include "tests/ceftests/test_handler.h"
|
||||
#include "tests/ceftests/test_server.h"
|
||||
|
@ -178,6 +179,10 @@ class HSTSRedirectTest : public TestHandler {
|
|||
// explicit port component that is not equal to "80", the port component
|
||||
// value MUST be preserved; otherwise, if the URI does not contain an
|
||||
// explicit port component, the UA MUST NOT add one.
|
||||
//
|
||||
// This behavior is changed in M132 with
|
||||
// https://issues.chromium.org/issues/41251622.
|
||||
if (!CefIsFeatureEnabledForTests("IgnoreHSTSForLocalhost")) {
|
||||
const std::string& expected_https_url =
|
||||
client::AsciiStrReplace(http_url_, "http:", "https:");
|
||||
EXPECT_STREQ(expected_https_url.c_str(), new_url.ToString().c_str())
|
||||
|
@ -187,6 +192,7 @@ class HSTSRedirectTest : public TestHandler {
|
|||
new_url = https_url_;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void OnLoadEnd(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame,
|
||||
|
|
|
@ -544,10 +544,6 @@ def GetConfigArgsSandbox(platform, args, is_debug, cpu):
|
|||
# Enable base target customizations necessary for distribution of the
|
||||
# cef_sandbox static library.
|
||||
'is_cef_sandbox_build': True,
|
||||
|
||||
# Disable use of rust for JSON parsing. This avoids a dependency on
|
||||
# rust libraries.
|
||||
'enable_rust_json': False,
|
||||
}
|
||||
|
||||
if platform == 'windows':
|
||||
|
|
Loading…
Reference in New Issue