mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Compare commits
28 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
15882fefc4 | ||
|
1ac1b149e5 | ||
|
723b52b57d | ||
|
89c0a8c39a | ||
|
6b7eacfcc7 | ||
|
4ff4593bfc | ||
|
4dec9aa6f2 | ||
|
1390ca425c | ||
|
928a900850 | ||
|
8f7877b8b0 | ||
|
2cad7c4842 | ||
|
ecce29f1ee | ||
|
d746017d7c | ||
|
06288b535e | ||
|
c0df792f3b | ||
|
68b0feea6d | ||
|
e7320793b6 | ||
|
ef82e430b4 | ||
|
70ea6f589f | ||
|
5b18ca7d3f | ||
|
b2f5ab6cd2 | ||
|
0bf995ae26 | ||
|
49ac6882ec | ||
|
8cf30843f9 | ||
|
e88e98f061 | ||
|
8fa5244adb | ||
|
aa4734b714 | ||
|
f72afb713a |
1
BUILD.gn
1
BUILD.gn
@@ -839,6 +839,7 @@ source_set("libcef_static") {
|
||||
"libcef/common/values_impl.h",
|
||||
"libcef/common/waitable_event_impl.cc",
|
||||
"libcef/common/waitable_event_impl.h",
|
||||
"libcef/renderer/browser_config.h",
|
||||
"libcef/renderer/browser_impl.cc",
|
||||
"libcef/renderer/browser_impl.h",
|
||||
"libcef/renderer/chrome/chrome_content_renderer_client_cef.cc",
|
||||
|
@@ -7,6 +7,6 @@
|
||||
# https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
|
||||
|
||||
{
|
||||
'chromium_checkout': 'refs/tags/135.0.7049.115',
|
||||
'depot_tools_checkout': '6678906cf8'
|
||||
'chromium_checkout': 'refs/tags/136.0.7103.114',
|
||||
'depot_tools_checkout': 'c9fe205c66'
|
||||
}
|
||||
|
@@ -47,8 +47,20 @@
|
||||
"linux": "5b7c2284ed2542cf6212981d62ca9122fb2a4e88",
|
||||
"mac": "9862177631e8059a497d6086058168dd47477ab7",
|
||||
"windows": "3e78b6fe5fd31d69049499450849ada17a720a53"
|
||||
},
|
||||
"13600": {
|
||||
"comment": "Added April 07, 2025.",
|
||||
"linux": "eb353ba7b8b9bcbef890217971cd8ec41efeaa75",
|
||||
"mac": "22c77d1f2305de8a6147f14e52f074b4a4e5222c",
|
||||
"windows": "a8832519b4eb058567d68b65be1e1c9e80aae566"
|
||||
},
|
||||
"13601": {
|
||||
"comment": "Added April 22, 2025.",
|
||||
"linux": "40b224f295a20694241c5db49721bc90a3796f30",
|
||||
"mac": "ff885fe921f9eae1a5ce6a71b30b0c37b306bf56",
|
||||
"windows": "116a4153047ee1ee67f17fc938f084ee72b24e54"
|
||||
}
|
||||
},
|
||||
"last": "13500",
|
||||
"last": "13601",
|
||||
"min": "13300"
|
||||
}
|
@@ -1271,7 +1271,11 @@ typedef enum {
|
||||
PDE_TYPE_BYTES,
|
||||
PDE_TYPE_FILE,
|
||||
|
||||
#if CEF_API_ADDED(13601)
|
||||
PDE_TYPE_NUM_VALUES,
|
||||
#else
|
||||
PDF_TYPE_NUM_VALUES,
|
||||
#endif
|
||||
} cef_postdataelement_type_t;
|
||||
|
||||
///
|
||||
@@ -3634,8 +3638,13 @@ typedef enum {
|
||||
///
|
||||
typedef enum {
|
||||
CEF_CTBT_CAST,
|
||||
#if CEF_API_REMOVED(13600)
|
||||
CEF_CTBT_DOWNLOAD,
|
||||
CEF_CTBT_SEND_TAB_TO_SELF,
|
||||
#else
|
||||
CEF_CTBT_DOWNLOAD_DEPRECATED,
|
||||
CEF_CTBT_SEND_TAB_TO_SELF_DEPRECATED,
|
||||
#endif
|
||||
CEF_CTBT_SIDE_PANEL,
|
||||
CEF_CTBT_NUM_VALUES,
|
||||
} cef_chrome_toolbar_button_type_t;
|
||||
@@ -3788,6 +3797,9 @@ typedef enum {
|
||||
CEF_PERMISSION_TYPE_WEB_APP_INSTALLATION = 1 << 22,
|
||||
CEF_PERMISSION_TYPE_WINDOW_MANAGEMENT = 1 << 23,
|
||||
CEF_PERMISSION_TYPE_FILE_SYSTEM_ACCESS = 1 << 24,
|
||||
#if CEF_API_ADDED(13600)
|
||||
CEF_PERMISSION_TYPE_LOCAL_NETWORK_ACCESS = 1 << 25,
|
||||
#endif
|
||||
} cef_permission_request_types_t;
|
||||
|
||||
///
|
||||
|
@@ -387,7 +387,11 @@ typedef enum {
|
||||
/// ALLOW (default): no effect (e.g. third-party cookies allowed, if not
|
||||
/// blocked otherwise).
|
||||
/// BLOCK: third-party cookies blocked, but 3PCD mitigations enabled.
|
||||
#if CEF_API_ADDED(13601)
|
||||
CEF_CONTENT_SETTING_TYPE_TOP_LEVEL_TPCD_ORIGIN_TRIAL,
|
||||
#else
|
||||
CEF_CONTENT_SETTING_TOP_LEVEL_TPCD_ORIGIN_TRIAL,
|
||||
#endif
|
||||
|
||||
/// Content setting used to indicate whether entering picture-in-picture
|
||||
/// automatically should be enabled.
|
||||
@@ -501,6 +505,12 @@ typedef enum {
|
||||
CEF_CONTENT_SETTING_TYPE_REVOKED_DISRUPTIVE_NOTIFICATION_PERMISSIONS,
|
||||
#endif
|
||||
|
||||
#if CEF_API_ADDED(13600)
|
||||
/// Content setting for whether the site is allowed to make local network
|
||||
/// requests.
|
||||
CEF_CONTENT_SETTING_TYPE_LOCAL_NETWORK_ACCESS,
|
||||
#endif
|
||||
|
||||
CEF_CONTENT_SETTING_TYPE_NUM_VALUES,
|
||||
} cef_content_setting_types_t;
|
||||
|
||||
|
@@ -38,6 +38,7 @@
|
||||
#define CEF_INCLUDE_VIEWS_CEF_BROWSER_VIEW_DELEGATE_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_api_hash.h"
|
||||
#include "include/cef_client.h"
|
||||
#include "include/views/cef_view_delegate.h"
|
||||
|
||||
@@ -129,6 +130,18 @@ class CefBrowserViewDelegate : public CefViewDelegate {
|
||||
return false;
|
||||
}
|
||||
|
||||
#if CEF_API_ADDED(13601)
|
||||
///
|
||||
/// Return true to allow the use of JavaScript moveTo/By() and resizeTo/By()
|
||||
/// (without user activation) with Document picture-in-picture popups.
|
||||
///
|
||||
/*--cef(added=13601)--*/
|
||||
virtual bool AllowMoveForPictureInPicture(
|
||||
CefRefPtr<CefBrowserView> browser_view) {
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
///
|
||||
/// Called when |browser_view| receives a gesture command. Return true to
|
||||
/// handle (or disable) a |gesture_command| or false to propagate the gesture
|
||||
|
@@ -117,8 +117,7 @@ CefRefPtr<AlloyBrowserHostImpl> AlloyBrowserHostImpl::Create(
|
||||
|
||||
scoped_refptr<CefBrowserInfo> info =
|
||||
CefBrowserInfoManager::GetInstance()->CreateBrowserInfo(
|
||||
/*is_devtools_popup=*/false, platform_delegate->IsWindowless(),
|
||||
platform_delegate->IsPrintPreviewSupported(),
|
||||
/*is_devtools_popup=*/false, platform_delegate->GetBrowserConfig(),
|
||||
create_params.extra_info);
|
||||
|
||||
bool own_web_contents = false;
|
||||
@@ -132,8 +131,7 @@ CefRefPtr<AlloyBrowserHostImpl> AlloyBrowserHostImpl::Create(
|
||||
|
||||
CefRefPtr<AlloyBrowserHostImpl> browser =
|
||||
CreateInternal(create_params.settings, create_params.client, web_contents,
|
||||
own_web_contents, info,
|
||||
/*opener=*/nullptr, /*is_devtools_popup=*/false,
|
||||
own_web_contents, info, /*opener=*/nullptr,
|
||||
request_context_impl, std::move(platform_delegate));
|
||||
if (!browser) {
|
||||
return nullptr;
|
||||
@@ -160,7 +158,6 @@ CefRefPtr<AlloyBrowserHostImpl> AlloyBrowserHostImpl::CreateInternal(
|
||||
bool own_web_contents,
|
||||
scoped_refptr<CefBrowserInfo> browser_info,
|
||||
CefRefPtr<AlloyBrowserHostImpl> opener,
|
||||
bool is_devtools_popup,
|
||||
CefRefPtr<CefRequestContextImpl> request_context,
|
||||
std::unique_ptr<CefBrowserPlatformDelegate> platform_delegate) {
|
||||
CEF_REQUIRE_UIT();
|
||||
@@ -185,7 +182,7 @@ CefRefPtr<AlloyBrowserHostImpl> AlloyBrowserHostImpl::CreateInternal(
|
||||
// new browser's platform delegate.
|
||||
opener->platform_delegate_->PopupWebContentsCreated(
|
||||
settings, client, web_contents, platform_delegate.get(),
|
||||
is_devtools_popup);
|
||||
/*is_devtools=*/false);
|
||||
}
|
||||
|
||||
// Take ownership of |web_contents| if |own_web_contents| is true.
|
||||
@@ -208,7 +205,7 @@ CefRefPtr<AlloyBrowserHostImpl> AlloyBrowserHostImpl::CreateInternal(
|
||||
// result in a call to CefBrowserViewDelegate::OnPopupBrowserViewCreated().
|
||||
// Do this first for consistency with Chrome style.
|
||||
opener->platform_delegate_->PopupBrowserCreated(
|
||||
browser->platform_delegate(), browser.get(), is_devtools_popup);
|
||||
browser->platform_delegate(), browser.get(), /*is_devtools=*/false);
|
||||
}
|
||||
|
||||
// 2. Notify the browser's LifeSpanHandler. This must always be the first
|
||||
@@ -1121,8 +1118,7 @@ void AlloyBrowserHostImpl::WebContentsCreated(
|
||||
|
||||
scoped_refptr<CefBrowserInfo> info =
|
||||
CefBrowserInfoManager::GetInstance()->CreatePopupBrowserInfo(
|
||||
new_contents, platform_delegate->IsWindowless(),
|
||||
platform_delegate->IsPrintPreviewSupported(), extra_info);
|
||||
new_contents, platform_delegate->GetBrowserConfig(), extra_info);
|
||||
CHECK(info.get());
|
||||
CHECK(info->is_popup());
|
||||
|
||||
@@ -1140,8 +1136,7 @@ void AlloyBrowserHostImpl::WebContentsCreated(
|
||||
// However, we need to install observers/delegates here.
|
||||
CefRefPtr<AlloyBrowserHostImpl> browser = CreateInternal(
|
||||
settings, client, new_contents, /*own_web_contents=*/false, info, opener,
|
||||
/*is_devtools_popup=*/false, request_context,
|
||||
std::move(platform_delegate));
|
||||
request_context, std::move(platform_delegate));
|
||||
}
|
||||
|
||||
void AlloyBrowserHostImpl::RendererUnresponsive(
|
||||
|
@@ -298,7 +298,6 @@ class AlloyBrowserHostImpl : public CefBrowserHostBase,
|
||||
bool own_web_contents,
|
||||
scoped_refptr<CefBrowserInfo> browser_info,
|
||||
CefRefPtr<AlloyBrowserHostImpl> opener,
|
||||
bool is_devtools_popup,
|
||||
CefRefPtr<CefRequestContextImpl> request_context,
|
||||
std::unique_ptr<CefBrowserPlatformDelegate> platform_delegate);
|
||||
|
||||
|
@@ -74,7 +74,7 @@ CefAudioCapturer::CefAudioCapturer(const CefAudioParameters& params,
|
||||
DCHECK(browser_->web_contents());
|
||||
|
||||
channels_ = audio_params.channels();
|
||||
audio_input_device_ = new media::AudioInputDevice(
|
||||
audio_input_device_ = base::MakeRefCounted<media::AudioInputDevice>(
|
||||
std::make_unique<mirroring::CapturedAudioInput>(
|
||||
base::BindRepeating(&StreamCreatorHelper,
|
||||
base::Unretained(browser_->web_contents()),
|
||||
|
@@ -28,13 +28,11 @@ CefBrowserInfo::FrameInfo::~FrameInfo() {
|
||||
|
||||
CefBrowserInfo::CefBrowserInfo(int browser_id,
|
||||
bool is_popup,
|
||||
bool is_windowless,
|
||||
bool print_preview_enabled,
|
||||
const cef::BrowserConfig& config,
|
||||
CefRefPtr<CefDictionaryValue> extra_info)
|
||||
: browser_id_(browser_id),
|
||||
is_popup_(is_popup),
|
||||
is_windowless_(is_windowless),
|
||||
print_preview_enabled_(print_preview_enabled),
|
||||
config_(config),
|
||||
extra_info_(extra_info) {
|
||||
DCHECK_GT(browser_id, 0);
|
||||
|
||||
|
@@ -19,6 +19,7 @@
|
||||
#include "base/values.h"
|
||||
#include "cef/include/internal/cef_ptr.h"
|
||||
#include "cef/libcef/common/values_impl.h"
|
||||
#include "cef/libcef/renderer/browser_config.h"
|
||||
#include "content/public/browser/global_routing_id.h"
|
||||
#include "content/public/browser/render_frame_host.h"
|
||||
|
||||
@@ -36,8 +37,7 @@ class CefBrowserInfo : public base::RefCountedThreadSafe<CefBrowserInfo> {
|
||||
public:
|
||||
CefBrowserInfo(int browser_id,
|
||||
bool is_popup,
|
||||
bool is_windowless,
|
||||
bool print_preview_enabled,
|
||||
const cef::BrowserConfig& config,
|
||||
CefRefPtr<CefDictionaryValue> extra_info);
|
||||
|
||||
CefBrowserInfo(const CefBrowserInfo&) = delete;
|
||||
@@ -45,8 +45,7 @@ class CefBrowserInfo : public base::RefCountedThreadSafe<CefBrowserInfo> {
|
||||
|
||||
int browser_id() const { return browser_id_; }
|
||||
bool is_popup() const { return is_popup_; }
|
||||
bool is_windowless() const { return is_windowless_; }
|
||||
bool print_preview_enabled() const { return print_preview_enabled_; }
|
||||
const cef::BrowserConfig& config() const { return config_; }
|
||||
CefRefPtr<CefDictionaryValue> extra_info() const { return extra_info_; }
|
||||
|
||||
// May return nullptr if the browser has not yet been created (before
|
||||
@@ -202,8 +201,7 @@ class CefBrowserInfo : public base::RefCountedThreadSafe<CefBrowserInfo> {
|
||||
|
||||
const int browser_id_;
|
||||
const bool is_popup_;
|
||||
const bool is_windowless_;
|
||||
const bool print_preview_enabled_;
|
||||
const cef::BrowserConfig config_;
|
||||
CefRefPtr<CefDictionaryValue> extra_info_;
|
||||
|
||||
// Navigation will be blocked while |navigation_lock_| exists.
|
||||
|
@@ -69,15 +69,13 @@ CefBrowserInfoManager* CefBrowserInfoManager::GetInstance() {
|
||||
}
|
||||
|
||||
scoped_refptr<CefBrowserInfo> CefBrowserInfoManager::CreateBrowserInfo(
|
||||
bool is_popup,
|
||||
bool is_windowless,
|
||||
bool print_preview_enabled,
|
||||
bool is_devtools_popup,
|
||||
const cef::BrowserConfig& config,
|
||||
CefRefPtr<CefDictionaryValue> extra_info) {
|
||||
base::AutoLock lock_scope(browser_info_lock_);
|
||||
|
||||
scoped_refptr<CefBrowserInfo> browser_info =
|
||||
new CefBrowserInfo(++next_browser_id_, is_popup, is_windowless,
|
||||
print_preview_enabled, extra_info);
|
||||
scoped_refptr<CefBrowserInfo> browser_info = new CefBrowserInfo(
|
||||
++next_browser_id_, is_devtools_popup, config, extra_info);
|
||||
browser_info_list_.push_back(browser_info);
|
||||
|
||||
return browser_info;
|
||||
@@ -85,8 +83,7 @@ scoped_refptr<CefBrowserInfo> CefBrowserInfoManager::CreateBrowserInfo(
|
||||
|
||||
scoped_refptr<CefBrowserInfo> CefBrowserInfoManager::CreatePopupBrowserInfo(
|
||||
content::WebContents* new_contents,
|
||||
bool is_windowless,
|
||||
bool print_preview_enabled,
|
||||
const cef::BrowserConfig& config,
|
||||
CefRefPtr<CefDictionaryValue> extra_info) {
|
||||
CEF_REQUIRE_UIT();
|
||||
|
||||
@@ -95,8 +92,8 @@ scoped_refptr<CefBrowserInfo> CefBrowserInfoManager::CreatePopupBrowserInfo(
|
||||
scoped_refptr<CefBrowserInfo> browser_info;
|
||||
{
|
||||
base::AutoLock lock_scope(browser_info_lock_);
|
||||
browser_info = new CefBrowserInfo(++next_browser_id_, true, is_windowless,
|
||||
print_preview_enabled, extra_info);
|
||||
browser_info =
|
||||
new CefBrowserInfo(++next_browser_id_, true, config, extra_info);
|
||||
browser_info_list_.push_back(browser_info);
|
||||
}
|
||||
|
||||
@@ -777,9 +774,14 @@ void CefBrowserInfoManager::SendNewBrowserInfoResponse(
|
||||
|
||||
if (browser_info) {
|
||||
params->browser_id = browser_info->browser_id();
|
||||
params->is_windowless = browser_info->is_windowless();
|
||||
params->is_popup = browser_info->is_popup();
|
||||
params->print_preview_enabled = browser_info->print_preview_enabled();
|
||||
|
||||
auto config = cef::mojom::NewBrowserConfig::New();
|
||||
config->is_popup = browser_info->is_popup();
|
||||
config->is_windowless = browser_info->config().is_windowless;
|
||||
config->print_preview_enabled =
|
||||
browser_info->config().print_preview_enabled;
|
||||
config->move_pip_enabled = browser_info->config().move_pip_enabled;
|
||||
params->config = std::move(config);
|
||||
|
||||
auto extra_info = browser_info->extra_info();
|
||||
if (extra_info) {
|
||||
|
@@ -53,11 +53,10 @@ class CefBrowserInfoManager : public content::RenderProcessHostObserver {
|
||||
static CefBrowserInfoManager* GetInstance();
|
||||
|
||||
// Called immediately before a new CefBrowserHost implementation is created
|
||||
// directly. In this case |is_popup| will be true only for DevTools browsers.
|
||||
// directly.
|
||||
scoped_refptr<CefBrowserInfo> CreateBrowserInfo(
|
||||
bool is_popup,
|
||||
bool is_windowless,
|
||||
bool print_preview_enabled,
|
||||
bool is_devtools_popup,
|
||||
const cef::BrowserConfig& config,
|
||||
CefRefPtr<CefDictionaryValue> extra_info);
|
||||
|
||||
// Called from WebContentsDelegate::WebContentsCreated when a new browser is
|
||||
@@ -66,8 +65,7 @@ class CefBrowserInfoManager : public content::RenderProcessHostObserver {
|
||||
// response will be sent when this method is called.
|
||||
scoped_refptr<CefBrowserInfo> CreatePopupBrowserInfo(
|
||||
content::WebContents* new_contents,
|
||||
bool is_windowless,
|
||||
bool print_preview_enabled,
|
||||
const cef::BrowserConfig& config,
|
||||
CefRefPtr<CefDictionaryValue> extra_info);
|
||||
|
||||
// Called from ContentBrowserClient::CanCreateWindow. See comments on
|
||||
|
@@ -567,6 +567,15 @@ bool CefBrowserPlatformDelegate::IsPrintPreviewSupported() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CefBrowserPlatformDelegate::IsMovePictureInPictureEnabled() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
cef::BrowserConfig CefBrowserPlatformDelegate::GetBrowserConfig() const {
|
||||
return {IsWindowless(), IsPrintPreviewSupported(),
|
||||
IsMovePictureInPictureEnabled()};
|
||||
}
|
||||
|
||||
void CefBrowserPlatformDelegate::Find(const CefString& searchText,
|
||||
bool forward,
|
||||
bool matchCase,
|
||||
|
@@ -15,6 +15,7 @@
|
||||
#include "cef/include/cef_drag_data.h"
|
||||
#include "cef/include/internal/cef_types.h"
|
||||
#include "cef/include/views/cef_browser_view.h"
|
||||
#include "cef/libcef/renderer/browser_config.h"
|
||||
#include "third_party/blink/public/common/page/drag_operation.h"
|
||||
#include "third_party/blink/public/mojom/drag/drag.mojom-forward.h"
|
||||
#include "third_party/skia/include/core/SkColor.h"
|
||||
@@ -370,6 +371,12 @@ class CefBrowserPlatformDelegate {
|
||||
bool findNext);
|
||||
virtual void StopFinding(bool clearSelection);
|
||||
|
||||
virtual bool IsMovePictureInPictureEnabled() const;
|
||||
|
||||
// CefBrowser configuration determined prior to CefBrowserHost creation and
|
||||
// passed to the renderer process via the GetNewBrowserInfo Mojo request.
|
||||
cef::BrowserConfig GetBrowserConfig() const;
|
||||
|
||||
protected:
|
||||
// Allow deletion via std::unique_ptr only.
|
||||
friend std::default_delete<CefBrowserPlatformDelegate>;
|
||||
|
@@ -99,8 +99,8 @@ class BrowserDelegate : public content::WebContentsDelegate {
|
||||
|
||||
enum class ToolbarButtonType {
|
||||
kCast = 0,
|
||||
kDownload,
|
||||
kSendTabToSelf,
|
||||
kDownload_DEPRECATED,
|
||||
kSendTabToSelf_DEPRECATED,
|
||||
kSidePanel,
|
||||
kMaxValue = kSidePanel,
|
||||
};
|
||||
|
@@ -260,8 +260,8 @@ void ChromeBrowserDelegate::SetAsDelegate(content::WebContents* web_contents,
|
||||
CHECK(platform_delegate->IsChromeStyle());
|
||||
|
||||
auto browser_info = CefBrowserInfoManager::GetInstance()->CreateBrowserInfo(
|
||||
is_devtools_popup, /*is_windowless=*/false,
|
||||
platform_delegate->IsPrintPreviewSupported(), create_params_.extra_info);
|
||||
is_devtools_popup, platform_delegate->GetBrowserConfig(),
|
||||
create_params_.extra_info);
|
||||
|
||||
auto request_context_impl =
|
||||
CefRequestContextImpl::GetOrCreateForRequestContext(
|
||||
@@ -759,8 +759,7 @@ ChromeBrowserDelegate::CreateBrowserHostForPopup(
|
||||
|
||||
auto browser_info =
|
||||
CefBrowserInfoManager::GetInstance()->CreatePopupBrowserInfo(
|
||||
web_contents, /*is_windowless=*/false,
|
||||
platform_delegate->IsPrintPreviewSupported(), extra_info);
|
||||
web_contents, platform_delegate->GetBrowserConfig(), extra_info);
|
||||
CHECK(browser_info->is_popup());
|
||||
|
||||
// Popups must share the same RequestContext as the parent.
|
||||
|
@@ -500,8 +500,7 @@ void ChromeBrowserHostImpl::Attach(content::WebContents* web_contents,
|
||||
is_devtools_popup);
|
||||
}
|
||||
|
||||
platform_delegate_->WebContentsCreated(web_contents,
|
||||
/*own_web_contents=*/false);
|
||||
platform_delegate_->WebContentsCreated(web_contents, /*owned=*/false);
|
||||
contents_delegate_.ObserveWebContents(web_contents);
|
||||
|
||||
// Associate the platform delegate with this browser.
|
||||
|
@@ -130,6 +130,16 @@ bool CefBrowserPlatformDelegateChromeViews::IsViewsHosted() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CefBrowserPlatformDelegateChromeViews::IsMovePictureInPictureEnabled()
|
||||
const {
|
||||
if (browser_view_) {
|
||||
if (auto* delegate = browser_view_->delegate()) {
|
||||
return delegate->AllowMoveForPictureInPicture(browser_view_.get());
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
CefWindowImpl* CefBrowserPlatformDelegateChromeViews::GetWindowImpl() const {
|
||||
if (auto* widget = GetWindowWidget()) {
|
||||
CefRefPtr<CefWindow> window = view_util::GetWindowFor(widget);
|
||||
|
@@ -34,6 +34,7 @@ class CefBrowserPlatformDelegateChromeViews
|
||||
void SetBrowserView(CefRefPtr<CefBrowserView> browser_view) override;
|
||||
void SetFocus(bool setFocus) override;
|
||||
bool IsViewsHosted() const override;
|
||||
bool IsMovePictureInPictureEnabled() const override;
|
||||
|
||||
CefBrowserViewImpl* browser_view() const { return browser_view_.get(); }
|
||||
|
||||
|
@@ -128,7 +128,7 @@ class CefSelectFileDialog final : public ui::SelectFileDialog {
|
||||
}
|
||||
|
||||
private:
|
||||
gfx::NativeWindow owning_window_ = nullptr;
|
||||
gfx::NativeWindow owning_window_ = gfx::NativeWindow();
|
||||
bool has_multiple_file_choices_ = false;
|
||||
|
||||
CefRefPtr<CefBrowserHostBase> browser_;
|
||||
|
@@ -21,8 +21,7 @@ bool CefMenuRunnerMac::RunContextMenu(
|
||||
// Create a menu controller based on the model.
|
||||
MenuControllerCocoa* menu_controller =
|
||||
[[MenuControllerCocoa alloc] initWithModel:model->model()
|
||||
delegate:nil
|
||||
useWithPopUpButtonCell:NO];
|
||||
delegate:nil];
|
||||
|
||||
menu_controller_ = menu_controller;
|
||||
|
||||
|
@@ -501,7 +501,11 @@ CefRenderWidgetHostViewOSR::GetDisplayFeature() {
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::SetDisplayFeatureForTesting(
|
||||
void CefRenderWidgetHostViewOSR::DisableDisplayFeatureOverrideForEmulation() {
|
||||
DCHECK(false);
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::OverrideDisplayFeatureForEmulation(
|
||||
const content::DisplayFeature* display_feature) {
|
||||
DCHECK(false);
|
||||
}
|
||||
|
@@ -132,7 +132,8 @@ class CefRenderWidgetHostViewOSR
|
||||
std::optional<SkColor> GetBackgroundColor() override;
|
||||
void UpdateBackgroundColor() override;
|
||||
std::optional<content::DisplayFeature> GetDisplayFeature() override;
|
||||
void SetDisplayFeatureForTesting(
|
||||
void DisableDisplayFeatureOverrideForEmulation() override;
|
||||
void OverrideDisplayFeatureForEmulation(
|
||||
const content::DisplayFeature* display_feature) override;
|
||||
blink::mojom::PointerLockResult LockPointer(
|
||||
bool request_unadjusted_movement) override;
|
||||
|
@@ -245,6 +245,8 @@ cef_permission_request_types_t GetCefRequestType(
|
||||
return CEF_PERMISSION_TYPE_WINDOW_MANAGEMENT;
|
||||
case permissions::RequestType::kFileSystemAccess:
|
||||
return CEF_PERMISSION_TYPE_FILE_SYSTEM_ACCESS;
|
||||
case permissions::RequestType::kLocalNetworkAccess:
|
||||
return CEF_PERMISSION_TYPE_LOCAL_NETWORK_ACCESS;
|
||||
}
|
||||
|
||||
DCHECK(false);
|
||||
|
@@ -107,7 +107,7 @@ void PrintToPDF(content::WebContents* web_contents,
|
||||
}
|
||||
}
|
||||
|
||||
absl::variant<printing::mojom::PrintPagesParamsPtr, std::string>
|
||||
std::variant<printing::mojom::PrintPagesParamsPtr, std::string>
|
||||
print_pages_params = print_to_pdf::GetPrintPagesParams(
|
||||
web_contents->GetPrimaryMainFrame()->GetLastCommittedURL(),
|
||||
!!settings.landscape, display_header_footer,
|
||||
@@ -117,14 +117,14 @@ void PrintToPDF(content::WebContents* web_contents,
|
||||
CefString(&settings.footer_template), !!settings.prefer_css_page_size,
|
||||
!!settings.generate_tagged_pdf, !!settings.generate_document_outline);
|
||||
|
||||
if (absl::holds_alternative<std::string>(print_pages_params)) {
|
||||
if (std::holds_alternative<std::string>(print_pages_params)) {
|
||||
LOG(ERROR) << "PrintToPDF failed with error: "
|
||||
<< absl::get<std::string>(print_pages_params);
|
||||
<< std::get<std::string>(print_pages_params);
|
||||
callback->OnPdfPrintFinished(CefString(), false);
|
||||
return;
|
||||
}
|
||||
|
||||
DCHECK(absl::holds_alternative<printing::mojom::PrintPagesParamsPtr>(
|
||||
DCHECK(std::holds_alternative<printing::mojom::PrintPagesParamsPtr>(
|
||||
print_pages_params));
|
||||
|
||||
if (auto* print_manager =
|
||||
|
@@ -190,7 +190,9 @@ void CefOverlayViewHost::Init(views::View* host_view,
|
||||
// Initialize the Widget. |widget_| will be deleted by the NativeWidget or
|
||||
// when WidgetDelegate::DeleteDelegate() deletes |this|.
|
||||
widget_ = std::make_unique<ThemeCopyingWidget>(window_view_->GetWidget());
|
||||
views::Widget::InitParams params(views::Widget::InitParams::TYPE_CONTROL);
|
||||
views::Widget::InitParams params(
|
||||
views::Widget::InitParams::NATIVE_WIDGET_OWNS_WIDGET,
|
||||
views::Widget::InitParams::TYPE_CONTROL);
|
||||
params.delegate = this;
|
||||
params.name = "CefOverlayViewHost";
|
||||
params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
|
||||
|
@@ -377,7 +377,7 @@ std::optional<SkColor> GetBackgroundColor(const views::View* view,
|
||||
bool allow_transparent) {
|
||||
// Return the configured background color, if any.
|
||||
if (view->background()) {
|
||||
return view->background()->get_color();
|
||||
return view->background()->color().GetSkColor();
|
||||
}
|
||||
|
||||
// If the containing Widget is an overlay then it has a transparent background
|
||||
|
@@ -463,7 +463,7 @@ std::optional<int> ChromeMainDelegateCef::PostEarlyInitialization(
|
||||
const auto result = ChromeMainDelegate::PostEarlyInitialization(invoked_in);
|
||||
if (!result) {
|
||||
const auto* invoked_in_browser =
|
||||
absl::get_if<InvokedInBrowserProcess>(&invoked_in);
|
||||
std::get_if<InvokedInBrowserProcess>(&invoked_in);
|
||||
if (invoked_in_browser) {
|
||||
// At this point local_state has been created but ownership has not yet
|
||||
// been passed to BrowserProcessImpl (g_browser_process is nullptr).
|
||||
@@ -479,7 +479,7 @@ std::optional<int> ChromeMainDelegateCef::PostEarlyInitialization(
|
||||
return result;
|
||||
}
|
||||
|
||||
absl::variant<int, content::MainFunctionParams>
|
||||
std::variant<int, content::MainFunctionParams>
|
||||
ChromeMainDelegateCef::RunProcess(
|
||||
const std::string& process_type,
|
||||
content::MainFunctionParams main_function_params) {
|
||||
|
@@ -43,7 +43,7 @@ class ChromeMainDelegateCef : public ChromeMainDelegate,
|
||||
void SandboxInitialized(const std::string& process_type) override;
|
||||
std::optional<int> PreBrowserMain() override;
|
||||
std::optional<int> PostEarlyInitialization(InvokedIn invoked_in) override;
|
||||
absl::variant<int, content::MainFunctionParams> RunProcess(
|
||||
std::variant<int, content::MainFunctionParams> RunProcess(
|
||||
const std::string& process_type,
|
||||
content::MainFunctionParams main_function_params) override;
|
||||
#if BUILDFLAG(IS_LINUX)
|
||||
|
@@ -111,12 +111,19 @@ struct NewRenderThreadInfo {
|
||||
array<CrossOriginWhiteListEntry>? cross_origin_whitelist_entries;
|
||||
};
|
||||
|
||||
struct NewBrowserConfig {
|
||||
bool is_popup;
|
||||
|
||||
// Values from cef::BrowserConfig.
|
||||
bool is_windowless;
|
||||
bool print_preview_enabled;
|
||||
bool move_pip_enabled;
|
||||
};
|
||||
|
||||
struct NewBrowserInfo {
|
||||
int32 browser_id;
|
||||
bool? is_popup;
|
||||
bool? is_windowless;
|
||||
bool? print_preview_enabled;
|
||||
bool is_excluded;
|
||||
NewBrowserConfig? config;
|
||||
mojo_base.mojom.DictionaryValue? extra_info;
|
||||
};
|
||||
|
||||
|
22
libcef/renderer/browser_config.h
Normal file
22
libcef/renderer/browser_config.h
Normal file
@@ -0,0 +1,22 @@
|
||||
// Copyright 2025 The Chromium Embedded Framework Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can
|
||||
// be found in the LICENSE file.
|
||||
|
||||
#ifndef CEF_LIBCEF_RENDERER_BROWSER_CONFIG_H_
|
||||
#define CEF_LIBCEF_RENDERER_BROWSER_CONFIG_H_
|
||||
#pragma once
|
||||
|
||||
namespace cef {
|
||||
|
||||
// CefBrowser configuration determined prior to CefBrowserHost creation (in
|
||||
// CefBrowserPlatformDelegate::GetBrowserConfig) and passed to the renderer
|
||||
// process via the GetNewBrowserInfo Mojo request.
|
||||
struct BrowserConfig {
|
||||
bool is_windowless;
|
||||
bool print_preview_enabled;
|
||||
bool move_pip_enabled;
|
||||
};
|
||||
|
||||
} // namespace cef
|
||||
|
||||
#endif // CEF_LIBCEF_RENDERER_BROWSER_CONFIG_H_
|
@@ -276,13 +276,11 @@ void CefBrowserImpl::GetFrameNames(std::vector<CefString>& names) {
|
||||
CefBrowserImpl::CefBrowserImpl(blink::WebView* web_view,
|
||||
int browser_id,
|
||||
bool is_popup,
|
||||
bool is_windowless,
|
||||
bool print_preview_enabled)
|
||||
const cef::BrowserConfig& config)
|
||||
: blink::WebViewObserver(web_view),
|
||||
browser_id_(browser_id),
|
||||
is_popup_(is_popup),
|
||||
is_windowless_(is_windowless),
|
||||
print_preview_enabled_(print_preview_enabled) {}
|
||||
config_(config) {}
|
||||
|
||||
CefBrowserImpl::~CefBrowserImpl() = default;
|
||||
|
||||
|
@@ -16,6 +16,7 @@
|
||||
|
||||
#include "cef/include/cef_browser.h"
|
||||
#include "cef/include/cef_client.h"
|
||||
#include "cef/libcef/renderer/browser_config.h"
|
||||
#include "cef/libcef/renderer/frame_impl.h"
|
||||
#include "third_party/blink/public/common/tokens/tokens.h"
|
||||
#include "third_party/blink/public/web/web_view_observer.h"
|
||||
@@ -66,8 +67,7 @@ class CefBrowserImpl : public CefBrowser, public blink::WebViewObserver {
|
||||
CefBrowserImpl(blink::WebView* web_view,
|
||||
int browser_id,
|
||||
bool is_popup,
|
||||
bool is_windowless,
|
||||
bool print_preview_enabled);
|
||||
const cef::BrowserConfig& config);
|
||||
|
||||
CefBrowserImpl(const CefBrowserImpl&) = delete;
|
||||
CefBrowserImpl& operator=(const CefBrowserImpl&) = delete;
|
||||
@@ -80,8 +80,7 @@ class CefBrowserImpl : public CefBrowser, public blink::WebViewObserver {
|
||||
|
||||
int browser_id() const { return browser_id_; }
|
||||
bool is_popup() const { return is_popup_; }
|
||||
bool is_windowless() const { return is_windowless_; }
|
||||
bool print_preview_enabled() const { return print_preview_enabled_; }
|
||||
const cef::BrowserConfig& config() const { return config_; }
|
||||
|
||||
// blink::WebViewObserver methods.
|
||||
void OnDestruct() override;
|
||||
@@ -96,8 +95,7 @@ class CefBrowserImpl : public CefBrowser, public blink::WebViewObserver {
|
||||
// same browser ID.
|
||||
const int browser_id_;
|
||||
const bool is_popup_;
|
||||
const bool is_windowless_;
|
||||
const bool print_preview_enabled_;
|
||||
const cef::BrowserConfig config_;
|
||||
|
||||
// Map of unique frame tokens to CefFrameImpl references.
|
||||
using FrameMap = std::map<blink::LocalFrameToken, CefRefPtr<CefFrameImpl>>;
|
||||
|
@@ -46,20 +46,19 @@ void ChromeContentRendererClientCef::RenderFrameCreated(
|
||||
new CefRenderFrameObserver(render_frame);
|
||||
|
||||
bool browser_created;
|
||||
std::optional<bool> is_windowless;
|
||||
std::optional<bool> print_preview_enabled;
|
||||
std::optional<cef::BrowserConfig> config;
|
||||
render_manager_->RenderFrameCreated(render_frame, render_frame_observer,
|
||||
browser_created, is_windowless,
|
||||
print_preview_enabled);
|
||||
browser_created, config);
|
||||
if (browser_created) {
|
||||
OnBrowserCreated(render_frame->GetWebView(), is_windowless);
|
||||
CHECK(config.has_value());
|
||||
OnBrowserCreated(render_frame->GetWebView(), *config);
|
||||
}
|
||||
|
||||
if (print_preview_enabled.has_value()) {
|
||||
// This value will be used when the when ChromeContentRendererClient
|
||||
if (config.has_value()) {
|
||||
// This value will be used when the ChromeContentRendererClient
|
||||
// creates the new ChromePrintRenderFrameHelperDelegate below.
|
||||
ChromePrintRenderFrameHelperDelegate::SetNextPrintPreviewEnabled(
|
||||
*print_preview_enabled);
|
||||
(*config).print_preview_enabled);
|
||||
}
|
||||
|
||||
ChromeContentRendererClient::RenderFrameCreated(render_frame);
|
||||
@@ -73,12 +72,11 @@ void ChromeContentRendererClientCef::WebViewCreated(
|
||||
outermost_origin);
|
||||
|
||||
bool browser_created;
|
||||
std::optional<bool> is_windowless;
|
||||
std::optional<bool> print_preview_enabled;
|
||||
render_manager_->WebViewCreated(web_view, browser_created, is_windowless,
|
||||
print_preview_enabled);
|
||||
std::optional<cef::BrowserConfig> config;
|
||||
render_manager_->WebViewCreated(web_view, browser_created, config);
|
||||
if (browser_created) {
|
||||
OnBrowserCreated(web_view, is_windowless);
|
||||
CHECK(config.has_value());
|
||||
OnBrowserCreated(web_view, *config);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,14 +115,9 @@ void ChromeContentRendererClientCef::ExposeInterfacesToBrowser(
|
||||
|
||||
void ChromeContentRendererClientCef::OnBrowserCreated(
|
||||
blink::WebView* web_view,
|
||||
std::optional<bool> is_windowless) {
|
||||
const cef::BrowserConfig& config) {
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
const bool windowless = is_windowless.has_value() && *is_windowless;
|
||||
|
||||
// FIXME: It would be better if this API would be a callback from the
|
||||
// WebKit layer, or if it would be exposed as an WebView instance method; the
|
||||
// current implementation uses a static variable, and WebKit needs to be
|
||||
// patched in order to make it work for each WebView instance
|
||||
web_view->SetUseExternalPopupMenusThisInstance(!windowless);
|
||||
web_view->SetUseExternalPopupMenusThisInstance(!config.is_windowless);
|
||||
#endif
|
||||
web_view->SetMovePictureInPictureEnabled(config.move_pip_enabled);
|
||||
}
|
||||
|
@@ -12,6 +12,10 @@
|
||||
#include "base/task/single_thread_task_runner.h"
|
||||
#include "chrome/renderer/chrome_content_renderer_client.h"
|
||||
|
||||
namespace cef {
|
||||
struct BrowserConfig;
|
||||
}
|
||||
|
||||
class CefRenderManager;
|
||||
|
||||
// CEF override of ChromeContentRendererClient.
|
||||
@@ -48,7 +52,7 @@ class ChromeContentRendererClientCef : public ChromeContentRendererClient {
|
||||
|
||||
private:
|
||||
void OnBrowserCreated(blink::WebView* web_view,
|
||||
std::optional<bool> is_windowless);
|
||||
const cef::BrowserConfig& config);
|
||||
|
||||
std::unique_ptr<CefRenderManager> render_manager_;
|
||||
|
||||
|
@@ -56,25 +56,17 @@ class CefExcludedView : public blink::WebViewObserver {
|
||||
public:
|
||||
CefExcludedView(CefRenderManager* manager,
|
||||
blink::WebView* web_view,
|
||||
std::optional<bool> is_windowless,
|
||||
std::optional<bool> print_preview_enabled)
|
||||
: blink::WebViewObserver(web_view),
|
||||
manager_(manager),
|
||||
is_windowless_(is_windowless),
|
||||
print_preview_enabled_(print_preview_enabled) {}
|
||||
const std::optional<cef::BrowserConfig>& config)
|
||||
: blink::WebViewObserver(web_view), manager_(manager), config_(config) {}
|
||||
|
||||
std::optional<bool> is_windowless() const { return is_windowless_; }
|
||||
std::optional<bool> print_preview_enabled() const {
|
||||
return print_preview_enabled_;
|
||||
}
|
||||
const std::optional<cef::BrowserConfig>& config() const { return config_; }
|
||||
|
||||
private:
|
||||
// RenderViewObserver methods.
|
||||
void OnDestruct() override { manager_->OnExcludedViewDestroyed(this); }
|
||||
|
||||
CefRenderManager* const manager_;
|
||||
const std::optional<bool> is_windowless_;
|
||||
const std::optional<bool> print_preview_enabled_;
|
||||
const std::optional<cef::BrowserConfig> config_;
|
||||
};
|
||||
|
||||
CefRenderManager::CefRenderManager() {
|
||||
@@ -110,11 +102,9 @@ void CefRenderManager::RenderFrameCreated(
|
||||
content::RenderFrame* render_frame,
|
||||
CefRenderFrameObserver* render_frame_observer,
|
||||
bool& browser_created,
|
||||
std::optional<bool>& is_windowless,
|
||||
std::optional<bool>& print_preview_enabled) {
|
||||
std::optional<cef::BrowserConfig>& config) {
|
||||
auto browser = MaybeCreateBrowser(render_frame->GetWebView(), render_frame,
|
||||
&browser_created, &is_windowless,
|
||||
&print_preview_enabled);
|
||||
browser_created, config);
|
||||
if (browser) {
|
||||
// Attach the frame to the observer for message routing purposes.
|
||||
render_frame_observer->AttachFrame(
|
||||
@@ -130,16 +120,14 @@ void CefRenderManager::RenderFrameCreated(
|
||||
void CefRenderManager::WebViewCreated(
|
||||
blink::WebView* web_view,
|
||||
bool& browser_created,
|
||||
std::optional<bool>& is_windowless,
|
||||
std::optional<bool>& print_preview_enabled) {
|
||||
std::optional<cef::BrowserConfig>& config) {
|
||||
content::RenderFrame* render_frame = nullptr;
|
||||
if (web_view->MainFrame()->IsWebLocalFrame()) {
|
||||
render_frame = content::RenderFrame::FromWebFrame(
|
||||
web_view->MainFrame()->ToWebLocalFrame());
|
||||
}
|
||||
|
||||
MaybeCreateBrowser(web_view, render_frame, &browser_created, &is_windowless,
|
||||
&print_preview_enabled);
|
||||
MaybeCreateBrowser(web_view, render_frame, browser_created, config);
|
||||
}
|
||||
|
||||
void CefRenderManager::DevToolsAgentAttached() {
|
||||
@@ -294,12 +282,9 @@ void CefRenderManager::WebKitInitialized() {
|
||||
CefRefPtr<CefBrowserImpl> CefRenderManager::MaybeCreateBrowser(
|
||||
blink::WebView* web_view,
|
||||
content::RenderFrame* render_frame,
|
||||
bool* browser_created,
|
||||
std::optional<bool>* is_windowless,
|
||||
std::optional<bool>* print_preview_enabled) {
|
||||
if (browser_created) {
|
||||
*browser_created = false;
|
||||
}
|
||||
bool& browser_created,
|
||||
std::optional<cef::BrowserConfig>& config) {
|
||||
browser_created = false;
|
||||
|
||||
if (!web_view || !render_frame) {
|
||||
return nullptr;
|
||||
@@ -307,25 +292,13 @@ CefRefPtr<CefBrowserImpl> CefRenderManager::MaybeCreateBrowser(
|
||||
|
||||
// Don't create another browser or excluded view object if one already exists
|
||||
// for the view.
|
||||
auto browser = GetBrowserForView(web_view);
|
||||
if (browser) {
|
||||
if (is_windowless) {
|
||||
*is_windowless = browser->is_windowless();
|
||||
}
|
||||
if (print_preview_enabled) {
|
||||
*print_preview_enabled = browser->print_preview_enabled();
|
||||
}
|
||||
if (auto browser = GetBrowserForView(web_view)) {
|
||||
config = browser->config();
|
||||
return browser;
|
||||
}
|
||||
|
||||
auto excluded_view = GetExcludedViewForView(web_view);
|
||||
if (excluded_view) {
|
||||
if (is_windowless) {
|
||||
*is_windowless = excluded_view->is_windowless();
|
||||
}
|
||||
if (print_preview_enabled) {
|
||||
*print_preview_enabled = excluded_view->print_preview_enabled();
|
||||
}
|
||||
if (auto excluded_view = GetExcludedViewForView(web_view)) {
|
||||
config = excluded_view->config();
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -338,11 +311,10 @@ CefRefPtr<CefBrowserImpl> CefRenderManager::MaybeCreateBrowser(
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (is_windowless) {
|
||||
*is_windowless = params->is_windowless;
|
||||
}
|
||||
if (print_preview_enabled) {
|
||||
*print_preview_enabled = params->print_preview_enabled;
|
||||
if (params->config) {
|
||||
config = cef::BrowserConfig{params->config->is_windowless,
|
||||
params->config->print_preview_enabled,
|
||||
params->config->move_pip_enabled};
|
||||
}
|
||||
|
||||
if (params->is_excluded || params->browser_id < 0) {
|
||||
@@ -350,15 +322,13 @@ CefRefPtr<CefBrowserImpl> CefRenderManager::MaybeCreateBrowser(
|
||||
// extension or print preview dialog), or if the new browser info response
|
||||
// has timed out.
|
||||
excluded_views_.insert(std::make_pair(
|
||||
web_view,
|
||||
std::make_unique<CefExcludedView>(this, web_view, params->is_windowless,
|
||||
params->print_preview_enabled)));
|
||||
web_view, std::make_unique<CefExcludedView>(this, web_view, config)));
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
browser = new CefBrowserImpl(web_view, params->browser_id, *params->is_popup,
|
||||
*params->is_windowless,
|
||||
*params->print_preview_enabled);
|
||||
CHECK(params->config);
|
||||
CefRefPtr<CefBrowserImpl> browser = new CefBrowserImpl(
|
||||
web_view, params->browser_id, params->config->is_popup, *config);
|
||||
browsers_.insert(std::make_pair(web_view, browser));
|
||||
|
||||
// Notify the render process handler.
|
||||
@@ -377,9 +347,7 @@ CefRefPtr<CefBrowserImpl> CefRenderManager::MaybeCreateBrowser(
|
||||
}
|
||||
}
|
||||
|
||||
if (browser_created) {
|
||||
*browser_created = true;
|
||||
}
|
||||
browser_created = true;
|
||||
|
||||
return browser;
|
||||
}
|
||||
|
@@ -12,6 +12,7 @@
|
||||
|
||||
#include "cef/include/internal/cef_ptr.h"
|
||||
#include "cef/libcef/common/mojom/cef.mojom.h"
|
||||
#include "cef/libcef/renderer/browser_config.h"
|
||||
#include "mojo/public/cpp/bindings/pending_receiver.h"
|
||||
#include "mojo/public/cpp/bindings/receiver_set.h"
|
||||
#include "mojo/public/cpp/bindings/remote.h"
|
||||
@@ -52,12 +53,10 @@ class CefRenderManager : public cef::mojom::RenderManager {
|
||||
void RenderFrameCreated(content::RenderFrame* render_frame,
|
||||
CefRenderFrameObserver* render_frame_observer,
|
||||
bool& browser_created,
|
||||
std::optional<bool>& is_windowless,
|
||||
std::optional<bool>& print_preview_enabled);
|
||||
std::optional<cef::BrowserConfig>& config);
|
||||
void WebViewCreated(blink::WebView* web_view,
|
||||
bool& browser_created,
|
||||
std::optional<bool>& is_windowless,
|
||||
std::optional<bool>& print_preview_enabled);
|
||||
std::optional<cef::BrowserConfig>& config);
|
||||
void DevToolsAgentAttached();
|
||||
void DevToolsAgentDetached();
|
||||
void ExposeInterfacesToBrowser(mojo::BinderMap* binders);
|
||||
@@ -94,9 +93,8 @@ class CefRenderManager : public cef::mojom::RenderManager {
|
||||
CefRefPtr<CefBrowserImpl> MaybeCreateBrowser(
|
||||
blink::WebView* web_view,
|
||||
content::RenderFrame* render_frame,
|
||||
bool* browser_created,
|
||||
std::optional<bool>* is_windowless,
|
||||
std::optional<bool>* print_preview_enabled);
|
||||
bool& browser_created,
|
||||
std::optional<cef::BrowserConfig>& config);
|
||||
|
||||
// Called from CefBrowserImpl::OnDestruct().
|
||||
void OnBrowserDestroyed(CefBrowserImpl* browser);
|
||||
|
@@ -68,6 +68,9 @@ patches = [
|
||||
},
|
||||
{
|
||||
# Enable popups in offscreen rendering on MacOS.
|
||||
#
|
||||
# Enable moveTo()/moveBy() for Document picture-in-picture popups.
|
||||
# https://github.com/chromiumembedded/cef/issues/3714
|
||||
'name': 'webkit_popups',
|
||||
},
|
||||
{
|
||||
@@ -136,6 +139,8 @@ patches = [
|
||||
#
|
||||
# Add WebContentsObserver::RenderWidgetCreated.
|
||||
# https://github.com/chromiumembedded/cef/issues/3308
|
||||
#
|
||||
# osr: Avoid crash in WebContentsImpl::GetSize/Resize.
|
||||
'name': 'web_contents_1257_1565',
|
||||
},
|
||||
{
|
||||
@@ -776,10 +781,5 @@ patches = [
|
||||
# builds.
|
||||
# https://github.com/chromiumembedded/cef/issues/3892
|
||||
'name': 'config_3892'
|
||||
},
|
||||
{
|
||||
# Linux: Allow GTK3 on GNOME with --gtk-version flag.
|
||||
# https://chromium-review.googlesource.com/c/chromium/src/+/6334084
|
||||
'name': 'gtk_compat_6334084'
|
||||
}
|
||||
]
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git base/BUILD.gn base/BUILD.gn
|
||||
index da6b76717d7b7..d536c8329e732 100644
|
||||
index 57a6af0061615..d18a8a8a4559d 100644
|
||||
--- base/BUILD.gn
|
||||
+++ base/BUILD.gn
|
||||
@@ -41,6 +41,7 @@ import("//build/rust/rust_static_library.gni")
|
||||
@@ -10,7 +10,7 @@ index da6b76717d7b7..d536c8329e732 100644
|
||||
import("//testing/libfuzzer/fuzzer_test.gni")
|
||||
import("//testing/test.gni")
|
||||
|
||||
@@ -1509,7 +1510,13 @@ component("base") {
|
||||
@@ -1519,7 +1520,13 @@ component("base") {
|
||||
"hash/md5_constexpr_internal.h",
|
||||
"hash/sha1.h",
|
||||
]
|
||||
@@ -25,7 +25,7 @@ index da6b76717d7b7..d536c8329e732 100644
|
||||
sources += [
|
||||
"hash/md5_nacl.cc",
|
||||
"hash/md5_nacl.h",
|
||||
@@ -1959,6 +1966,12 @@ component("base") {
|
||||
@@ -1969,6 +1976,12 @@ component("base") {
|
||||
defines += [ "COM_INIT_CHECK_HOOK_DISABLED" ]
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ index 2158b648ca58a..8a8cb13b2fd74 100644
|
||||
#else
|
||||
#include "base/hash/sha1_boringssl.h"
|
||||
diff --git base/json/json_reader.cc base/json/json_reader.cc
|
||||
index 32d8707d3ad5d..12b8ccda8fc30 100644
|
||||
index 48a9b893d3f9d..a5a2223b2a0fa 100644
|
||||
--- base/json/json_reader.cc
|
||||
+++ base/json/json_reader.cc
|
||||
@@ -12,8 +12,9 @@
|
||||
@@ -104,7 +104,7 @@ index 32d8707d3ad5d..12b8ccda8fc30 100644
|
||||
#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 {
|
||||
@@ -21,7 +22,7 @@
|
||||
|
||||
// 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.
|
||||
@@ -112,15 +112,8 @@ index 32d8707d3ad5d..12b8ccda8fc30 100644
|
||||
+#if !(BUILDFLAG(IS_NACL) || BUILDFLAG(IS_CEF_SANDBOX_BUILD))
|
||||
|
||||
namespace {
|
||||
using serde_json_lenient::ContextPointer;
|
||||
@@ -129,16 +130,16 @@ JSONReader::Result DecodeJSONInRust(std::string_view json,
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
-#endif // !BUILDFLAG(IS_NACL)
|
||||
+#endif // !(BUILDFLAG(IS_NACL) || BUILDFLAG(IS_CEF_SANDBOX_BUILD))
|
||||
|
||||
// static
|
||||
const char kSecurityJsonParsingTime[] = "Security.JSONParser.ParsingTime";
|
||||
@@ -138,7 +139,7 @@ namespace base {
|
||||
std::optional<Value> JSONReader::Read(std::string_view json,
|
||||
int options,
|
||||
size_t max_depth) {
|
||||
@@ -128,21 +121,8 @@ index 32d8707d3ad5d..12b8ccda8fc30 100644
|
||||
+#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);
|
||||
@@ -150,7 +151,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
|
||||
@@ -179,7 +180,7 @@ std::optional<Value::List> JSONReader::ReadList(std::string_view json,
|
||||
#else // BUILDFLAG(IS_NACL)
|
||||
@@ -183,7 +184,7 @@ std::optional<Value::List> JSONReader::ReadList(std::string_view json,
|
||||
JSONReader::Result JSONReader::ReadAndReturnValueWithError(
|
||||
std::string_view json,
|
||||
int options) {
|
||||
@@ -151,25 +131,7 @@ index 32d8707d3ad5d..12b8ccda8fc30 100644
|
||||
internal::JSONParser parser(options);
|
||||
auto value = parser.Parse(json);
|
||||
if (!value) {
|
||||
@@ -191,7 +192,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);
|
||||
@@ -208,7 +209,7 @@ JSONReader::Result JSONReader::ReadAndReturnValueWithError(
|
||||
|
||||
return std::move(*value);
|
||||
}
|
||||
-#endif // BUILDFLAG(IS_NACL)
|
||||
+#endif // (BUILDFLAG(IS_NACL) || BUILDFLAG(IS_CEF_SANDBOX_BUILD))
|
||||
}
|
||||
|
||||
// static
|
||||
@@ -219,7 +220,7 @@ bool JSONReader::UsingRust() {
|
||||
@@ -224,7 +225,7 @@ bool JSONReader::UsingRust() {
|
||||
if (!base::FeatureList::GetInstance()) {
|
||||
return false;
|
||||
}
|
||||
@@ -179,7 +141,7 @@ index 32d8707d3ad5d..12b8ccda8fc30 100644
|
||||
#else
|
||||
return base::FeatureList::IsEnabled(base::features::kUseRustJsonParser);
|
||||
diff --git base/logging.cc base/logging.cc
|
||||
index e996f8c614266..7bd52b676cc92 100644
|
||||
index 26ba1a286e451..99b2ce6feb274 100644
|
||||
--- base/logging.cc
|
||||
+++ base/logging.cc
|
||||
@@ -51,6 +51,7 @@
|
||||
@@ -247,7 +209,7 @@ index 5d11d4a1560b1..242a93bcca8ed 100644
|
||||
} // namespace win
|
||||
#endif
|
||||
diff --git base/rand_util.h base/rand_util.h
|
||||
index da48b37857aa3..3ff683247ab2a 100644
|
||||
index d650943a7b75a..abd5217f8ceed 100644
|
||||
--- base/rand_util.h
|
||||
+++ base/rand_util.h
|
||||
@@ -23,8 +23,9 @@
|
||||
@@ -261,7 +223,7 @@ index da48b37857aa3..3ff683247ab2a 100644
|
||||
#include "third_party/boringssl/src/include/openssl/rand.h"
|
||||
#endif
|
||||
|
||||
@@ -185,7 +186,7 @@ class RandomBitGenerator {
|
||||
@@ -189,7 +190,7 @@ class RandomBitGenerator {
|
||||
~RandomBitGenerator() = default;
|
||||
};
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git base/test/BUILD.gn base/test/BUILD.gn
|
||||
index 82fab133d08d6..72857b99268eb 100644
|
||||
index 5beef03e5fd94..0b12fd3afc8fc 100644
|
||||
--- base/test/BUILD.gn
|
||||
+++ base/test/BUILD.gn
|
||||
@@ -208,11 +208,6 @@ static_library("test_support") {
|
||||
@@ -212,11 +212,6 @@ static_library("test_support") {
|
||||
|
||||
if (enable_base_tracing) {
|
||||
public_deps += [ "//third_party/perfetto:perfetto_test_support" ]
|
||||
@@ -14,7 +14,7 @@ index 82fab133d08d6..72857b99268eb 100644
|
||||
deps += [
|
||||
":amalgamated_perfetto_sql_stdlib",
|
||||
":gen_cc_chrome_track_event_descriptor",
|
||||
@@ -607,7 +602,7 @@ if (enable_base_tracing) {
|
||||
@@ -611,7 +606,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 82fab133d08d6..72857b99268eb 100644
|
||||
if (is_ios) {
|
||||
_target_type = "ios_framework_bundle"
|
||||
}
|
||||
@@ -616,6 +611,8 @@ if (enable_base_tracing) {
|
||||
@@ -620,6 +615,8 @@ if (enable_base_tracing) {
|
||||
defines = [ "TEST_TRACE_PROCESSOR_IMPL" ]
|
||||
testonly = true
|
||||
sources = [
|
||||
@@ -32,7 +32,7 @@ index 82fab133d08d6..72857b99268eb 100644
|
||||
"test_trace_processor_export.h",
|
||||
"test_trace_processor_impl.cc",
|
||||
"test_trace_processor_impl.h",
|
||||
@@ -633,33 +630,6 @@ if (enable_base_tracing) {
|
||||
@@ -637,33 +634,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 95ef6926fc4cb..abb780c6d52c2 100644
|
||||
index f4288459097cd..c48696020414c 100644
|
||||
--- content/shell/BUILD.gn
|
||||
+++ content/shell/BUILD.gn
|
||||
@@ -920,7 +920,6 @@ if (is_mac) {
|
||||
@@ -926,7 +926,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,5 +1,5 @@
|
||||
diff --git base/task/thread_pool/thread_pool_impl.cc base/task/thread_pool/thread_pool_impl.cc
|
||||
index 33deee9fff103..1b2a4c1482ac0 100644
|
||||
index d7f9c33417f64..a6561d3dad060 100644
|
||||
--- base/task/thread_pool/thread_pool_impl.cc
|
||||
+++ base/task/thread_pool/thread_pool_impl.cc
|
||||
@@ -108,6 +108,10 @@ ThreadPoolImpl::ThreadPoolImpl(std::string_view histogram_label,
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git content/browser/scheduler/browser_task_executor.cc content/browser/scheduler/browser_task_executor.cc
|
||||
index d2a1fe5b3d301..4e49261495260 100644
|
||||
index 7bf17301e3563..f2c102d3fc19b 100644
|
||||
--- content/browser/scheduler/browser_task_executor.cc
|
||||
+++ content/browser/scheduler/browser_task_executor.cc
|
||||
@@ -183,10 +183,9 @@ void BrowserTaskExecutor::ResetForTesting() {
|
||||
@@ -207,10 +207,9 @@ void BrowserTaskExecutor::ResetForTesting() {
|
||||
|
||||
// static
|
||||
void BrowserTaskExecutor::Shutdown() {
|
||||
|
@@ -20,10 +20,10 @@ index 53a73d6c75b7a..05290de4c03a0 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 7240472cf0f25..47b0a2bee3c76 100644
|
||||
index 29740121f1371..97e4e6b0bcd29 100644
|
||||
--- content/browser/renderer_host/navigation_request.cc
|
||||
+++ content/browser/renderer_host/navigation_request.cc
|
||||
@@ -8444,10 +8444,22 @@ NavigationRequest::GetOriginForURLLoaderFactoryBeforeResponseWithDebugInfo(
|
||||
@@ -8499,10 +8499,22 @@ NavigationRequest::GetOriginForURLLoaderFactoryBeforeResponseWithDebugInfo(
|
||||
bool use_opaque_origin =
|
||||
(sandbox_flags & network::mojom::WebSandboxFlags::kOrigin) ==
|
||||
network::mojom::WebSandboxFlags::kOrigin;
|
||||
@@ -47,7 +47,7 @@ index 7240472cf0f25..47b0a2bee3c76 100644
|
||||
}
|
||||
|
||||
return origin_and_debug_info;
|
||||
@@ -8555,11 +8567,20 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() {
|
||||
@@ -8610,11 +8622,20 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() {
|
||||
DetermineInitiatorRelationship(initiator_rfh,
|
||||
frame_tree_node_->current_frame_host()));
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git build/config/compiler/BUILD.gn build/config/compiler/BUILD.gn
|
||||
index 15141254347c3..700023784a81d 100644
|
||||
index e7a60d56b5425..e9a4a4eb91ce8 100644
|
||||
--- build/config/compiler/BUILD.gn
|
||||
+++ build/config/compiler/BUILD.gn
|
||||
@@ -132,6 +132,9 @@ declare_args() {
|
||||
@@ -131,6 +131,9 @@ declare_args() {
|
||||
# The cache can lead to non-determinism: https://crbug.com/1486045
|
||||
thin_lto_enable_cache = true
|
||||
|
||||
@@ -12,7 +12,7 @@ index 15141254347c3..700023784a81d 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,
|
||||
@@ -2287,6 +2290,7 @@ config("export_dynamic") {
|
||||
@@ -2326,6 +2329,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") {
|
||||
@@ -20,7 +20,7 @@ index 15141254347c3..700023784a81d 100644
|
||||
if ((is_apple && use_lld) || (is_linux && !is_clang) || current_os == "aix") {
|
||||
# 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`.
|
||||
@@ -2305,6 +2309,7 @@ config("thin_archive") {
|
||||
@@ -2344,6 +2348,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 935484239812b..be94b4eb3f6b2 100644
|
||||
index b5783087429ee..32b59c28e40bd 100644
|
||||
--- chrome/browser/BUILD.gn
|
||||
+++ chrome/browser/BUILD.gn
|
||||
@@ -11,6 +11,7 @@ import("//build/config/compiler/pgo/pgo.gni")
|
||||
@@ -10,7 +10,7 @@ index 935484239812b..be94b4eb3f6b2 100644
|
||||
import("//chrome/browser/buildflags.gni")
|
||||
import("//chrome/browser/downgrade/buildflags.gni")
|
||||
import("//chrome/browser/request_header_integrity/buildflags.gni")
|
||||
@@ -1859,6 +1860,7 @@ static_library("browser") {
|
||||
@@ -1884,6 +1885,7 @@ static_library("browser") {
|
||||
"//build/config/compiler:compiler_buildflags",
|
||||
"//build/config/linux/dbus:buildflags",
|
||||
"//cc",
|
||||
@@ -18,7 +18,7 @@ index 935484239812b..be94b4eb3f6b2 100644
|
||||
"//chrome:extra_resources",
|
||||
"//chrome:resources",
|
||||
"//chrome:strings",
|
||||
@@ -2551,6 +2553,10 @@ static_library("browser") {
|
||||
@@ -2583,6 +2585,10 @@ static_library("browser") {
|
||||
sources += [ "net/net_error_diagnostics_dialog_stub.cc" ]
|
||||
}
|
||||
|
||||
|
@@ -13,19 +13,19 @@ index 7603c2662b8dc..9a38d816bdc40 100644
|
||||
return false;
|
||||
}
|
||||
diff --git chrome/browser/devtools/devtools_window.cc chrome/browser/devtools/devtools_window.cc
|
||||
index 615de49f749ac..dc02b861c6e4c 100644
|
||||
index 8e0717f34f37f..df852d4b2e69f 100644
|
||||
--- chrome/browser/devtools/devtools_window.cc
|
||||
+++ chrome/browser/devtools/devtools_window.cc
|
||||
@@ -38,6 +38,7 @@
|
||||
#include "chrome/browser/profiles/profile.h"
|
||||
#include "chrome/browser/search_engines/template_url_service_factory.h"
|
||||
#include "chrome/browser/task_manager/web_contents_tags.h"
|
||||
#include "chrome/browser/ui/browser.h"
|
||||
+#include "chrome/browser/ui/browser_finder.h"
|
||||
#include "chrome/browser/ui/browser_list.h"
|
||||
#include "chrome/browser/ui/browser_tabstrip.h"
|
||||
#include "chrome/browser/ui/browser_window.h"
|
||||
@@ -1218,6 +1219,13 @@ DevToolsWindow* DevToolsWindow::Create(
|
||||
!browser->is_type_normal()) {
|
||||
#include "chrome/browser/ui/prefs/prefs_tab_helper.h"
|
||||
#include "chrome/browser/ui/scoped_tabbed_browser_displayer.h"
|
||||
#include "chrome/browser/ui/tabs/tab_strip_user_gesture_details.h"
|
||||
@@ -1205,6 +1206,13 @@ DevToolsWindow* DevToolsWindow::Create(
|
||||
if (!browser || !browser->is_type_normal()) {
|
||||
can_dock = false;
|
||||
}
|
||||
+
|
||||
@@ -36,23 +36,20 @@ index 615de49f749ac..dc02b861c6e4c 100644
|
||||
+ }
|
||||
+#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
// Create WebContents with devtools.
|
||||
@@ -1677,9 +1685,13 @@ void DevToolsWindow::OpenInNewTab(const GURL& url) {
|
||||
if (!inspected_web_contents ||
|
||||
!inspected_web_contents->OpenURL(params,
|
||||
@@ -1646,7 +1654,9 @@ void DevToolsWindow::OpenInNewTab(const GURL& url) {
|
||||
/*navigation_handle_callback=*/{})) {
|
||||
+#if !BUILDFLAG(ENABLE_CEF)
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
NOTIMPLEMENTED();
|
||||
-#else
|
||||
+#elif !BUILDFLAG(ENABLE_CEF)
|
||||
+ // Remove default behavior when CEF handles the open via OnOpenURLFromTab.
|
||||
+ // See CEF issue #3735.
|
||||
chrome::ScopedTabbedBrowserDisplayer displayer(profile_);
|
||||
chrome::AddSelectedTabWithURL(displayer.browser(), fixed_url,
|
||||
ui::PAGE_TRANSITION_LINK);
|
||||
+#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1842,12 +1854,28 @@ void DevToolsWindow::CreateDevToolsBrowser() {
|
||||
@@ -1827,12 +1837,26 @@ void DevToolsWindow::CreateDevToolsBrowser() {
|
||||
Browser::CreationStatus::kOk) {
|
||||
return;
|
||||
}
|
||||
@@ -62,7 +59,6 @@ index 615de49f749ac..dc02b861c6e4c 100644
|
||||
- OwnedMainWebContents::TakeWebContents(
|
||||
- std::move(owned_main_web_contents_)),
|
||||
- -1, ui::PAGE_TRANSITION_AUTO_TOPLEVEL, AddTabTypes::ADD_ACTIVE);
|
||||
+
|
||||
+ auto* inspected_web_contents = GetInspectedWebContents();
|
||||
+ auto* opener = chrome::FindBrowserWithTab(inspected_web_contents);
|
||||
+ auto devtools_contents = OwnedMainWebContents::TakeWebContents(
|
||||
@@ -83,12 +79,11 @@ index 615de49f749ac..dc02b861c6e4c 100644
|
||||
+ std::move(devtools_contents),
|
||||
+ -1, ui::PAGE_TRANSITION_AUTO_TOPLEVEL, AddTabTypes::ADD_ACTIVE);
|
||||
+ }
|
||||
+
|
||||
#endif
|
||||
OverrideAndSyncDevToolsRendererPrefs();
|
||||
}
|
||||
|
||||
diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn
|
||||
index 0ed6e9e434350..5c8bcd5c45ede 100644
|
||||
index ba0cba1897577..82bb0ac855dc2 100644
|
||||
--- chrome/browser/ui/BUILD.gn
|
||||
+++ chrome/browser/ui/BUILD.gn
|
||||
@@ -7,6 +7,7 @@ import("//build/config/compiler/compiler.gni")
|
||||
@@ -99,7 +94,7 @@ index 0ed6e9e434350..5c8bcd5c45ede 100644
|
||||
import("//chrome/browser/buildflags.gni")
|
||||
import("//chrome/common/features.gni")
|
||||
import("//chromeos/ash/components/assistant/assistant.gni")
|
||||
@@ -301,6 +302,10 @@ static_library("ui") {
|
||||
@@ -302,6 +303,10 @@ static_library("ui") {
|
||||
"//build/config/compiler:wexit_time_destructors",
|
||||
]
|
||||
|
||||
@@ -110,7 +105,7 @@ index 0ed6e9e434350..5c8bcd5c45ede 100644
|
||||
public_deps = [
|
||||
# WARNING WARNING WARNING
|
||||
# New dependencies outside of //chrome/browser should be added to
|
||||
@@ -328,6 +333,7 @@ static_library("ui") {
|
||||
@@ -329,6 +334,7 @@ static_library("ui") {
|
||||
"//build/config/chromebox_for_meetings:buildflags",
|
||||
"//build/config/linux/dbus:buildflags",
|
||||
"//cc/paint",
|
||||
@@ -118,7 +113,7 @@ index 0ed6e9e434350..5c8bcd5c45ede 100644
|
||||
"//chrome:resources",
|
||||
"//chrome:strings",
|
||||
"//chrome/app:chrome_dll_resources",
|
||||
@@ -698,6 +704,13 @@ static_library("ui") {
|
||||
@@ -704,6 +710,13 @@ static_library("ui") {
|
||||
deps += [ "//components/plus_addresses/resources:vector_icons" ]
|
||||
}
|
||||
|
||||
@@ -132,7 +127,7 @@ index 0ed6e9e434350..5c8bcd5c45ede 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.
|
||||
@@ -5476,6 +5489,7 @@ static_library("ui") {
|
||||
@@ -5504,6 +5517,7 @@ static_library("ui") {
|
||||
if (enable_printing) {
|
||||
deps += [
|
||||
"//components/printing/browser",
|
||||
@@ -141,10 +136,10 @@ index 0ed6e9e434350..5c8bcd5c45ede 100644
|
||||
]
|
||||
}
|
||||
diff --git chrome/browser/ui/browser.cc chrome/browser/ui/browser.cc
|
||||
index fafd84d08e336..0985c4cd9ebf0 100644
|
||||
index d45f8f1713c87..7d69f3d8bd4cc 100644
|
||||
--- chrome/browser/ui/browser.cc
|
||||
+++ chrome/browser/ui/browser.cc
|
||||
@@ -268,6 +268,25 @@
|
||||
@@ -272,6 +272,25 @@
|
||||
#include "components/captive_portal/content/captive_portal_tab_helper.h"
|
||||
#endif
|
||||
|
||||
@@ -170,7 +165,7 @@ index fafd84d08e336..0985c4cd9ebf0 100644
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
#include "chrome/browser/extensions/extension_browser_window_helper.h"
|
||||
#endif
|
||||
@@ -563,6 +582,10 @@ Browser::Browser(const CreateParams& params)
|
||||
@@ -571,6 +590,10 @@ Browser::Browser(const CreateParams& params)
|
||||
type_(params.type),
|
||||
profile_(params.profile),
|
||||
window_(nullptr),
|
||||
@@ -181,7 +176,7 @@ index fafd84d08e336..0985c4cd9ebf0 100644
|
||||
tab_strip_model_delegate_(
|
||||
std::make_unique<chrome::BrowserTabStripModelDelegate>(this)),
|
||||
tab_strip_model_(std::make_unique<TabStripModel>(
|
||||
@@ -800,6 +823,12 @@ Browser::~Browser() {
|
||||
@@ -818,6 +841,12 @@ Browser::~Browser() {
|
||||
if (select_file_dialog_.get()) {
|
||||
select_file_dialog_->ListenerDestroyed();
|
||||
}
|
||||
@@ -194,7 +189,18 @@ index fafd84d08e336..0985c4cd9ebf0 100644
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@@ -1404,6 +1433,8 @@ void Browser::WindowFullscreenStateChanged() {
|
||||
@@ -1275,6 +1304,10 @@ BrowserWindowInterface::Type Browser::GetType() const {
|
||||
return type_;
|
||||
}
|
||||
|
||||
+bool Browser::IsNormalBrowser() const {
|
||||
+ return BrowserWindowFeatures::IsNormalBrowser(this);
|
||||
+}
|
||||
+
|
||||
BrowserUserEducationInterface* Browser::GetUserEducationInterface() {
|
||||
return window();
|
||||
}
|
||||
@@ -1436,6 +1469,8 @@ void Browser::WindowFullscreenStateChanged() {
|
||||
->WindowFullscreenStateChanged();
|
||||
command_controller_->FullscreenStateChanged();
|
||||
UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TOGGLE_FULLSCREEN);
|
||||
@@ -203,7 +209,7 @@ index fafd84d08e336..0985c4cd9ebf0 100644
|
||||
}
|
||||
|
||||
void Browser::FullscreenTopUIStateChanged() {
|
||||
@@ -1752,6 +1783,15 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent(
|
||||
@@ -1807,6 +1842,15 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent(
|
||||
return content::KeyboardEventProcessingResult::HANDLED;
|
||||
}
|
||||
|
||||
@@ -219,7 +225,7 @@ index fafd84d08e336..0985c4cd9ebf0 100644
|
||||
return window()->PreHandleKeyboardEvent(event);
|
||||
}
|
||||
|
||||
@@ -1759,8 +1799,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source,
|
||||
@@ -1814,8 +1858,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source,
|
||||
const NativeWebKeyboardEvent& event) {
|
||||
DevToolsWindow* devtools_window =
|
||||
DevToolsWindow::GetInstanceForInspectedWebContents(source);
|
||||
@@ -240,7 +246,7 @@ index fafd84d08e336..0985c4cd9ebf0 100644
|
||||
}
|
||||
|
||||
bool Browser::TabsNeedBeforeUnloadFired() const {
|
||||
@@ -1855,9 +1905,14 @@ bool Browser::IsBackForwardCacheSupported(content::WebContents& web_contents) {
|
||||
@@ -1910,9 +1964,14 @@ bool Browser::IsBackForwardCacheSupported(content::WebContents& web_contents) {
|
||||
content::PreloadingEligibility Browser::IsPrerender2Supported(
|
||||
content::WebContents& web_contents,
|
||||
content::PreloadingTriggerType trigger_type) {
|
||||
@@ -255,7 +261,7 @@ index fafd84d08e336..0985c4cd9ebf0 100644
|
||||
}
|
||||
|
||||
bool Browser::ShouldShowStaleContentOnEviction(content::WebContents* source) {
|
||||
@@ -1920,6 +1975,14 @@ WebContents* Browser::OpenURLFromTab(
|
||||
@@ -1975,6 +2034,14 @@ WebContents* Browser::OpenURLFromTab(
|
||||
std::move(navigation_handle_callback));
|
||||
}
|
||||
|
||||
@@ -270,7 +276,7 @@ index fafd84d08e336..0985c4cd9ebf0 100644
|
||||
NavigateParams nav_params(this, params.url, params.transition);
|
||||
nav_params.FillNavigateParamsFromOpenURLParams(params);
|
||||
nav_params.source_contents = source;
|
||||
@@ -2093,6 +2156,8 @@ void Browser::LoadingStateChanged(WebContents* source,
|
||||
@@ -2148,6 +2215,8 @@ void Browser::LoadingStateChanged(WebContents* source,
|
||||
bool should_show_loading_ui) {
|
||||
ScheduleUIUpdate(source, content::INVALIDATE_TYPE_LOAD);
|
||||
UpdateWindowForLoadingStateChanged(source, should_show_loading_ui);
|
||||
@@ -279,16 +285,16 @@ index fafd84d08e336..0985c4cd9ebf0 100644
|
||||
}
|
||||
|
||||
void Browser::CloseContents(WebContents* source) {
|
||||
@@ -2122,6 +2187,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) {
|
||||
@@ -2177,6 +2246,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) {
|
||||
}
|
||||
|
||||
void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
|
||||
+ CALL_CEF_DELEGATE(UpdateTargetURL, source, url);
|
||||
+
|
||||
if (!GetStatusBubble()) {
|
||||
return;
|
||||
}
|
||||
@@ -2131,6 +2198,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
|
||||
std::vector<StatusBubble*> status_bubbles = GetStatusBubbles();
|
||||
for (StatusBubble* status_bubble : status_bubbles) {
|
||||
StatusBubbleViews* status_bubble_views =
|
||||
@@ -2190,6 +2261,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -306,7 +312,7 @@ index fafd84d08e336..0985c4cd9ebf0 100644
|
||||
void Browser::ContentsMouseEvent(WebContents* source, const ui::Event& event) {
|
||||
const ui::EventType type = event.type();
|
||||
const bool exited = type == ui::EventType::kMouseExited;
|
||||
@@ -2156,9 +2234,23 @@ void Browser::ContentsZoomChange(bool zoom_in) {
|
||||
@@ -2223,9 +2305,23 @@ void Browser::ContentsZoomChange(bool zoom_in) {
|
||||
}
|
||||
|
||||
bool Browser::TakeFocus(content::WebContents* source, bool reverse) {
|
||||
@@ -330,7 +336,7 @@ index fafd84d08e336..0985c4cd9ebf0 100644
|
||||
void Browser::BeforeUnloadFired(WebContents* web_contents,
|
||||
bool proceed,
|
||||
bool* proceed_to_fire_unload) {
|
||||
@@ -2271,12 +2363,24 @@ void Browser::WebContentsCreated(WebContents* source_contents,
|
||||
@@ -2338,12 +2434,24 @@ void Browser::WebContentsCreated(WebContents* source_contents,
|
||||
// to track `new_contents` after it is added to its TabModel this override can
|
||||
// be removed.
|
||||
CreateSessionServiceTabHelper(new_contents);
|
||||
@@ -355,7 +361,7 @@ index fafd84d08e336..0985c4cd9ebf0 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();
|
||||
@@ -2289,6 +2393,13 @@ void Browser::RendererUnresponsive(
|
||||
@@ -2356,6 +2464,13 @@ void Browser::RendererUnresponsive(
|
||||
void Browser::RendererResponsive(
|
||||
WebContents* source,
|
||||
content::RenderWidgetHost* render_widget_host) {
|
||||
@@ -369,7 +375,7 @@ index fafd84d08e336..0985c4cd9ebf0 100644
|
||||
RenderWidgetHostView* view = render_widget_host->GetView();
|
||||
if (view && !render_widget_host->GetView()->IsHTMLFormPopup()) {
|
||||
TabDialogs::FromWebContents(source)->HideHungRendererDialog(
|
||||
@@ -2298,6 +2409,15 @@ void Browser::RendererResponsive(
|
||||
@@ -2365,6 +2480,15 @@ void Browser::RendererResponsive(
|
||||
|
||||
content::JavaScriptDialogManager* Browser::GetJavaScriptDialogManager(
|
||||
WebContents* source) {
|
||||
@@ -385,7 +391,7 @@ index fafd84d08e336..0985c4cd9ebf0 100644
|
||||
return javascript_dialogs::TabModalDialogManager::FromWebContents(source);
|
||||
}
|
||||
|
||||
@@ -2333,6 +2453,11 @@ void Browser::DraggableRegionsChanged(
|
||||
@@ -2400,6 +2524,11 @@ void Browser::DraggableRegionsChanged(
|
||||
if (app_controller_) {
|
||||
app_controller_->DraggableRegionsChanged(regions, contents);
|
||||
}
|
||||
@@ -396,8 +402,8 @@ index fafd84d08e336..0985c4cd9ebf0 100644
|
||||
+#endif
|
||||
}
|
||||
|
||||
void Browser::DidFinishNavigation(
|
||||
@@ -2415,11 +2540,15 @@ void Browser::EnterFullscreenModeForTab(
|
||||
std::vector<blink::mojom::RelatedApplicationPtr>
|
||||
@@ -2514,11 +2643,15 @@ void Browser::EnterFullscreenModeForTab(
|
||||
const blink::mojom::FullscreenOptions& options) {
|
||||
exclusive_access_manager_->fullscreen_controller()->EnterFullscreenModeForTab(
|
||||
requesting_frame, options.display_id);
|
||||
@@ -413,7 +419,7 @@ index fafd84d08e336..0985c4cd9ebf0 100644
|
||||
}
|
||||
|
||||
bool Browser::IsFullscreenForTabOrPending(const WebContents* web_contents) {
|
||||
@@ -2629,6 +2758,16 @@ void Browser::RequestMediaAccessPermission(
|
||||
@@ -2728,6 +2861,16 @@ void Browser::RequestMediaAccessPermission(
|
||||
content::WebContents* web_contents,
|
||||
const content::MediaStreamRequest& request,
|
||||
content::MediaResponseCallback callback) {
|
||||
@@ -430,19 +436,20 @@ index fafd84d08e336..0985c4cd9ebf0 100644
|
||||
const extensions::Extension* extension =
|
||||
GetExtensionForOrigin(profile_, request.security_origin);
|
||||
MediaCaptureDevicesDispatcher::GetInstance()->ProcessMediaAccessRequest(
|
||||
@@ -3211,9 +3350,10 @@ void Browser::RemoveScheduledUpdatesFor(WebContents* contents) {
|
||||
@@ -3313,9 +3456,11 @@ void Browser::RemoveScheduledUpdatesFor(WebContents* contents) {
|
||||
// Browser, Getters for UI (private):
|
||||
|
||||
StatusBubble* Browser::GetStatusBubble() {
|
||||
std::vector<StatusBubble*> Browser::GetStatusBubbles() {
|
||||
+ bool show_by_default = true;
|
||||
+
|
||||
// For kiosk and exclusive app mode we want to always hide the status bubble.
|
||||
if (IsRunningInAppMode()) {
|
||||
- return nullptr;
|
||||
- return {};
|
||||
+ show_by_default = false;
|
||||
}
|
||||
|
||||
// We hide the status bar for web apps windows as this matches native
|
||||
@@ -3221,6 +3361,12 @@ StatusBubble* Browser::GetStatusBubble() {
|
||||
@@ -3323,6 +3468,12 @@ std::vector<StatusBubble*> Browser::GetStatusBubbles() {
|
||||
// mode, as the minimal browser UI includes the status bar.
|
||||
if (web_app::AppBrowserController::IsWebApp(this) &&
|
||||
!app_controller()->HasMinimalUiButtons()) {
|
||||
@@ -452,10 +459,10 @@ index fafd84d08e336..0985c4cd9ebf0 100644
|
||||
+ bool show = show_by_default;
|
||||
+ CALL_CEF_DELEGATE_RESULT(ShowStatusBubble, show, show_by_default);
|
||||
+ if (!show) {
|
||||
return nullptr;
|
||||
return {};
|
||||
}
|
||||
|
||||
@@ -3370,6 +3516,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) {
|
||||
@@ -3476,6 +3627,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) {
|
||||
BookmarkTabHelper::FromWebContents(web_contents)->RemoveObserver(this);
|
||||
web_contents_collection_.StopObserving(web_contents);
|
||||
}
|
||||
@@ -464,7 +471,7 @@ index fafd84d08e336..0985c4cd9ebf0 100644
|
||||
}
|
||||
|
||||
void Browser::TabDetachedAtImpl(content::WebContents* contents,
|
||||
@@ -3530,6 +3678,14 @@ bool Browser::PictureInPictureBrowserSupportsWindowFeature(
|
||||
@@ -3637,6 +3790,14 @@ bool Browser::PictureInPictureBrowserSupportsWindowFeature(
|
||||
|
||||
bool Browser::SupportsWindowFeatureImpl(WindowFeature feature,
|
||||
bool check_can_support) const {
|
||||
@@ -480,7 +487,7 @@ index fafd84d08e336..0985c4cd9ebf0 100644
|
||||
case TYPE_NORMAL:
|
||||
return NormalBrowserSupportsWindowFeature(feature, check_can_support);
|
||||
diff --git chrome/browser/ui/browser.h chrome/browser/ui/browser.h
|
||||
index 8fda0dfbe8e10..a48a32fe5d08e 100644
|
||||
index ce1e404e45a60..7193496de6b31 100644
|
||||
--- chrome/browser/ui/browser.h
|
||||
+++ chrome/browser/ui/browser.h
|
||||
@@ -24,6 +24,7 @@
|
||||
@@ -502,7 +509,7 @@ index 8fda0dfbe8e10..a48a32fe5d08e 100644
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
#error This file should only be included on desktop.
|
||||
#endif
|
||||
@@ -338,6 +343,15 @@ class Browser : public TabStripModelObserver,
|
||||
@@ -351,6 +356,15 @@ class Browser : public TabStripModelObserver,
|
||||
// Document Picture in Picture options, specific to TYPE_PICTURE_IN_PICTURE.
|
||||
std::optional<blink::mojom::PictureInPictureWindowOptions> pip_options;
|
||||
|
||||
@@ -518,7 +525,7 @@ index 8fda0dfbe8e10..a48a32fe5d08e 100644
|
||||
private:
|
||||
friend class Browser;
|
||||
friend class WindowSizerChromeOSTest;
|
||||
@@ -421,6 +435,13 @@ class Browser : public TabStripModelObserver,
|
||||
@@ -434,6 +448,13 @@ class Browser : public TabStripModelObserver,
|
||||
update_ui_immediately_for_testing_ = true;
|
||||
}
|
||||
|
||||
@@ -532,7 +539,7 @@ index 8fda0dfbe8e10..a48a32fe5d08e 100644
|
||||
// Accessors ////////////////////////////////////////////////////////////////
|
||||
|
||||
const CreateParams& create_params() const { return create_params_; }
|
||||
@@ -522,6 +543,12 @@ class Browser : public TabStripModelObserver,
|
||||
@@ -535,6 +556,12 @@ class Browser : public TabStripModelObserver,
|
||||
base::WeakPtr<Browser> AsWeakPtr();
|
||||
base::WeakPtr<const Browser> AsWeakPtr() const;
|
||||
|
||||
@@ -545,7 +552,15 @@ index 8fda0dfbe8e10..a48a32fe5d08e 100644
|
||||
// Get the FindBarController for this browser, creating it if it does not
|
||||
// yet exist.
|
||||
FindBarController* GetFindBarController();
|
||||
@@ -966,10 +993,18 @@ class Browser : public TabStripModelObserver,
|
||||
@@ -889,6 +916,7 @@ class Browser : public TabStripModelObserver,
|
||||
ImmersiveModeController* GetImmersiveModeController() override;
|
||||
BrowserActions* GetActions() override;
|
||||
Type GetType() const override;
|
||||
+ bool IsNormalBrowser() const override;
|
||||
BrowserUserEducationInterface* GetUserEducationInterface() override;
|
||||
web_app::AppBrowserController* GetAppBrowserController() override;
|
||||
std::vector<tabs::TabInterface*> GetAllTabInterfaces() override;
|
||||
@@ -991,10 +1019,18 @@ class Browser : public TabStripModelObserver,
|
||||
void SetContentsBounds(content::WebContents* source,
|
||||
const gfx::Rect& bounds) override;
|
||||
void UpdateTargetURL(content::WebContents* source, const GURL& url) override;
|
||||
@@ -564,7 +579,7 @@ index 8fda0dfbe8e10..a48a32fe5d08e 100644
|
||||
void BeforeUnloadFired(content::WebContents* source,
|
||||
bool proceed,
|
||||
bool* proceed_to_fire_unload) override;
|
||||
@@ -1310,6 +1345,10 @@ class Browser : public TabStripModelObserver,
|
||||
@@ -1341,6 +1377,10 @@ class Browser : public TabStripModelObserver,
|
||||
// The active state of this browser.
|
||||
bool is_active_ = false;
|
||||
|
||||
@@ -575,7 +590,7 @@ index 8fda0dfbe8e10..a48a32fe5d08e 100644
|
||||
std::unique_ptr<TabStripModelDelegate> const tab_strip_model_delegate_;
|
||||
std::unique_ptr<TabStripModel> const tab_strip_model_;
|
||||
|
||||
@@ -1376,6 +1415,8 @@ class Browser : public TabStripModelObserver,
|
||||
@@ -1407,6 +1447,8 @@ class Browser : public TabStripModelObserver,
|
||||
const std::string initial_workspace_;
|
||||
bool initial_visible_on_all_workspaces_state_;
|
||||
|
||||
@@ -655,14 +670,15 @@ index 83a510defbda5..f4305701c5f5a 100644
|
||||
params.source_contents = source_contents;
|
||||
params.url = target_url;
|
||||
diff --git chrome/browser/ui/browser_window/browser_window_features.cc chrome/browser/ui/browser_window/browser_window_features.cc
|
||||
index 0cdf3de9047f3..291fe0fb0e81e 100644
|
||||
index 274b403d01d91..4dd3239bf5f48 100644
|
||||
--- chrome/browser/ui/browser_window/browser_window_features.cc
|
||||
+++ chrome/browser/ui/browser_window/browser_window_features.cc
|
||||
@@ -73,6 +73,14 @@ BrowserWindowFeatures::BrowserWindowFeaturesFactory& GetFactory() {
|
||||
return *factory;
|
||||
}
|
||||
@@ -92,6 +92,15 @@ BrowserWindowFeatures::CreateBrowserWindowFeatures() {
|
||||
|
||||
+bool IsNormalBrowser(Browser* browser) {
|
||||
BrowserWindowFeatures::~BrowserWindowFeatures() = default;
|
||||
|
||||
+// static
|
||||
+bool BrowserWindowFeatures::IsNormalBrowser(const Browser* browser) {
|
||||
+ // CEF normal browsers have TYPE_POPUP.
|
||||
+ if (browser->is_type_popup() && browser->cef_delegate()) {
|
||||
+ return true;
|
||||
@@ -670,10 +686,10 @@ index 0cdf3de9047f3..291fe0fb0e81e 100644
|
||||
+ return browser->is_type_normal();
|
||||
+}
|
||||
+
|
||||
} // namespace
|
||||
|
||||
// static
|
||||
@@ -162,10 +170,12 @@ void BrowserWindowFeatures::Init(BrowserWindowInterface* browser) {
|
||||
void BrowserWindowFeatures::ReplaceBrowserWindowFeaturesForTesting(
|
||||
BrowserWindowFeaturesFactory factory) {
|
||||
@@ -168,10 +177,12 @@ void BrowserWindowFeatures::Init(BrowserWindowInterface* browser) {
|
||||
}
|
||||
|
||||
void BrowserWindowFeatures::InitPostWindowConstruction(Browser* browser) {
|
||||
@@ -687,7 +703,7 @@ index 0cdf3de9047f3..291fe0fb0e81e 100644
|
||||
if (IsChromeLabsEnabled()) {
|
||||
chrome_labs_coordinator_ =
|
||||
std::make_unique<ChromeLabsCoordinator>(browser);
|
||||
@@ -207,7 +217,7 @@ void BrowserWindowFeatures::InitPostWindowConstruction(Browser* browser) {
|
||||
@@ -213,7 +224,7 @@ void BrowserWindowFeatures::InitPostWindowConstruction(Browser* browser) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -696,7 +712,7 @@ index 0cdf3de9047f3..291fe0fb0e81e 100644
|
||||
base::FeatureList::IsEnabled(toast_features::kToastFramework)) {
|
||||
toast_service_ = std::make_unique<ToastService>(browser);
|
||||
}
|
||||
@@ -240,10 +250,12 @@ void BrowserWindowFeatures::InitPostBrowserViewConstruction(
|
||||
@@ -251,10 +262,12 @@ void BrowserWindowFeatures::InitPostBrowserViewConstruction(
|
||||
browser_view->browser(),
|
||||
side_panel_coordinator_->GetWindowRegistry());
|
||||
|
||||
@@ -710,3 +726,45 @@ index 0cdf3de9047f3..291fe0fb0e81e 100644
|
||||
#if BUILDFLAG(ENABLE_GLIC)
|
||||
if (glic::GlicEnabling::IsProfileEligible(
|
||||
browser_view->browser()->profile())) {
|
||||
diff --git chrome/browser/ui/browser_window/public/browser_window_features.h chrome/browser/ui/browser_window/public/browser_window_features.h
|
||||
index a318b2507f3ca..04bed96bbe382 100644
|
||||
--- chrome/browser/ui/browser_window/public/browser_window_features.h
|
||||
+++ chrome/browser/ui/browser_window/public/browser_window_features.h
|
||||
@@ -81,6 +81,8 @@ class BrowserWindowFeatures {
|
||||
static std::unique_ptr<BrowserWindowFeatures> CreateBrowserWindowFeatures();
|
||||
virtual ~BrowserWindowFeatures();
|
||||
|
||||
+ static bool IsNormalBrowser(const Browser* browser);
|
||||
+
|
||||
BrowserWindowFeatures(const BrowserWindowFeatures&) = delete;
|
||||
BrowserWindowFeatures& operator=(const BrowserWindowFeatures&) = delete;
|
||||
|
||||
diff --git chrome/browser/ui/browser_window/public/browser_window_interface.h chrome/browser/ui/browser_window/public/browser_window_interface.h
|
||||
index f2b51e7923e96..644d0655ea6c9 100644
|
||||
--- chrome/browser/ui/browser_window/public/browser_window_interface.h
|
||||
+++ chrome/browser/ui/browser_window/public/browser_window_interface.h
|
||||
@@ -196,6 +196,10 @@ class BrowserWindowInterface : public content::PageNavigator {
|
||||
};
|
||||
virtual Type GetType() const = 0;
|
||||
|
||||
+ // Returns true if this is a normal browser as determined by
|
||||
+ // BrowserWindowFeatures::IsNormalBrowser.
|
||||
+ virtual bool IsNormalBrowser() const = 0;
|
||||
+
|
||||
// Gets an object that provides common per-browser-window functionality for
|
||||
// user education. The remainder of functionality is provided directly by the
|
||||
// UserEducationService, which can be retrieved directly from the profile.
|
||||
diff --git chrome/browser/ui/views/frame/tab_strip_region_view.cc chrome/browser/ui/views/frame/tab_strip_region_view.cc
|
||||
index b0a946ad9168f..0f7daf3eb0255 100644
|
||||
--- chrome/browser/ui/views/frame/tab_strip_region_view.cc
|
||||
+++ chrome/browser/ui/views/frame/tab_strip_region_view.cc
|
||||
@@ -118,8 +118,7 @@ TabStripRegionView::TabStripRegionView(std::unique_ptr<TabStrip> tab_strip)
|
||||
std::unique_ptr<TabStripActionContainer> tab_strip_action_container;
|
||||
std::unique_ptr<TabStripComboButton> tab_strip_combo_button;
|
||||
std::unique_ptr<ProductSpecificationsButton> product_specifications_button;
|
||||
- if (browser &&
|
||||
- (browser->GetType() == BrowserWindowInterface::Type::TYPE_NORMAL)) {
|
||||
+ if (browser && browser->IsNormalBrowser()) {
|
||||
if (features::IsTabSearchMoving() &&
|
||||
!features::HasTabSearchToolbarButton() &&
|
||||
ShouldShowNewTabButton(browser)) {
|
||||
|
@@ -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 d73cefd1f7df0..f69a7771cc61f 100644
|
||||
index 60543740c1b66..0f76b20df356a 100644
|
||||
--- chrome/browser/renderer_context_menu/render_view_context_menu.cc
|
||||
+++ chrome/browser/renderer_context_menu/render_view_context_menu.cc
|
||||
@@ -352,6 +352,18 @@ base::OnceCallback<void(RenderViewContextMenu*)>* GetMenuShownCallback() {
|
||||
@@ -351,6 +351,18 @@ base::OnceCallback<void(RenderViewContextMenu*)>* GetMenuShownCallback() {
|
||||
return callback.get();
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ index d73cefd1f7df0..f69a7771cc61f 100644
|
||||
enum class UmaEnumIdLookupType {
|
||||
GeneralEnumId,
|
||||
ContextSpecificEnumId,
|
||||
@@ -624,6 +636,10 @@ int FindUMAEnumValueForCommand(int id, UmaEnumIdLookupType type) {
|
||||
@@ -623,6 +635,10 @@ int FindUMAEnumValueForCommand(int id, UmaEnumIdLookupType type) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ index d73cefd1f7df0..f69a7771cc61f 100644
|
||||
id = CollapseCommandsForUMA(id);
|
||||
const auto& map = GetIdcToUmaMap(type);
|
||||
auto it = map.find(id);
|
||||
@@ -895,6 +911,14 @@ RenderViewContextMenu::RenderViewContextMenu(
|
||||
@@ -894,6 +910,14 @@ RenderViewContextMenu::RenderViewContextMenu(
|
||||
: nullptr;
|
||||
#endif // BUILDFLAG(IS_CHROMEOS)
|
||||
|
||||
@@ -60,7 +60,7 @@ index d73cefd1f7df0..f69a7771cc61f 100644
|
||||
}
|
||||
|
||||
Profile* RenderViewContextMenu::GetProfile() const {
|
||||
@@ -3631,6 +3661,26 @@ void RenderViewContextMenu::RemoveObserverForTesting(
|
||||
@@ -3643,6 +3673,26 @@ void RenderViewContextMenu::RemoveObserverForTesting(
|
||||
observers_.RemoveObserver(observer);
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ index d73cefd1f7df0..f69a7771cc61f 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 f9c86beaffb8e..a330e66b1970e 100644
|
||||
index 9bf603dbf73a5..3f9b1ff9f384d 100644
|
||||
--- chrome/browser/renderer_context_menu/render_view_context_menu.h
|
||||
+++ chrome/browser/renderer_context_menu/render_view_context_menu.h
|
||||
@@ -158,7 +158,21 @@ class RenderViewContextMenu
|
||||
@@ -113,7 +113,7 @@ index f9c86beaffb8e..a330e66b1970e 100644
|
||||
Profile* GetProfile() const;
|
||||
|
||||
// This may return nullptr (e.g. for WebUI dialogs). Virtual to allow tests to
|
||||
@@ -482,6 +496,9 @@ class RenderViewContextMenu
|
||||
@@ -483,6 +497,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 5e266a42d3df6..e57211944d6a6 100644
|
||||
index 2e34cf104fbe6..850489d12a458 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
|
||||
@@ -70,6 +70,10 @@ RenderViewContextMenuMacCocoa::~RenderViewContextMenuMacCocoa() {
|
||||
@@ -150,7 +150,7 @@ index 5e266a42d3df6..e57211944d6a6 100644
|
||||
views::Widget* widget = views::Widget::GetTopLevelWidgetForNativeView(
|
||||
source_web_contents_->GetNativeView());
|
||||
|
||||
@@ -95,6 +99,10 @@ void RenderViewContextMenuMacCocoa::Show() {
|
||||
@@ -94,6 +98,10 @@ void RenderViewContextMenuMacCocoa::Show() {
|
||||
views::ElementTrackerViews::GetContextForWidget(widget));
|
||||
}
|
||||
|
||||
@@ -277,7 +277,7 @@ index 07e5b3613a2df..293282690bd5a 100644
|
||||
private:
|
||||
content::RenderWidgetHostView* GetActiveRenderWidgetHostView() const;
|
||||
diff --git chrome/browser/ui/views/tab_contents/chrome_web_contents_view_delegate_views_mac.mm chrome/browser/ui/views/tab_contents/chrome_web_contents_view_delegate_views_mac.mm
|
||||
index 065e21f80dbe5..013403577470c 100644
|
||||
index cd47821f35450..9a1924dea979c 100644
|
||||
--- chrome/browser/ui/views/tab_contents/chrome_web_contents_view_delegate_views_mac.mm
|
||||
+++ chrome/browser/ui/views/tab_contents/chrome_web_contents_view_delegate_views_mac.mm
|
||||
@@ -133,6 +133,10 @@ void ChromeWebContentsViewDelegateViewsMac::ShowMenu(
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git chrome/browser/devtools/chrome_devtools_manager_delegate.cc chrome/browser/devtools/chrome_devtools_manager_delegate.cc
|
||||
index 692e883ad3b60..4b45234cea0bc 100644
|
||||
index f61d3618965cd..7c632c85d5e48 100644
|
||||
--- chrome/browser/devtools/chrome_devtools_manager_delegate.cc
|
||||
+++ chrome/browser/devtools/chrome_devtools_manager_delegate.cc
|
||||
@@ -14,6 +14,7 @@
|
||||
@@ -10,8 +10,8 @@ index 692e883ad3b60..4b45234cea0bc 100644
|
||||
#include "chrome/browser/browser_features.h"
|
||||
#include "chrome/browser/devtools/chrome_devtools_session.h"
|
||||
#include "chrome/browser/devtools/device/android_device_manager.h"
|
||||
@@ -66,6 +67,10 @@
|
||||
#include "components/prefs/pref_service.h"
|
||||
@@ -65,6 +66,10 @@
|
||||
#include "chromeos/constants/chromeos_features.h"
|
||||
#endif
|
||||
|
||||
+#if BUILDFLAG(ENABLE_CEF)
|
||||
@@ -21,7 +21,7 @@ index 692e883ad3b60..4b45234cea0bc 100644
|
||||
using content::DevToolsAgentHost;
|
||||
|
||||
const char ChromeDevToolsManagerDelegate::kTypeApp[] = "app";
|
||||
@@ -280,6 +285,12 @@ std::string ChromeDevToolsManagerDelegate::GetTargetType(
|
||||
@@ -259,6 +264,12 @@ std::string ChromeDevToolsManagerDelegate::GetTargetType(
|
||||
return DevToolsAgentHost::kTypePage;
|
||||
}
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git chrome/browser/ui/javascript_dialogs/javascript_tab_modal_dialog_manager_delegate_desktop.cc chrome/browser/ui/javascript_dialogs/javascript_tab_modal_dialog_manager_delegate_desktop.cc
|
||||
index 39012b26b2fd6..1b6cf3097ba40 100644
|
||||
index 8b3ce4e53ef25..7fcec86f074e3 100644
|
||||
--- chrome/browser/ui/javascript_dialogs/javascript_tab_modal_dialog_manager_delegate_desktop.cc
|
||||
+++ chrome/browser/ui/javascript_dialogs/javascript_tab_modal_dialog_manager_delegate_desktop.cc
|
||||
@@ -6,6 +6,7 @@
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git chrome/browser/file_select_helper.cc chrome/browser/file_select_helper.cc
|
||||
index c3d8a9929e1f3..db4806237472f 100644
|
||||
index f03a163dd1e2d..128f3b80d3684 100644
|
||||
--- chrome/browser/file_select_helper.cc
|
||||
+++ chrome/browser/file_select_helper.cc
|
||||
@@ -311,6 +311,12 @@ void FileSelectHelper::OnListDone(int error) {
|
||||
@@ -310,6 +310,12 @@ void FileSelectHelper::OnListDone(int error) {
|
||||
}
|
||||
|
||||
if (dialog_type_ == ui::SelectFileDialog::SELECT_UPLOAD_FOLDER) {
|
||||
@@ -15,7 +15,7 @@ index c3d8a9929e1f3..db4806237472f 100644
|
||||
auto model = CreateConfirmationDialog(
|
||||
entry->display_name_, std::move(chooser_files),
|
||||
base::BindOnce(&FileSelectHelper::PerformContentAnalysisIfNeeded,
|
||||
@@ -509,31 +515,51 @@ FileSelectHelper::GetFileTypesFromAcceptType(
|
||||
@@ -508,31 +514,51 @@ FileSelectHelper::GetFileTypesFromAcceptType(
|
||||
std::vector<base::FilePath::StringType>* extensions =
|
||||
&file_type->extensions.back();
|
||||
|
||||
@@ -71,7 +71,7 @@ index c3d8a9929e1f3..db4806237472f 100644
|
||||
if (extensions->size() > old_extension_size)
|
||||
valid_type_count++;
|
||||
}
|
||||
@@ -550,12 +576,28 @@ FileSelectHelper::GetFileTypesFromAcceptType(
|
||||
@@ -549,12 +575,28 @@ FileSelectHelper::GetFileTypesFromAcceptType(
|
||||
// dialog uses the first extension in the list to form the description,
|
||||
// like "EHTML Files". This is not what we want.
|
||||
if (valid_type_count > 1 ||
|
||||
@@ -104,7 +104,7 @@ index c3d8a9929e1f3..db4806237472f 100644
|
||||
}
|
||||
|
||||
return file_type;
|
||||
@@ -565,7 +607,8 @@ FileSelectHelper::GetFileTypesFromAcceptType(
|
||||
@@ -564,7 +606,8 @@ FileSelectHelper::GetFileTypesFromAcceptType(
|
||||
void FileSelectHelper::RunFileChooser(
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
scoped_refptr<content::FileSelectListener> listener,
|
||||
@@ -114,7 +114,7 @@ index c3d8a9929e1f3..db4806237472f 100644
|
||||
Profile* profile = Profile::FromBrowserContext(
|
||||
render_frame_host->GetProcess()->GetBrowserContext());
|
||||
|
||||
@@ -573,6 +616,7 @@ void FileSelectHelper::RunFileChooser(
|
||||
@@ -572,6 +615,7 @@ void FileSelectHelper::RunFileChooser(
|
||||
// message.
|
||||
scoped_refptr<FileSelectHelper> file_select_helper(
|
||||
new FileSelectHelper(profile));
|
||||
@@ -123,7 +123,7 @@ index c3d8a9929e1f3..db4806237472f 100644
|
||||
params.Clone());
|
||||
}
|
||||
diff --git chrome/browser/file_select_helper.h chrome/browser/file_select_helper.h
|
||||
index f007afe754be8..36f8ae45c5ee1 100644
|
||||
index e5b8c7d6e7b0a..6fcbf246159ae 100644
|
||||
--- chrome/browser/file_select_helper.h
|
||||
+++ chrome/browser/file_select_helper.h
|
||||
@@ -64,7 +64,8 @@ class FileSelectHelper : public base::RefCountedThreadSafe<
|
||||
@@ -143,9 +143,9 @@ index f007afe754be8..36f8ae45c5ee1 100644
|
||||
+ // Set to true if this dialog was triggered via CEF.
|
||||
+ bool run_from_cef_ = false;
|
||||
+
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
base::WeakPtrFactory<FileSelectHelper> weak_ptr_factory_{this};
|
||||
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
#endif // BUILDFLAG(IS_CHROMEOS)
|
||||
diff --git chrome/browser/ui/chrome_select_file_policy.h chrome/browser/ui/chrome_select_file_policy.h
|
||||
index 49272553c7c53..5ba90c9a06ecf 100644
|
||||
--- chrome/browser/ui/chrome_select_file_policy.h
|
||||
|
@@ -12,10 +12,10 @@ index cc58a303a78b6..7755e58c8651c 100644
|
||||
// on the screen, we can't actually attach to it.
|
||||
parent_window = nullptr;
|
||||
diff --git components/constrained_window/constrained_window_views.cc components/constrained_window/constrained_window_views.cc
|
||||
index 0876f22294f71..8331fba0f4ee2 100644
|
||||
index 8251a54246126..ebf7da47ed642 100644
|
||||
--- components/constrained_window/constrained_window_views.cc
|
||||
+++ components/constrained_window/constrained_window_views.cc
|
||||
@@ -102,10 +102,17 @@ class ModalDialogHostObserverViews : public ModalDialogHostObserver {
|
||||
@@ -103,10 +103,17 @@ class ModalDialogHostObserverViews : public ModalDialogHostObserver {
|
||||
gfx::Rect GetModalDialogBounds(views::Widget* widget,
|
||||
web_modal::ModalDialogHost* dialog_host,
|
||||
const gfx::Size& size) {
|
||||
@@ -36,7 +36,7 @@ index 0876f22294f71..8331fba0f4ee2 100644
|
||||
}
|
||||
|
||||
gfx::Point position = dialog_host->GetDialogPosition(size);
|
||||
@@ -114,43 +121,22 @@ gfx::Rect GetModalDialogBounds(views::Widget* widget,
|
||||
@@ -115,43 +122,22 @@ gfx::Rect GetModalDialogBounds(views::Widget* widget,
|
||||
position.set_y(position.y() -
|
||||
widget->non_client_view()->frame_view()->GetInsets().top());
|
||||
|
||||
@@ -94,7 +94,7 @@ index 0876f22294f71..8331fba0f4ee2 100644
|
||||
}
|
||||
|
||||
void UpdateModalDialogPosition(views::Widget* widget,
|
||||
@@ -161,15 +147,24 @@ void UpdateModalDialogPosition(views::Widget* widget,
|
||||
@@ -162,15 +148,24 @@ void UpdateModalDialogPosition(views::Widget* widget,
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -121,22 +121,21 @@ index 0876f22294f71..8331fba0f4ee2 100644
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -302,8 +297,13 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog,
|
||||
|
||||
@@ -304,8 +299,12 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog,
|
||||
gfx::NativeView parent_view =
|
||||
parent ? CurrentBrowserModalClient()->GetDialogHostView(parent) : nullptr;
|
||||
parent ? CurrentBrowserModalClient()->GetDialogHostView(parent)
|
||||
: gfx::NativeView();
|
||||
+ // Use with CEF windowless rendering.
|
||||
+ gfx::AcceleratedWidget parent_widget =
|
||||
+ parent ? CurrentBrowserModalClient()->GetModalDialogHost(parent)->
|
||||
+ GetAcceleratedWidget() : gfx::kNullAcceleratedWidget;
|
||||
views::Widget* widget =
|
||||
- views::DialogDelegate::CreateDialogWidget(dialog, nullptr, parent_view);
|
||||
+ views::DialogDelegate::CreateDialogWidget(dialog, nullptr, parent_view,
|
||||
+ parent_widget);
|
||||
views::Widget* widget = views::DialogDelegate::CreateDialogWidget(
|
||||
- dialog, gfx::NativeWindow(), parent_view);
|
||||
+ dialog, gfx::NativeWindow(), parent_view, parent_widget);
|
||||
widget->SetNativeWindowProperty(
|
||||
views::kWidgetIdentifierKey,
|
||||
const_cast<void*>(kConstrainedWindowWidgetIdentifier));
|
||||
@@ -320,8 +320,7 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog,
|
||||
@@ -322,8 +321,7 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog,
|
||||
return widget;
|
||||
|
||||
ModalDialogHost* host =
|
||||
@@ -146,12 +145,13 @@ index 0876f22294f71..8331fba0f4ee2 100644
|
||||
if (host) {
|
||||
DCHECK_EQ(parent_view, host->GetHostView());
|
||||
std::unique_ptr<ModalDialogHostObserver> observer =
|
||||
@@ -338,11 +337,17 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog,
|
||||
@@ -340,11 +338,18 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog,
|
||||
|
||||
views::Widget* ShowBrowserModal(std::unique_ptr<ui::DialogModel> dialog_model,
|
||||
gfx::NativeWindow parent) {
|
||||
+ gfx::NativeView parent_view =
|
||||
+ parent ? CurrentBrowserModalClient()->GetDialogHostView(parent) : nullptr;
|
||||
+ parent ? CurrentBrowserModalClient()->GetDialogHostView(parent) :
|
||||
+ gfx::NativeView();
|
||||
+ // Use with CEF windowless rendering.
|
||||
+ gfx::AcceleratedWidget parent_widget =
|
||||
+ parent ? CurrentBrowserModalClient()->GetModalDialogHost(parent)->
|
||||
@@ -161,7 +161,7 @@ index 0876f22294f71..8331fba0f4ee2 100644
|
||||
// dialogs support autosize.
|
||||
bool will_use_custom_frame = views::DialogDelegate::CanSupportCustomFrame(
|
||||
- parent ? CurrentBrowserModalClient()->GetDialogHostView(parent)
|
||||
- : nullptr);
|
||||
- : gfx::NativeView());
|
||||
+ parent_view, parent_widget);
|
||||
auto dialog = views::BubbleDialogModelHost::CreateModal(
|
||||
std::move(dialog_model), ui::mojom::ModalType::kWindow,
|
||||
@@ -210,10 +210,10 @@ index 51ed6bcf6b540..c6e1161140655 100644
|
||||
virtual gfx::Point GetDialogPosition(const gfx::Size& size) = 0;
|
||||
// Returns whether a dialog currently about to be shown should be activated.
|
||||
diff --git ui/views/window/dialog_delegate.cc ui/views/window/dialog_delegate.cc
|
||||
index bc2b5ccf9e66f..78b8f5c123d8a 100644
|
||||
index 0fc878fd920e9..a7595a9b4af86 100644
|
||||
--- ui/views/window/dialog_delegate.cc
|
||||
+++ ui/views/window/dialog_delegate.cc
|
||||
@@ -87,10 +87,12 @@ DialogDelegate::DialogDelegate() {
|
||||
@@ -88,10 +88,12 @@ DialogDelegate::DialogDelegate() {
|
||||
// static
|
||||
Widget* DialogDelegate::CreateDialogWidget(WidgetDelegate* delegate,
|
||||
gfx::NativeWindow context,
|
||||
@@ -228,7 +228,7 @@ index bc2b5ccf9e66f..78b8f5c123d8a 100644
|
||||
widget->Init(std::move(params));
|
||||
return widget;
|
||||
}
|
||||
@@ -99,15 +101,17 @@ Widget* DialogDelegate::CreateDialogWidget(WidgetDelegate* delegate,
|
||||
@@ -100,15 +102,17 @@ Widget* DialogDelegate::CreateDialogWidget(WidgetDelegate* delegate,
|
||||
Widget* DialogDelegate::CreateDialogWidget(
|
||||
std::unique_ptr<WidgetDelegate> delegate,
|
||||
gfx::NativeWindow context,
|
||||
@@ -250,7 +250,7 @@ index bc2b5ccf9e66f..78b8f5c123d8a 100644
|
||||
#else
|
||||
return true;
|
||||
#endif
|
||||
@@ -118,7 +122,8 @@ Widget::InitParams DialogDelegate::GetDialogWidgetInitParams(
|
||||
@@ -119,7 +123,8 @@ Widget::InitParams DialogDelegate::GetDialogWidgetInitParams(
|
||||
WidgetDelegate* delegate,
|
||||
gfx::NativeWindow context,
|
||||
gfx::NativeView parent,
|
||||
@@ -260,7 +260,7 @@ index bc2b5ccf9e66f..78b8f5c123d8a 100644
|
||||
DialogDelegate* dialog = delegate->AsDialogDelegate();
|
||||
|
||||
views::Widget::InitParams params(
|
||||
@@ -128,7 +133,7 @@ Widget::InitParams DialogDelegate::GetDialogWidgetInitParams(
|
||||
@@ -129,7 +134,7 @@ Widget::InitParams DialogDelegate::GetDialogWidgetInitParams(
|
||||
params.bounds = bounds;
|
||||
|
||||
if (dialog) {
|
||||
@@ -269,7 +269,7 @@ index bc2b5ccf9e66f..78b8f5c123d8a 100644
|
||||
}
|
||||
|
||||
if (!dialog || dialog->use_custom_frame()) {
|
||||
@@ -142,6 +147,7 @@ Widget::InitParams DialogDelegate::GetDialogWidgetInitParams(
|
||||
@@ -143,6 +148,7 @@ Widget::InitParams DialogDelegate::GetDialogWidgetInitParams(
|
||||
}
|
||||
params.context = context;
|
||||
params.parent = parent;
|
||||
@@ -278,10 +278,10 @@ index bc2b5ccf9e66f..78b8f5c123d8a 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 aed5714f0e767..75ee4f236b084 100644
|
||||
index 304b4c2115b87..844fb19461ac3 100644
|
||||
--- ui/views/window/dialog_delegate.h
|
||||
+++ ui/views/window/dialog_delegate.h
|
||||
@@ -129,13 +129,18 @@ class VIEWS_EXPORT DialogDelegate : public WidgetDelegate {
|
||||
@@ -312,13 +312,18 @@ class VIEWS_EXPORT DialogDelegate : public WidgetDelegate {
|
||||
// your use case.
|
||||
static Widget* CreateDialogWidget(std::unique_ptr<WidgetDelegate> delegate,
|
||||
gfx::NativeWindow context,
|
||||
@@ -303,7 +303,7 @@ index aed5714f0e767..75ee4f236b084 100644
|
||||
|
||||
// Returns the dialog widget InitParams for a given |context| or |parent|.
|
||||
// If |bounds| is not empty, used to initially place the dialog, otherwise
|
||||
@@ -143,7 +148,9 @@ class VIEWS_EXPORT DialogDelegate : public WidgetDelegate {
|
||||
@@ -326,7 +331,9 @@ class VIEWS_EXPORT DialogDelegate : public WidgetDelegate {
|
||||
static Widget::InitParams GetDialogWidgetInitParams(WidgetDelegate* delegate,
|
||||
gfx::NativeWindow context,
|
||||
gfx::NativeView parent,
|
||||
|
@@ -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 f61ec524109fe..92ca490728855 100644
|
||||
index 0ac0d2fae56a9..4c55cfe1a52d7 100644
|
||||
--- chrome/browser/extensions/api/chrome_extensions_api_client.cc
|
||||
+++ chrome/browser/extensions/api/chrome_extensions_api_client.cc
|
||||
@@ -15,6 +15,7 @@
|
||||
@@ -21,7 +21,7 @@ index f61ec524109fe..92ca490728855 100644
|
||||
#if BUILDFLAG(ENABLE_PRINTING)
|
||||
#include "chrome/browser/printing/printing_init.h"
|
||||
#endif
|
||||
@@ -309,7 +314,11 @@ ChromeExtensionsAPIClient::CreateGuestViewManagerDelegate() const {
|
||||
@@ -310,7 +315,11 @@ ChromeExtensionsAPIClient::CreateGuestViewManagerDelegate() const {
|
||||
std::unique_ptr<MimeHandlerViewGuestDelegate>
|
||||
ChromeExtensionsAPIClient::CreateMimeHandlerViewGuestDelegate(
|
||||
MimeHandlerViewGuest* guest) const {
|
||||
@@ -34,10 +34,10 @@ index f61ec524109fe..92ca490728855 100644
|
||||
|
||||
WebViewGuestDelegate* ChromeExtensionsAPIClient::CreateWebViewGuestDelegate(
|
||||
diff --git chrome/browser/extensions/api/tabs/tabs_api.cc chrome/browser/extensions/api/tabs/tabs_api.cc
|
||||
index 344b810811bfb..a6e4a909eed24 100644
|
||||
index dad67c2ce98a8..71b27628f7827 100644
|
||||
--- chrome/browser/extensions/api/tabs/tabs_api.cc
|
||||
+++ chrome/browser/extensions/api/tabs/tabs_api.cc
|
||||
@@ -1686,7 +1686,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
|
||||
@@ -1687,7 +1687,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
|
||||
return RespondNow(Error(ExtensionTabUtil::kTabStripNotEditableError));
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ index 344b810811bfb..a6e4a909eed24 100644
|
||||
tab_strip->ActivateTabAt(tab_index);
|
||||
DCHECK_EQ(contents, tab_strip->GetActiveWebContents());
|
||||
}
|
||||
@@ -1700,7 +1700,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
|
||||
@@ -1701,7 +1701,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
|
||||
}
|
||||
|
||||
bool highlighted = *params->update_properties.highlighted;
|
||||
@@ -55,7 +55,7 @@ index 344b810811bfb..a6e4a909eed24 100644
|
||||
tab_strip->ToggleSelectionAt(tab_index);
|
||||
}
|
||||
}
|
||||
@@ -1712,7 +1712,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
|
||||
@@ -1713,7 +1713,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
|
||||
kCannotUpdateMuteCaptured, base::NumberToString(tab_id))));
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ index 344b810811bfb..a6e4a909eed24 100644
|
||||
int opener_id = *params->update_properties.opener_tab_id;
|
||||
WebContents* opener_contents = nullptr;
|
||||
if (opener_id == tab_id) {
|
||||
@@ -1747,7 +1747,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
|
||||
@@ -1748,7 +1748,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
|
||||
->SetAutoDiscardable(state);
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ index 344b810811bfb..a6e4a909eed24 100644
|
||||
// Bug fix for crbug.com/1197888. Don't let the extension update the tab if
|
||||
// the user is dragging tabs.
|
||||
if (!ExtensionTabUtil::IsTabStripEditable()) {
|
||||
@@ -1768,7 +1768,8 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
|
||||
@@ -1769,7 +1769,8 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
|
||||
// Navigate the tab to a new location if the url is different.
|
||||
if (params->update_properties.url) {
|
||||
std::string updated_url = *params->update_properties.url;
|
||||
@@ -83,7 +83,7 @@ index 344b810811bfb..a6e4a909eed24 100644
|
||||
!IsURLAllowedInIncognito(GURL(updated_url))) {
|
||||
return RespondNow(Error(ErrorUtils::FormatErrorMessage(
|
||||
tabs_constants::kURLsNotAllowedInIncognitoError, updated_url)));
|
||||
@@ -1783,7 +1784,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
|
||||
@@ -1784,7 +1785,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
|
||||
return RespondNow(Error(std::move(error)));
|
||||
}
|
||||
|
||||
@@ -164,18 +164,3 @@ index 63848c93738ce..0358e098c7339 100644
|
||||
// FYI: Do NOT add any more friends here. The functions above are the ONLY
|
||||
// ones that need to call AttachTabHelpers; if you think you do, re-read the
|
||||
// design document linked above, especially the section "Reusing tab helpers".
|
||||
diff --git chrome/browser/ui/views/download/bubble/download_toolbar_button_view.cc chrome/browser/ui/views/download/bubble/download_toolbar_button_view.cc
|
||||
index 767a3b368e93d..d206384a0e20c 100644
|
||||
--- chrome/browser/ui/views/download/bubble/download_toolbar_button_view.cc
|
||||
+++ chrome/browser/ui/views/download/bubble/download_toolbar_button_view.cc
|
||||
@@ -820,6 +820,10 @@ void DownloadToolbarButtonView::ShowPendingDownloadStartedAnimation() {
|
||||
if (!gfx::Animation::ShouldRenderRichAnimation()) {
|
||||
return;
|
||||
}
|
||||
+ if (!IsDrawn()) {
|
||||
+ // Don't animate with a hidden download button.
|
||||
+ return;
|
||||
+ }
|
||||
content::WebContents* const web_contents =
|
||||
browser_->tab_strip_model()->GetActiveWebContents();
|
||||
if (!web_contents ||
|
||||
|
@@ -17,7 +17,7 @@ index fbce13c16ad10..0512b2f09937e 100644
|
||||
std::unique_ptr<permissions::PermissionPrompt> CreatePermissionPrompt(
|
||||
content::WebContents* web_contents,
|
||||
diff --git chrome/browser/ui/views/permissions/permission_prompt_factory.cc chrome/browser/ui/views/permissions/permission_prompt_factory.cc
|
||||
index ab9701eb9ce8c..7c1dbe9adb0e8 100644
|
||||
index f6c0b656e5d67..caac970a78928 100644
|
||||
--- chrome/browser/ui/views/permissions/permission_prompt_factory.cc
|
||||
+++ chrome/browser/ui/views/permissions/permission_prompt_factory.cc
|
||||
@@ -210,11 +210,28 @@ std::unique_ptr<permissions::PermissionPrompt> CreateQuietPrompt(
|
||||
|
@@ -356,10 +356,10 @@ 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 6476c59ba6378..090eeaf9924a6 100644
|
||||
index 05825d36640d0..ab007a1f05fde 100644
|
||||
--- chrome/common/chrome_paths.cc
|
||||
+++ chrome/common/chrome_paths.cc
|
||||
@@ -500,7 +500,8 @@ bool PathProvider(int key, base::FilePath* result) {
|
||||
@@ -504,7 +504,8 @@ bool PathProvider(int key, base::FilePath* result) {
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git chrome/browser/printing/print_backend_service_manager.cc chrome/browser/printing/print_backend_service_manager.cc
|
||||
index 9f3d26990651f..e89f779746ac5 100644
|
||||
index 8e75f8b83bc77..19dec27e26680 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;
|
||||
|
@@ -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 ecf5f7dd2b2b8..23775b4aa4d90 100644
|
||||
index 3357c7926a48f..77c27c7883f27 100644
|
||||
--- chrome/browser/profiles/off_the_record_profile_impl.cc
|
||||
+++ chrome/browser/profiles/off_the_record_profile_impl.cc
|
||||
@@ -653,7 +653,9 @@ std::unique_ptr<Profile> Profile::CreateOffTheRecordProfile(
|
||||
@@ -655,7 +655,9 @@ std::unique_ptr<Profile> Profile::CreateOffTheRecordProfile(
|
||||
#endif
|
||||
if (!profile)
|
||||
profile = std::make_unique<OffTheRecordProfileImpl>(parent, otr_profile_id);
|
||||
@@ -52,10 +52,10 @@ index a490fefce8c79..2a066c47ef96d 100644
|
||||
Profile::OTRProfileID Profile::OTRProfileID::CreateUniqueForDevTools() {
|
||||
return CreateUnique(kDevToolsOTRProfileIDPrefix);
|
||||
diff --git chrome/browser/profiles/profile.h chrome/browser/profiles/profile.h
|
||||
index 2fe342e49d3c1..559b2a676dab5 100644
|
||||
index c8d72ed59252f..d785187710a79 100644
|
||||
--- chrome/browser/profiles/profile.h
|
||||
+++ chrome/browser/profiles/profile.h
|
||||
@@ -94,6 +94,10 @@ class Profile : public content::BrowserContext {
|
||||
@@ -93,6 +93,10 @@ class Profile : public content::BrowserContext {
|
||||
// be applicable to run. Please see crbug.com/1098697#c3 for more details.
|
||||
static OTRProfileID CreateUnique(const std::string& profile_id_prefix);
|
||||
|
||||
@@ -66,7 +66,7 @@ index 2fe342e49d3c1..559b2a676dab5 100644
|
||||
// Creates a unique OTR profile id to be used for DevTools browser contexts.
|
||||
static OTRProfileID CreateUniqueForDevTools();
|
||||
|
||||
@@ -511,6 +515,9 @@ class Profile : public content::BrowserContext {
|
||||
@@ -509,6 +513,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 2fe342e49d3c1..559b2a676dab5 100644
|
||||
protected:
|
||||
// Creates an OffTheRecordProfile which points to this Profile.
|
||||
static std::unique_ptr<Profile> CreateOffTheRecordProfile(
|
||||
@@ -522,7 +529,6 @@ class Profile : public content::BrowserContext {
|
||||
@@ -520,7 +527,6 @@ class Profile : public content::BrowserContext {
|
||||
static PrefStore* CreateExtensionPrefStore(Profile*,
|
||||
bool incognito_pref_store);
|
||||
|
||||
@@ -85,10 +85,10 @@ index 2fe342e49d3c1..559b2a676dab5 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 0fb68a6c01dfd..7a3aabb607b87 100644
|
||||
index a27c5368517b0..54f2f1572b7ad 100644
|
||||
--- chrome/browser/profiles/profile_impl.cc
|
||||
+++ chrome/browser/profiles/profile_impl.cc
|
||||
@@ -1022,7 +1022,9 @@ Profile* ProfileImpl::GetOffTheRecordProfile(const OTRProfileID& otr_profile_id,
|
||||
@@ -1023,7 +1023,9 @@ Profile* ProfileImpl::GetOffTheRecordProfile(const OTRProfileID& otr_profile_id,
|
||||
|
||||
otr_profiles_[otr_profile_id] = std::move(otr_profile);
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git chrome/browser/safe_browsing/BUILD.gn chrome/browser/safe_browsing/BUILD.gn
|
||||
index 9d712eab8c753..33807ed8f35bc 100644
|
||||
index 093e7502bd54d..fe30827b95425 100644
|
||||
--- chrome/browser/safe_browsing/BUILD.gn
|
||||
+++ chrome/browser/safe_browsing/BUILD.gn
|
||||
@@ -38,6 +38,7 @@ static_library("safe_browsing") {
|
||||
@@ -37,6 +37,7 @@ static_library("safe_browsing") {
|
||||
"//components/enterprise/buildflags",
|
||||
"//components/enterprise/common:strings",
|
||||
"//components/enterprise/obfuscation/core:enterprise_obfuscation",
|
||||
|
@@ -42,7 +42,7 @@ index d26f0998c81fc..098282f9ca599 100644
|
||||
StartupProfileMode mode =
|
||||
StartupProfileModeFromReason(profile_path_info.reason);
|
||||
diff --git chrome/browser/ui/startup/startup_browser_creator.h chrome/browser/ui/startup/startup_browser_creator.h
|
||||
index a8c47297e36b7..5f0e5a4a98c81 100644
|
||||
index 7f3adc69c404c..68f5a01e3bab4 100644
|
||||
--- chrome/browser/ui/startup/startup_browser_creator.h
|
||||
+++ chrome/browser/ui/startup/startup_browser_creator.h
|
||||
@@ -9,6 +9,7 @@
|
||||
|
@@ -69,7 +69,7 @@ index 46103729d33a7..fbc400e60239b 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 dd1c0af6d55ca..bf694c686434b 100644
|
||||
index 184e3a58c47ac..7152bd618f351 100644
|
||||
--- chrome/browser/ui/webui/chrome_web_ui_configs.cc
|
||||
+++ chrome/browser/ui/webui/chrome_web_ui_configs.cc
|
||||
@@ -5,6 +5,7 @@
|
||||
@@ -80,7 +80,7 @@ index dd1c0af6d55ca..bf694c686434b 100644
|
||||
#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"
|
||||
@@ -209,6 +210,9 @@ void RegisterChromeWebUIConfigs() {
|
||||
@@ -211,6 +212,9 @@ void RegisterChromeWebUIConfigs() {
|
||||
map.AddWebUIConfig(std::make_unique<BluetoothInternalsUIConfig>());
|
||||
map.AddWebUIConfig(std::make_unique<BrowsingTopicsInternalsUIConfig>());
|
||||
map.AddWebUIConfig(std::make_unique<chromeos::DeviceLogUIConfig>());
|
||||
@@ -105,7 +105,7 @@ index d94ad4f02b11d..c1100feeff7c6 100644
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
kChromeUIManagementHost,
|
||||
diff --git chrome/common/webui_url_constants.h chrome/common/webui_url_constants.h
|
||||
index 8c8870763d73d..cc7ba0131fa0a 100644
|
||||
index aa2c595dabdd1..94938716ccd4a 100644
|
||||
--- chrome/common/webui_url_constants.h
|
||||
+++ chrome/common/webui_url_constants.h
|
||||
@@ -17,6 +17,7 @@
|
||||
|
@@ -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 04741c513f541..90997d537aede 100644
|
||||
index c021991c04f77..aa6ad561dfd80 100644
|
||||
--- chrome/browser/ui/webui/version/version_ui.cc
|
||||
+++ chrome/browser/ui/webui/version/version_ui.cc
|
||||
@@ -16,6 +16,7 @@
|
||||
@@ -135,7 +135,7 @@ index 04741c513f541..90997d537aede 100644
|
||||
#include "chrome/browser/browser_process_impl.h"
|
||||
#include "chrome/browser/profiles/profile.h"
|
||||
#include "chrome/browser/ui/webui/version/version_handler.h"
|
||||
@@ -62,6 +63,10 @@
|
||||
@@ -63,6 +64,10 @@
|
||||
#include "chrome/browser/ui/webui/version/version_util_win.h"
|
||||
#endif
|
||||
|
||||
@@ -146,7 +146,7 @@ index 04741c513f541..90997d537aede 100644
|
||||
using content::WebUIDataSource;
|
||||
|
||||
namespace {
|
||||
@@ -82,6 +87,10 @@ void CreateAndAddVersionUIDataSource(Profile* profile) {
|
||||
@@ -83,6 +88,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},
|
||||
@@ -157,7 +157,7 @@ index 04741c513f541..90997d537aede 100644
|
||||
{version_ui::kVariationsName, IDS_VERSION_UI_VARIATIONS},
|
||||
{version_ui::kVariationsCmdName, IDS_VERSION_UI_VARIATIONS_CMD},
|
||||
{version_ui::kCopyVariationsLabel, IDS_VERSION_UI_COPY_VARIATIONS_LABEL},
|
||||
@@ -113,6 +122,10 @@ void CreateAndAddVersionUIDataSource(Profile* profile) {
|
||||
@@ -114,6 +123,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 04741c513f541..90997d537aede 100644
|
||||
}
|
||||
|
||||
std::string GetProductModifier() {
|
||||
@@ -229,6 +242,10 @@ void VersionUI::AddVersionDetailStrings(content::WebUIDataSource* html_source) {
|
||||
@@ -242,6 +255,10 @@ void VersionUI::AddVersionDetailStrings(content::WebUIDataSource* html_source) {
|
||||
// blank.
|
||||
html_source->AddString(version_ui::kExecutablePath, std::string_view());
|
||||
html_source->AddString(version_ui::kProfilePath, std::string_view());
|
||||
@@ -233,7 +233,7 @@ index bd41fd2492e79..04378e39332e1 100644
|
||||
+ font-size: 0.8em;
|
||||
+}
|
||||
diff --git components/webui/version/resources/about_version.html components/webui/version/resources/about_version.html
|
||||
index 1243b0cb31f59..723f9eedd2885 100644
|
||||
index 40c7cc51fc863..b3ee7e7978e93 100644
|
||||
--- components/webui/version/resources/about_version.html
|
||||
+++ components/webui/version/resources/about_version.html
|
||||
@@ -48,9 +48,21 @@ about:version template page
|
||||
@@ -322,7 +322,7 @@ index ea5f11471acf2..f604065bbe8fe 100644
|
||||
|
||||
// <if expr="is_win">
|
||||
diff --git components/webui/version/version_ui_constants.cc components/webui/version/version_ui_constants.cc
|
||||
index 146817785885f..313ebec9d923f 100644
|
||||
index 7c9bd75c4de1b..4ab5265b5f2c0 100644
|
||||
--- components/webui/version/version_ui_constants.cc
|
||||
+++ components/webui/version/version_ui_constants.cc
|
||||
@@ -5,6 +5,7 @@
|
||||
@@ -333,7 +333,7 @@ index 146817785885f..313ebec9d923f 100644
|
||||
|
||||
namespace version_ui {
|
||||
|
||||
@@ -91,4 +92,15 @@ const char kVersion[] = "version";
|
||||
@@ -92,4 +93,15 @@ const char kVersionSuffix[] = "version_suffix";
|
||||
const char kVersionModifier[] = "version_modifier";
|
||||
const char kVersionProcessorVariation[] = "version_processor_variation";
|
||||
|
||||
@@ -350,7 +350,7 @@ index 146817785885f..313ebec9d923f 100644
|
||||
+
|
||||
} // namespace version_ui
|
||||
diff --git components/webui/version/version_ui_constants.h components/webui/version/version_ui_constants.h
|
||||
index 86d7317ddcee5..45523e445c4b0 100644
|
||||
index a3a92aa75848d..4dedc4390e85c 100644
|
||||
--- components/webui/version/version_ui_constants.h
|
||||
+++ components/webui/version/version_ui_constants.h
|
||||
@@ -6,6 +6,7 @@
|
||||
@@ -361,7 +361,7 @@ index 86d7317ddcee5..45523e445c4b0 100644
|
||||
|
||||
namespace version_ui {
|
||||
|
||||
@@ -93,6 +94,17 @@ extern const char kVersion[];
|
||||
@@ -94,6 +95,17 @@ extern const char kVersionSuffix[];
|
||||
extern const char kVersionModifier[];
|
||||
extern const char kVersionProcessorVariation[];
|
||||
|
||||
|
@@ -1,16 +1,16 @@
|
||||
diff --git chrome/renderer/BUILD.gn chrome/renderer/BUILD.gn
|
||||
index 15957beb86998..fa0a5a1b76b9d 100644
|
||||
index 948d6c41cdede..80039133de468 100644
|
||||
--- chrome/renderer/BUILD.gn
|
||||
+++ chrome/renderer/BUILD.gn
|
||||
@@ -5,6 +5,7 @@
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
import("//build/config/buildflags_paint_preview.gni")
|
||||
import("//build/config/chromeos/ui_mode.gni")
|
||||
import("//build/config/features.gni")
|
||||
+import("//cef/libcef/features/features.gni")
|
||||
import("//chrome/common/features.gni")
|
||||
import("//components/nacl/features.gni")
|
||||
import("//components/offline_pages/buildflags/features.gni")
|
||||
@@ -136,6 +137,7 @@ static_library("renderer") {
|
||||
@@ -133,6 +134,7 @@ static_library("renderer") {
|
||||
":process_state",
|
||||
"//base/allocator:buildflags",
|
||||
"//build:chromeos_buildflags",
|
||||
@@ -18,8 +18,8 @@ index 15957beb86998..fa0a5a1b76b9d 100644
|
||||
"//chrome:resources",
|
||||
"//chrome:strings",
|
||||
"//chrome/common",
|
||||
@@ -249,6 +251,10 @@ static_library("renderer") {
|
||||
]
|
||||
@@ -250,6 +252,10 @@ static_library("renderer") {
|
||||
deps += [ "//chrome/renderer/actor" ]
|
||||
}
|
||||
|
||||
+ if (enable_cef) {
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git chrome/app/chrome_main_delegate.cc chrome/app/chrome_main_delegate.cc
|
||||
index 5974cdb9b3a8b..5ab669f302ce8 100644
|
||||
index 345d2729f1802..10d3294221f3b 100644
|
||||
--- chrome/app/chrome_main_delegate.cc
|
||||
+++ chrome/app/chrome_main_delegate.cc
|
||||
@@ -42,6 +42,7 @@
|
||||
@@ -43,6 +43,7 @@
|
||||
#include "base/timer/timer.h"
|
||||
#include "base/trace_event/trace_event_impl.h"
|
||||
#include "build/build_config.h"
|
||||
@@ -158,10 +158,10 @@ index 5974cdb9b3a8b..5ab669f302ce8 100644
|
||||
+ .Initialize(*memory_system_);
|
||||
}
|
||||
diff --git chrome/app/chrome_main_delegate.h chrome/app/chrome_main_delegate.h
|
||||
index 4c70555277148..63300fe191e5e 100644
|
||||
index 18b33015ee4b6..e17447cb922e9 100644
|
||||
--- chrome/app/chrome_main_delegate.h
|
||||
+++ chrome/app/chrome_main_delegate.h
|
||||
@@ -16,6 +16,7 @@
|
||||
@@ -17,6 +17,7 @@
|
||||
#include "chrome/common/chrome_content_client.h"
|
||||
#include "components/memory_system/memory_system.h"
|
||||
#include "content/public/app/content_main_delegate.h"
|
||||
@@ -169,7 +169,7 @@ index 4c70555277148..63300fe191e5e 100644
|
||||
|
||||
namespace base {
|
||||
class CommandLine;
|
||||
@@ -50,6 +51,8 @@ class ChromeMainDelegate : public content::ContentMainDelegate {
|
||||
@@ -51,6 +52,8 @@ class ChromeMainDelegate : public content::ContentMainDelegate {
|
||||
|
||||
~ChromeMainDelegate() override;
|
||||
|
||||
@@ -178,7 +178,7 @@ index 4c70555277148..63300fe191e5e 100644
|
||||
protected:
|
||||
// content::ContentMainDelegate:
|
||||
std::optional<int> BasicStartupComplete() override;
|
||||
@@ -94,13 +97,17 @@ class ChromeMainDelegate : public content::ContentMainDelegate {
|
||||
@@ -95,13 +98,17 @@ class ChromeMainDelegate : public content::ContentMainDelegate {
|
||||
|
||||
void InitializeMemorySystem();
|
||||
|
||||
@@ -433,10 +433,10 @@ index e26e3625c99c8..c0d4a95607e37 100644
|
||||
+#endif
|
||||
}
|
||||
diff --git chrome/browser/chrome_content_browser_client.cc chrome/browser/chrome_content_browser_client.cc
|
||||
index 2e672ca49c04c..a3acfecc15898 100644
|
||||
index a7d66215ad0b7..3282ea58c5872 100644
|
||||
--- chrome/browser/chrome_content_browser_client.cc
|
||||
+++ chrome/browser/chrome_content_browser_client.cc
|
||||
@@ -47,6 +47,7 @@
|
||||
@@ -48,6 +48,7 @@
|
||||
#include "build/branding_buildflags.h"
|
||||
#include "build/build_config.h"
|
||||
#include "build/config/chromebox_for_meetings/buildflags.h" // PLATFORM_CFM
|
||||
@@ -444,7 +444,7 @@ index 2e672ca49c04c..a3acfecc15898 100644
|
||||
#include "chrome/browser/after_startup_task_utils.h"
|
||||
#include "chrome/browser/ai/ai_manager.h"
|
||||
#include "chrome/browser/app_mode/app_mode_utils.h"
|
||||
@@ -1490,6 +1491,8 @@ ChromeContentBrowserClient::GetPopupNavigationDelegateFactoryForTesting() {
|
||||
@@ -1495,6 +1496,8 @@ ChromeContentBrowserClient::GetPopupNavigationDelegateFactoryForTesting() {
|
||||
}
|
||||
|
||||
ChromeContentBrowserClient::ChromeContentBrowserClient() {
|
||||
@@ -453,7 +453,7 @@ index 2e672ca49c04c..a3acfecc15898 100644
|
||||
#if BUILDFLAG(ENABLE_PLUGINS)
|
||||
extra_parts_.push_back(
|
||||
std::make_unique<ChromeContentBrowserClientPluginsPart>());
|
||||
@@ -1527,6 +1530,11 @@ ChromeContentBrowserClient::~ChromeContentBrowserClient() {
|
||||
@@ -1532,6 +1535,11 @@ ChromeContentBrowserClient::~ChromeContentBrowserClient() {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -465,7 +465,7 @@ index 2e672ca49c04c..a3acfecc15898 100644
|
||||
// static
|
||||
void ChromeContentBrowserClient::RegisterLocalStatePrefs(
|
||||
PrefRegistrySimple* registry) {
|
||||
@@ -4731,9 +4739,11 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated(
|
||||
@@ -4793,9 +4801,11 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated(
|
||||
&search::HandleNewTabURLReverseRewrite);
|
||||
#endif // BUILDFLAG(IS_ANDROID)
|
||||
|
||||
@@ -477,7 +477,7 @@ index 2e672ca49c04c..a3acfecc15898 100644
|
||||
}
|
||||
|
||||
base::FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() {
|
||||
@@ -6809,7 +6819,7 @@ void ChromeContentBrowserClient::OnNetworkServiceCreated(
|
||||
@@ -6877,7 +6887,7 @@ void ChromeContentBrowserClient::OnNetworkServiceCreated(
|
||||
}
|
||||
}
|
||||
|
||||
@@ -486,7 +486,7 @@ index 2e672ca49c04c..a3acfecc15898 100644
|
||||
content::BrowserContext* context,
|
||||
bool in_memory,
|
||||
const base::FilePath& relative_partition_path,
|
||||
@@ -6827,6 +6837,8 @@ void ChromeContentBrowserClient::ConfigureNetworkContextParams(
|
||||
@@ -6895,6 +6905,8 @@ void ChromeContentBrowserClient::ConfigureNetworkContextParams(
|
||||
network_context_params->user_agent = GetUserAgentBasedOnPolicy(context);
|
||||
network_context_params->accept_language = GetApplicationLocale();
|
||||
}
|
||||
@@ -495,7 +495,7 @@ index 2e672ca49c04c..a3acfecc15898 100644
|
||||
}
|
||||
|
||||
std::vector<base::FilePath>
|
||||
@@ -7956,11 +7968,11 @@ void ChromeContentBrowserClient::OnKeepaliveRequestStarted(
|
||||
@@ -8033,11 +8045,11 @@ void ChromeContentBrowserClient::OnKeepaliveRequestStarted(
|
||||
const auto now = base::TimeTicks::Now();
|
||||
const auto timeout = GetKeepaliveTimerTimeout(context);
|
||||
keepalive_deadline_ = std::max(keepalive_deadline_, now + timeout);
|
||||
@@ -509,7 +509,7 @@ index 2e672ca49c04c..a3acfecc15898 100644
|
||||
FROM_HERE, keepalive_deadline_ - now,
|
||||
base::BindOnce(
|
||||
&ChromeContentBrowserClient::OnKeepaliveTimerFired,
|
||||
@@ -7982,7 +7994,8 @@ void ChromeContentBrowserClient::OnKeepaliveRequestFinished() {
|
||||
@@ -8059,7 +8071,8 @@ void ChromeContentBrowserClient::OnKeepaliveRequestFinished() {
|
||||
--num_keepalive_requests_;
|
||||
if (num_keepalive_requests_ == 0) {
|
||||
DVLOG(1) << "Stopping the keepalive timer";
|
||||
@@ -519,7 +519,7 @@ index 2e672ca49c04c..a3acfecc15898 100644
|
||||
// This deletes the keep alive handle attached to the timer function and
|
||||
// unblock the shutdown sequence.
|
||||
}
|
||||
@@ -8160,7 +8173,7 @@ void ChromeContentBrowserClient::OnKeepaliveTimerFired(
|
||||
@@ -8237,7 +8250,7 @@ void ChromeContentBrowserClient::OnKeepaliveTimerFired(
|
||||
const auto now = base::TimeTicks::Now();
|
||||
const auto then = keepalive_deadline_;
|
||||
if (now < then) {
|
||||
@@ -529,7 +529,7 @@ index 2e672ca49c04c..a3acfecc15898 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 6642110b906e1..691ab69fe0757 100644
|
||||
index 0751efb504919..7a45c45e92c44 100644
|
||||
--- chrome/browser/chrome_content_browser_client.h
|
||||
+++ chrome/browser/chrome_content_browser_client.h
|
||||
@@ -159,6 +159,8 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
|
||||
@@ -541,7 +541,7 @@ index 6642110b906e1..691ab69fe0757 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.
|
||||
@@ -727,7 +729,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
|
||||
@@ -730,7 +732,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
|
||||
override;
|
||||
void OnNetworkServiceCreated(
|
||||
network::mojom::NetworkService* network_service) override;
|
||||
@@ -550,7 +550,7 @@ index 6642110b906e1..691ab69fe0757 100644
|
||||
content::BrowserContext* context,
|
||||
bool in_memory,
|
||||
const base::FilePath& relative_partition_path,
|
||||
@@ -1345,7 +1347,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
|
||||
@@ -1366,7 +1368,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
uint64_t num_keepalive_requests_ = 0;
|
||||
@@ -560,7 +560,7 @@ index 6642110b906e1..691ab69fe0757 100644
|
||||
#endif
|
||||
|
||||
diff --git chrome/browser/prefs/browser_prefs.cc chrome/browser/prefs/browser_prefs.cc
|
||||
index c95fca6d405cd..ecec59e7ee2b7 100644
|
||||
index 77be6bf7413f9..95e8b3e788f4a 100644
|
||||
--- chrome/browser/prefs/browser_prefs.cc
|
||||
+++ chrome/browser/prefs/browser_prefs.cc
|
||||
@@ -15,6 +15,7 @@
|
||||
@@ -571,7 +571,7 @@ index c95fca6d405cd..ecec59e7ee2b7 100644
|
||||
#include "chrome/browser/about_flags.h"
|
||||
#include "chrome/browser/accessibility/accessibility_labels_service.h"
|
||||
#include "chrome/browser/accessibility/invert_bubble_prefs.h"
|
||||
@@ -209,6 +210,10 @@
|
||||
@@ -208,6 +209,10 @@
|
||||
#include "extensions/browser/pref_names.h"
|
||||
#endif // BUILDFLAG(ENABLE_EXTENSIONS_CORE)
|
||||
|
||||
@@ -582,7 +582,7 @@ index c95fca6d405cd..ecec59e7ee2b7 100644
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
#include "chrome/browser/accessibility/animation_policy_prefs.h"
|
||||
#include "chrome/browser/apps/platform_apps/shortcut_manager.h"
|
||||
@@ -1842,6 +1847,11 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
|
||||
@@ -1841,6 +1846,11 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
|
||||
|
||||
// This is intentionally last.
|
||||
RegisterLocalStatePrefsForMigration(registry);
|
||||
@@ -594,7 +594,7 @@ index c95fca6d405cd..ecec59e7ee2b7 100644
|
||||
}
|
||||
|
||||
// Register prefs applicable to all profiles.
|
||||
@@ -2281,6 +2291,10 @@ void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
|
||||
@@ -2282,6 +2292,10 @@ void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
|
||||
const std::string& locale) {
|
||||
RegisterProfilePrefs(registry, locale);
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git chrome/browser/ui/browser_command_controller.cc chrome/browser/ui/browser_command_controller.cc
|
||||
index 61bb1335729f4..bd8c6967a682a 100644
|
||||
index 3fcd374a0223f..37a4d0a0b2fe4 100644
|
||||
--- chrome/browser/ui/browser_command_controller.cc
|
||||
+++ chrome/browser/ui/browser_command_controller.cc
|
||||
@@ -427,6 +427,7 @@ bool BrowserCommandController::ExecuteCommandWithDisposition(
|
||||
@@ -441,6 +441,7 @@ bool BrowserCommandController::ExecuteCommandWithDisposition(
|
||||
// choose to not implement CommandUpdaterDelegate inside this class and
|
||||
// therefore command_updater_ doesn't have the delegate set).
|
||||
if (!SupportsCommand(id) || !IsCommandEnabled(id)) {
|
||||
@@ -10,7 +10,7 @@ index 61bb1335729f4..bd8c6967a682a 100644
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -444,6 +445,13 @@ bool BrowserCommandController::ExecuteCommandWithDisposition(
|
||||
@@ -458,6 +459,13 @@ bool BrowserCommandController::ExecuteCommandWithDisposition(
|
||||
DCHECK(command_updater_.IsCommandEnabled(id))
|
||||
<< "Invalid/disabled command " << id;
|
||||
|
||||
@@ -24,7 +24,7 @@ index 61bb1335729f4..bd8c6967a682a 100644
|
||||
// The order of commands in this switch statement must match the function
|
||||
// declaration order in browser.h!
|
||||
switch (id) {
|
||||
@@ -1231,11 +1239,13 @@ void BrowserCommandController::TabRestoreServiceLoaded(
|
||||
@@ -1271,11 +1279,13 @@ void BrowserCommandController::TabRestoreServiceLoaded(
|
||||
// BrowserCommandController, private:
|
||||
|
||||
bool BrowserCommandController::IsShowingMainUI() {
|
||||
@@ -41,10 +41,10 @@ index 61bb1335729f4..bd8c6967a682a 100644
|
||||
|
||||
void BrowserCommandController::InitCommandState() {
|
||||
diff --git chrome/browser/ui/toolbar/app_menu_model.cc chrome/browser/ui/toolbar/app_menu_model.cc
|
||||
index 2eb112147b64b..497e2be438367 100644
|
||||
index 4afe64b8b2f33..d1997e0ff5485 100644
|
||||
--- chrome/browser/ui/toolbar/app_menu_model.cc
|
||||
+++ chrome/browser/ui/toolbar/app_menu_model.cc
|
||||
@@ -730,10 +730,12 @@ FindAndEditSubMenuModel::FindAndEditSubMenuModel(
|
||||
@@ -736,10 +736,12 @@ FindAndEditSubMenuModel::FindAndEditSubMenuModel(
|
||||
ui::SimpleMenuModel::Delegate* delegate)
|
||||
: SimpleMenuModel(delegate) {
|
||||
AddItemWithStringIdAndVectorIcon(this, IDC_FIND, IDS_FIND, kSearchMenuIcon);
|
||||
@@ -57,7 +57,7 @@ index 2eb112147b64b..497e2be438367 100644
|
||||
}
|
||||
|
||||
class SaveAndShareSubMenuModel : public ui::SimpleMenuModel {
|
||||
@@ -798,6 +800,57 @@ SaveAndShareSubMenuModel::SaveAndShareSubMenuModel(
|
||||
@@ -804,6 +806,57 @@ SaveAndShareSubMenuModel::SaveAndShareSubMenuModel(
|
||||
}
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ index 2eb112147b64b..497e2be438367 100644
|
||||
} // namespace
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -1726,7 +1779,7 @@ bool AppMenuModel::IsCommandIdChecked(int command_id) const {
|
||||
@@ -1747,7 +1800,7 @@ bool AppMenuModel::IsCommandIdChecked(int command_id) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ index 2eb112147b64b..497e2be438367 100644
|
||||
GlobalError* error =
|
||||
GlobalErrorServiceFactory::GetForProfile(browser_->profile())
|
||||
->GetGlobalErrorByMenuItemCommandID(command_id);
|
||||
@@ -1742,6 +1795,30 @@ bool AppMenuModel::IsCommandIdEnabled(int command_id) const {
|
||||
@@ -1763,6 +1816,30 @@ bool AppMenuModel::IsCommandIdEnabled(int command_id) const {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -155,7 +155,7 @@ index 2eb112147b64b..497e2be438367 100644
|
||||
bool AppMenuModel::IsCommandIdAlerted(int command_id) const {
|
||||
if (command_id == IDC_VIEW_PASSWORDS ||
|
||||
command_id == IDC_SHOW_PASSWORD_MANAGER) {
|
||||
@@ -1897,8 +1974,10 @@ void AppMenuModel::Build() {
|
||||
@@ -1918,8 +1995,10 @@ void AppMenuModel::Build() {
|
||||
IDS_CLEAR_BROWSING_DATA,
|
||||
kTrashCanRefreshIcon);
|
||||
|
||||
@@ -166,7 +166,7 @@ index 2eb112147b64b..497e2be438367 100644
|
||||
AddSeparator(ui::NORMAL_SEPARATOR);
|
||||
|
||||
AddItemWithStringIdAndVectorIcon(this, IDC_PRINT, IDS_PRINT, kPrintMenuIcon);
|
||||
@@ -1997,6 +2076,11 @@ void AppMenuModel::Build() {
|
||||
@@ -2027,6 +2106,11 @@ void AppMenuModel::Build() {
|
||||
}
|
||||
#endif // !BUILDFLAG(IS_CHROMEOS)
|
||||
|
||||
@@ -179,7 +179,7 @@ index 2eb112147b64b..497e2be438367 100644
|
||||
}
|
||||
|
||||
diff --git chrome/browser/ui/toolbar/app_menu_model.h chrome/browser/ui/toolbar/app_menu_model.h
|
||||
index f5f5d8c1a8918..bebb784115c87 100644
|
||||
index e65c121f225d5..5dddcf5d63555 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,
|
||||
@@ -200,7 +200,7 @@ index f5f5d8c1a8918..bebb784115c87 100644
|
||||
// Adds actionable global error menu items to the menu.
|
||||
// Examples: Extension permissions and sign in errors.
|
||||
diff --git chrome/browser/ui/views/find_bar_host.cc chrome/browser/ui/views/find_bar_host.cc
|
||||
index f348f09b374e3..08c704336746e 100644
|
||||
index 603a95238c562..dd397451bed5a 100644
|
||||
--- chrome/browser/ui/views/find_bar_host.cc
|
||||
+++ chrome/browser/ui/views/find_bar_host.cc
|
||||
@@ -608,6 +608,14 @@ gfx::Rect FindBarHost::GetDialogPosition(gfx::Rect avoid_overlapping_rect) {
|
||||
@@ -219,7 +219,7 @@ index f348f09b374e3..08c704336746e 100644
|
||||
return gfx::Rect();
|
||||
}
|
||||
diff --git chrome/browser/ui/views/frame/browser_frame.cc chrome/browser/ui/views/frame/browser_frame.cc
|
||||
index 2e9c753a7da81..c628e1c945f30 100644
|
||||
index 55788d3552a4a..09e526e8e7cda 100644
|
||||
--- chrome/browser/ui/views/frame/browser_frame.cc
|
||||
+++ chrome/browser/ui/views/frame/browser_frame.cc
|
||||
@@ -112,15 +112,25 @@ ui::ColorProviderKey::SchemeVariant GetSchemeVariant(
|
||||
@@ -250,7 +250,7 @@ index 2e9c753a7da81..c628e1c945f30 100644
|
||||
}
|
||||
|
||||
BrowserFrame::~BrowserFrame() = default;
|
||||
@@ -226,10 +236,20 @@ void BrowserFrame::LayoutWebAppWindowTitle(
|
||||
@@ -228,10 +238,20 @@ void BrowserFrame::LayoutWebAppWindowTitle(
|
||||
}
|
||||
|
||||
int BrowserFrame::GetTopInset() const {
|
||||
@@ -271,7 +271,7 @@ index 2e9c753a7da81..c628e1c945f30 100644
|
||||
browser_frame_view_->UpdateThrobber(running);
|
||||
}
|
||||
|
||||
@@ -238,6 +258,8 @@ BrowserNonClientFrameView* BrowserFrame::GetFrameView() const {
|
||||
@@ -240,6 +260,8 @@ BrowserNonClientFrameView* BrowserFrame::GetFrameView() const {
|
||||
}
|
||||
|
||||
bool BrowserFrame::UseCustomFrame() const {
|
||||
@@ -280,7 +280,7 @@ index 2e9c753a7da81..c628e1c945f30 100644
|
||||
return native_browser_frame_->UseCustomFrame();
|
||||
}
|
||||
|
||||
@@ -252,20 +274,30 @@ bool BrowserFrame::ShouldDrawFrameHeader() const {
|
||||
@@ -254,20 +276,30 @@ bool BrowserFrame::ShouldDrawFrameHeader() const {
|
||||
void BrowserFrame::GetWindowPlacement(
|
||||
gfx::Rect* bounds,
|
||||
ui::mojom::WindowShowState* show_state) const {
|
||||
@@ -311,7 +311,7 @@ index 2e9c753a7da81..c628e1c945f30 100644
|
||||
browser_frame_view_->OnBrowserViewInitViewsComplete();
|
||||
}
|
||||
|
||||
@@ -365,6 +397,8 @@ ui::ColorProviderKey::ThemeInitializerSupplier* BrowserFrame::GetCustomTheme()
|
||||
@@ -367,6 +399,8 @@ ui::ColorProviderKey::ThemeInitializerSupplier* BrowserFrame::GetCustomTheme()
|
||||
}
|
||||
|
||||
void BrowserFrame::OnNativeWidgetWorkspaceChanged() {
|
||||
@@ -320,7 +320,7 @@ index 2e9c753a7da81..c628e1c945f30 100644
|
||||
chrome::SaveWindowWorkspace(browser_view_->browser(), GetWorkspace());
|
||||
chrome::SaveWindowVisibleOnAllWorkspaces(browser_view_->browser(),
|
||||
IsVisibleOnAllWorkspaces());
|
||||
@@ -575,6 +609,13 @@ void BrowserFrame::SelectNativeTheme() {
|
||||
@@ -577,6 +611,13 @@ void BrowserFrame::SelectNativeTheme() {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -334,7 +334,7 @@ index 2e9c753a7da81..c628e1c945f30 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(
|
||||
@@ -642,5 +683,8 @@ bool BrowserFrame::RegenerateFrameOnThemeChange(
|
||||
}
|
||||
|
||||
bool BrowserFrame::IsIncognitoBrowser() const {
|
||||
@@ -397,10 +397,10 @@ index 3d8a15049d4d2..66c4789581fe1 100644
|
||||
// regenerated.
|
||||
bool RegenerateFrameOnThemeChange(BrowserThemeChangeType theme_change_type);
|
||||
diff --git chrome/browser/ui/views/frame/browser_view.cc chrome/browser/ui/views/frame/browser_view.cc
|
||||
index 3ee5546ba8f42..5d4dfff68db3d 100644
|
||||
index ac0264a452780..1cb030a738ca8 100644
|
||||
--- chrome/browser/ui/views/frame/browser_view.cc
|
||||
+++ chrome/browser/ui/views/frame/browser_view.cc
|
||||
@@ -356,10 +356,6 @@ using web_modal::WebContentsModalDialogHost;
|
||||
@@ -363,10 +363,6 @@ using web_modal::WebContentsModalDialogHost;
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -408,10 +408,10 @@ index 3ee5546ba8f42..5d4dfff68db3d 100644
|
||||
-// locate this object using just the handle.
|
||||
-const char* const kBrowserViewKey = "__BROWSER_VIEW__";
|
||||
-
|
||||
#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 {
|
||||
// The visible height of the shadow above the tabs. Clicks in this area are
|
||||
// treated as clicks to the frame, rather than clicks to the tab.
|
||||
const int kTabShadowSize = 2;
|
||||
@@ -792,6 +788,14 @@ class BrowserViewLayoutDelegateImpl : public BrowserViewLayoutDelegate {
|
||||
return browser_view_->frame()->GetTopInset() - browser_view_->y();
|
||||
}
|
||||
|
||||
@@ -426,7 +426,7 @@ index 3ee5546ba8f42..5d4dfff68db3d 100644
|
||||
bool IsToolbarVisible() const override {
|
||||
return browser_view_->IsToolbarVisible();
|
||||
}
|
||||
@@ -920,11 +924,21 @@ class BrowserView::AccessibilityModeObserver : public ui::AXModeObserver {
|
||||
@@ -940,11 +944,21 @@ class BrowserView::AccessibilityModeObserver : public ui::AXModeObserver {
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// BrowserView, public:
|
||||
|
||||
@@ -449,8 +449,8 @@ index 3ee5546ba8f42..5d4dfff68db3d 100644
|
||||
SetShowIcon(::ShouldShowWindowIcon(
|
||||
browser_.get(), AppUsesWindowControlsOverlay(), AppUsesTabbed()));
|
||||
|
||||
@@ -1066,8 +1080,15 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
|
||||
watermark_view_));
|
||||
@@ -1097,8 +1111,15 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
|
||||
contents_scrim_view_, nullptr, watermark_view_));
|
||||
#endif
|
||||
|
||||
- toolbar_ = top_container_->AddChildView(
|
||||
@@ -467,7 +467,7 @@ index 3ee5546ba8f42..5d4dfff68db3d 100644
|
||||
|
||||
contents_separator_ =
|
||||
top_container_->AddChildView(std::make_unique<ContentsSeparator>());
|
||||
@@ -1145,7 +1166,9 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
|
||||
@@ -1164,18 +1185,22 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
|
||||
}
|
||||
|
||||
BrowserView::~BrowserView() {
|
||||
@@ -477,17 +477,32 @@ index 3ee5546ba8f42..5d4dfff68db3d 100644
|
||||
|
||||
// Remove the layout manager to avoid dangling. This needs to be earlier than
|
||||
// other cleanups that destroy views referenced in the layout manager.
|
||||
@@ -1157,7 +1180,9 @@ BrowserView::~BrowserView() {
|
||||
SetLayoutManager(nullptr);
|
||||
|
||||
+ if (browser_) {
|
||||
auto* tab_search_toolbar_button_controller =
|
||||
browser_->GetFeatures().tab_search_toolbar_button_controller();
|
||||
if (tab_search_toolbar_button_controller) {
|
||||
tab_search_bubble_host_->RemoveObserver(
|
||||
tab_search_toolbar_button_controller);
|
||||
}
|
||||
+ }
|
||||
|
||||
tab_search_bubble_host_.reset();
|
||||
|
||||
@@ -1183,9 +1208,11 @@ BrowserView::~BrowserView() {
|
||||
// tabstrip model and the browser frame.
|
||||
top_controls_slide_controller_.reset();
|
||||
|
||||
+ if (browser_) {
|
||||
// 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.
|
||||
+ if (browser_) {
|
||||
DCHECK_EQ(0, browser_->tab_strip_model()->count());
|
||||
+ }
|
||||
|
||||
// Stop the animation timer explicitly here to avoid running it in a nested
|
||||
// message loop, which may run by Browser destructor.
|
||||
@@ -1166,17 +1191,18 @@ BrowserView::~BrowserView() {
|
||||
@@ -1194,17 +1221,18 @@ BrowserView::~BrowserView() {
|
||||
// Immersive mode may need to reparent views before they are removed/deleted.
|
||||
immersive_mode_controller_.reset();
|
||||
|
||||
@@ -510,7 +525,7 @@ index 3ee5546ba8f42..5d4dfff68db3d 100644
|
||||
|
||||
// These are raw pointers to child views, so they need to be set to null
|
||||
// before `RemoveAllChildViews()` is called to avoid dangling.
|
||||
@@ -1815,6 +1841,28 @@ gfx::Point BrowserView::GetThemeOffsetFromBrowserView() const {
|
||||
@@ -1865,6 +1893,28 @@ gfx::Point BrowserView::GetThemeOffsetFromBrowserView() const {
|
||||
ThemeProperties::kFrameHeightAboveTabs - browser_view_origin.y());
|
||||
}
|
||||
|
||||
@@ -539,7 +554,7 @@ index 3ee5546ba8f42..5d4dfff68db3d 100644
|
||||
// static:
|
||||
BrowserView::DevToolsDockedPlacement BrowserView::GetDevToolsDockedPlacement(
|
||||
const gfx::Rect& contents_webview_bounds,
|
||||
@@ -2241,7 +2289,13 @@ void BrowserView::OnExclusiveAccessUserInput() {
|
||||
@@ -2300,7 +2350,13 @@ void BrowserView::OnExclusiveAccessUserInput() {
|
||||
|
||||
bool BrowserView::ShouldHideUIForFullscreen() const {
|
||||
// Immersive mode needs UI for the slide-down top panel.
|
||||
@@ -554,37 +569,27 @@ index 3ee5546ba8f42..5d4dfff68db3d 100644
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -3447,13 +3501,18 @@ views::View* BrowserView::GetTopContainer() {
|
||||
@@ -3527,6 +3583,9 @@ views::View* BrowserView::GetLensOverlayView() {
|
||||
}
|
||||
|
||||
DownloadBubbleUIController* BrowserView::GetDownloadBubbleUIController() {
|
||||
if (base::FeatureList::IsEnabled(features::kPinnableDownloadsButton)) {
|
||||
+ if (!browser_) {
|
||||
+ return nullptr;
|
||||
+ }
|
||||
+ if (!browser_) {
|
||||
+ return nullptr;
|
||||
+ }
|
||||
if (auto* download_controller =
|
||||
browser_->GetFeatures().download_toolbar_ui_controller()) {
|
||||
return download_controller->bubble_controller();
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
- DCHECK(toolbar_button_provider_);
|
||||
+ if (!toolbar_button_provider_) {
|
||||
+ return nullptr;
|
||||
+ }
|
||||
if (auto* download_button = toolbar_button_provider_->GetDownloadButton()) {
|
||||
return static_cast<DownloadToolbarButtonView*>(download_button)
|
||||
->bubble_controller();
|
||||
@@ -4102,7 +4161,8 @@ void BrowserView::ReparentTopContainerForEndOfImmersive() {
|
||||
@@ -4216,7 +4275,9 @@ void BrowserView::ReparentTopContainerForEndOfImmersive() {
|
||||
return;
|
||||
}
|
||||
|
||||
- overlay_view_->SetVisible(false);
|
||||
+ if (overlay_view_)
|
||||
+ overlay_view_->SetVisible(false);
|
||||
+ if (overlay_view_) {
|
||||
overlay_view_->SetVisible(false);
|
||||
+ }
|
||||
top_container()->DestroyLayer();
|
||||
AddChildViewAt(top_container(), 0);
|
||||
EnsureFocusOrder();
|
||||
@@ -4632,11 +4692,38 @@ void BrowserView::GetAccessiblePanes(std::vector<views::View*>* panes) {
|
||||
@@ -4754,11 +4815,38 @@ void BrowserView::GetAccessiblePanes(std::vector<views::View*>* panes) {
|
||||
bool BrowserView::ShouldDescendIntoChildForEventHandling(
|
||||
gfx::NativeView child,
|
||||
const gfx::Point& location) {
|
||||
@@ -625,7 +630,7 @@ index 3ee5546ba8f42..5d4dfff68db3d 100644
|
||||
// Draggable regions are defined relative to the web contents.
|
||||
gfx::Point point_in_contents_web_view_coords(location);
|
||||
views::View::ConvertPointToTarget(GetWidget()->GetRootView(),
|
||||
@@ -4645,7 +4732,7 @@ bool BrowserView::ShouldDescendIntoChildForEventHandling(
|
||||
@@ -4767,7 +4855,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.
|
||||
@@ -634,32 +639,33 @@ index 3ee5546ba8f42..5d4dfff68db3d 100644
|
||||
point_in_contents_web_view_coords.x(),
|
||||
point_in_contents_web_view_coords.y()) ||
|
||||
WidgetOwnedByAnchorContainsPoint(point_in_contents_web_view_coords);
|
||||
@@ -4759,8 +4846,10 @@ void BrowserView::Layout(PassKey) {
|
||||
@@ -4999,8 +5087,11 @@ void BrowserView::Layout(PassKey) {
|
||||
|
||||
// TODO(jamescook): Why was this in the middle of layout code?
|
||||
toolbar_->location_bar()->omnibox_view()->SetFocusBehavior(
|
||||
- IsToolbarVisible() ? FocusBehavior::ALWAYS : FocusBehavior::NEVER);
|
||||
- frame()->GetFrameView()->UpdateMinimumSize();
|
||||
+ (IsToolbarVisible() || browser_->toolbar_overridden()) ?
|
||||
+ FocusBehavior::ALWAYS : FocusBehavior::NEVER);
|
||||
+ if (frame()->GetFrameView())
|
||||
+ frame()->GetFrameView()->UpdateMinimumSize();
|
||||
+ if (frame()->GetFrameView()) {
|
||||
frame()->GetFrameView()->UpdateMinimumSize();
|
||||
+ }
|
||||
|
||||
// Some of the situations when the BrowserView is laid out are:
|
||||
// - Enter/exit immersive fullscreen mode.
|
||||
@@ -4827,6 +4916,11 @@ void BrowserView::AddedToWidget() {
|
||||
@@ -5067,6 +5158,12 @@ void BrowserView::AddedToWidget() {
|
||||
SetThemeProfileForWindow(GetNativeWindow(), browser_->profile());
|
||||
#endif
|
||||
|
||||
+ // This browser view may already have a custom button provider set (e.g the
|
||||
+ // hosted app frame).
|
||||
+ if (!toolbar_button_provider_)
|
||||
+ if (!toolbar_button_provider_) {
|
||||
+ SetToolbarButtonProvider(toolbar_);
|
||||
+ }
|
||||
+
|
||||
toolbar_->Init();
|
||||
|
||||
// TODO(pbos): Investigate whether the side panels should be creatable when
|
||||
@@ -4869,12 +4963,6 @@ void BrowserView::AddedToWidget() {
|
||||
if (GetIsNormalType()) {
|
||||
@@ -5123,12 +5220,6 @@ void BrowserView::AddedToWidget() {
|
||||
|
||||
EnsureFocusOrder();
|
||||
|
||||
@@ -669,53 +675,54 @@ index 3ee5546ba8f42..5d4dfff68db3d 100644
|
||||
- SetToolbarButtonProvider(toolbar_);
|
||||
- }
|
||||
-
|
||||
if (download::IsDownloadBubbleEnabled() &&
|
||||
base::FeatureList::IsEnabled(features::kPinnableDownloadsButton)) {
|
||||
if (download::IsDownloadBubbleEnabled()) {
|
||||
browser_->GetFeatures().download_toolbar_ui_controller()->Init();
|
||||
@@ -4886,7 +4974,9 @@ void BrowserView::AddedToWidget() {
|
||||
}
|
||||
@@ -5139,7 +5230,9 @@ void BrowserView::AddedToWidget() {
|
||||
}
|
||||
|
||||
frame_->OnBrowserViewInitViewsComplete();
|
||||
- frame_->GetFrameView()->UpdateMinimumSize();
|
||||
+ if (frame_->GetFrameView()) {
|
||||
+ frame_->GetFrameView()->UpdateMinimumSize();
|
||||
frame_->GetFrameView()->UpdateMinimumSize();
|
||||
+ }
|
||||
using_native_frame_ = frame_->ShouldUseNativeFrame();
|
||||
|
||||
MaybeInitializeWebUITabStrip();
|
||||
@@ -5290,7 +5380,8 @@ void BrowserView::ProcessFullscreen(bool fullscreen, const int64_t display_id) {
|
||||
@@ -5556,7 +5649,9 @@ 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);
|
||||
- frame_->GetFrameView()->OnFullscreenStateChanged();
|
||||
+ if (frame_->GetFrameView())
|
||||
+ frame_->GetFrameView()->OnFullscreenStateChanged();
|
||||
+ if (frame_->GetFrameView()) {
|
||||
frame_->GetFrameView()->OnFullscreenStateChanged();
|
||||
+ }
|
||||
}
|
||||
|
||||
void BrowserView::RequestFullscreen(bool fullscreen, int64_t display_id) {
|
||||
@@ -5794,6 +5885,8 @@ Profile* BrowserView::GetProfile() {
|
||||
@@ -6060,7 +6155,9 @@ Profile* BrowserView::GetProfile() {
|
||||
}
|
||||
|
||||
void BrowserView::UpdateUIForTabFullscreen() {
|
||||
+ if (!frame_->GetFrameView())
|
||||
+ return;
|
||||
+ if (frame()->GetFrameView()) {
|
||||
frame()->GetFrameView()->UpdateFullscreenTopUI();
|
||||
+ }
|
||||
}
|
||||
|
||||
@@ -5823,6 +5916,8 @@ bool BrowserView::CanUserEnterFullscreen() const {
|
||||
WebContents* BrowserView::GetWebContentsForExclusiveAccess() {
|
||||
@@ -6089,6 +6186,9 @@ bool BrowserView::CanUserEnterFullscreen() const {
|
||||
}
|
||||
|
||||
bool BrowserView::CanUserExitFullscreen() const {
|
||||
+ if (!frame_->GetFrameView())
|
||||
+ if (!frame_->GetFrameView()) {
|
||||
+ return true;
|
||||
+ }
|
||||
return frame_->GetFrameView()->CanUserExitFullscreen();
|
||||
}
|
||||
|
||||
diff --git chrome/browser/ui/views/frame/browser_view.h chrome/browser/ui/views/frame/browser_view.h
|
||||
index 621d3abcfbd83..13bc942b778ce 100644
|
||||
index 7a2f7b5d43762..ef55ed7e6cd43 100644
|
||||
--- chrome/browser/ui/views/frame/browser_view.h
|
||||
+++ chrome/browser/ui/views/frame/browser_view.h
|
||||
@@ -147,11 +147,16 @@ class BrowserView : public BrowserWindow,
|
||||
@@ -144,11 +144,16 @@ class BrowserView : public BrowserWindow,
|
||||
METADATA_HEADER(BrowserView, views::ClientView)
|
||||
|
||||
public:
|
||||
@@ -732,7 +739,7 @@ index 621d3abcfbd83..13bc942b778ce 100644
|
||||
void set_frame(BrowserFrame* frame) {
|
||||
frame_ = frame;
|
||||
paint_as_active_subscription_ =
|
||||
@@ -905,6 +910,10 @@ class BrowserView : public BrowserWindow,
|
||||
@@ -911,6 +916,10 @@ class BrowserView : public BrowserWindow,
|
||||
void Copy();
|
||||
void Paste();
|
||||
|
||||
@@ -743,7 +750,7 @@ index 621d3abcfbd83..13bc942b778ce 100644
|
||||
protected:
|
||||
// Enumerates where the devtools are docked relative to the browser's main
|
||||
// web contents.
|
||||
@@ -928,6 +937,8 @@ class BrowserView : public BrowserWindow,
|
||||
@@ -934,6 +943,8 @@ class BrowserView : public BrowserWindow,
|
||||
const gfx::Rect& contents_webview_bounds,
|
||||
const gfx::Rect& local_webview_container_bounds);
|
||||
|
||||
@@ -753,7 +760,7 @@ index 621d3abcfbd83..13bc942b778ce 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 6ebae3a0e19fe..f9e2913b8b5bf 100644
|
||||
index 88b786fa68fa5..3d1136f57be04 100644
|
||||
--- chrome/browser/ui/views/frame/browser_view_layout.cc
|
||||
+++ chrome/browser/ui/views/frame/browser_view_layout.cc
|
||||
@@ -53,6 +53,10 @@
|
||||
@@ -767,7 +774,7 @@ index 6ebae3a0e19fe..f9e2913b8b5bf 100644
|
||||
using views::View;
|
||||
using web_modal::ModalDialogHostObserver;
|
||||
using web_modal::WebContentsModalDialogHost;
|
||||
@@ -122,6 +126,10 @@ class BrowserViewLayout::WebContentsModalDialogHostViews
|
||||
@@ -108,6 +112,10 @@ class BrowserViewLayout::WebContentsModalDialogHostViews
|
||||
observer_list_.Notify(&ModalDialogHostObserver::OnHostDestroying);
|
||||
}
|
||||
|
||||
@@ -778,7 +785,7 @@ index 6ebae3a0e19fe..f9e2913b8b5bf 100644
|
||||
void NotifyPositionRequiresUpdate() {
|
||||
observer_list_.Notify(&ModalDialogHostObserver::OnPositionRequiresUpdate);
|
||||
}
|
||||
@@ -131,7 +139,7 @@ class BrowserViewLayout::WebContentsModalDialogHostViews
|
||||
@@ -117,7 +125,7 @@ class BrowserViewLayout::WebContentsModalDialogHostViews
|
||||
views::View* view = browser_view_layout_->contents_container_;
|
||||
gfx::Rect rect = view->ConvertRectToWidget(view->GetLocalBounds());
|
||||
const int middle_x = rect.x() + rect.width() / 2;
|
||||
@@ -787,7 +794,7 @@ index 6ebae3a0e19fe..f9e2913b8b5bf 100644
|
||||
return gfx::Point(middle_x - size.width() / 2, top);
|
||||
}
|
||||
|
||||
@@ -154,7 +162,7 @@ class BrowserViewLayout::WebContentsModalDialogHostViews
|
||||
@@ -140,7 +148,7 @@ class BrowserViewLayout::WebContentsModalDialogHostViews
|
||||
// universally.
|
||||
views::View* view = browser_view_layout_->contents_container_;
|
||||
gfx::Rect content_area = view->ConvertRectToWidget(view->GetLocalBounds());
|
||||
@@ -796,8 +803,8 @@ index 6ebae3a0e19fe..f9e2913b8b5bf 100644
|
||||
return gfx::Size(content_area.width(), content_area.bottom() - top);
|
||||
}
|
||||
|
||||
@@ -183,6 +191,13 @@ class BrowserViewLayout::WebContentsModalDialogHostViews
|
||||
return host_widget ? host_widget->GetNativeView() : nullptr;
|
||||
@@ -169,6 +177,13 @@ class BrowserViewLayout::WebContentsModalDialogHostViews
|
||||
return host_widget ? host_widget->GetNativeView() : gfx::NativeView();
|
||||
}
|
||||
|
||||
+ int GetDialogTopY() const {
|
||||
@@ -810,7 +817,7 @@ index 6ebae3a0e19fe..f9e2913b8b5bf 100644
|
||||
// Add/remove observer.
|
||||
void AddObserver(ModalDialogHostObserver* observer) override {
|
||||
observer_list_.AddObserver(observer);
|
||||
@@ -506,6 +521,8 @@ void BrowserViewLayout::Layout(views::View* browser_view) {
|
||||
@@ -362,6 +377,8 @@ void BrowserViewLayout::Layout(views::View* browser_view) {
|
||||
exclusive_access_bubble->RepositionIfVisible();
|
||||
}
|
||||
|
||||
@@ -819,7 +826,7 @@ index 6ebae3a0e19fe..f9e2913b8b5bf 100644
|
||||
// Adjust any hosted dialogs if the browser's dialog hosting bounds changed.
|
||||
const gfx::Rect dialog_bounds(dialog_host_->GetDialogPosition(gfx::Size()),
|
||||
dialog_host_->GetMaximumDialogSize());
|
||||
@@ -519,6 +536,7 @@ void BrowserViewLayout::Layout(views::View* browser_view) {
|
||||
@@ -375,6 +392,7 @@ void BrowserViewLayout::Layout(views::View* browser_view) {
|
||||
latest_dialog_bounds_in_screen_ = dialog_bounds_in_screen;
|
||||
dialog_host_->NotifyPositionRequiresUpdate();
|
||||
}
|
||||
@@ -827,7 +834,7 @@ index 6ebae3a0e19fe..f9e2913b8b5bf 100644
|
||||
}
|
||||
|
||||
gfx::Size BrowserViewLayout::GetPreferredSize(
|
||||
@@ -655,6 +673,13 @@ int BrowserViewLayout::LayoutWebUITabStrip(int top) {
|
||||
@@ -511,6 +529,13 @@ int BrowserViewLayout::LayoutWebUITabStrip(int top) {
|
||||
|
||||
int BrowserViewLayout::LayoutToolbar(int top) {
|
||||
TRACE_EVENT0("ui", "BrowserViewLayout::LayoutToolbar");
|
||||
@@ -842,10 +849,10 @@ index 6ebae3a0e19fe..f9e2913b8b5bf 100644
|
||||
bool toolbar_visible = delegate_->IsToolbarVisible();
|
||||
int height = toolbar_visible ? toolbar_->GetPreferredSize().height() : 0;
|
||||
diff --git chrome/browser/ui/views/frame/browser_view_layout.h chrome/browser/ui/views/frame/browser_view_layout.h
|
||||
index f5203245ab9ec..de060d33fcf16 100644
|
||||
index bab68486e2005..5e988918b9553 100644
|
||||
--- chrome/browser/ui/views/frame/browser_view_layout.h
|
||||
+++ chrome/browser/ui/views/frame/browser_view_layout.h
|
||||
@@ -90,6 +90,8 @@ class BrowserViewLayout : public views::LayoutManager {
|
||||
@@ -86,6 +86,8 @@ class BrowserViewLayout : public views::LayoutManager {
|
||||
contents_border_widget_ = contents_border_widget;
|
||||
}
|
||||
|
||||
@@ -854,7 +861,7 @@ index f5203245ab9ec..de060d33fcf16 100644
|
||||
views::Widget* contents_border_widget() { return contents_border_widget_; }
|
||||
|
||||
// Sets the bounds for the contents border.
|
||||
@@ -186,7 +188,7 @@ class BrowserViewLayout : public views::LayoutManager {
|
||||
@@ -176,7 +178,7 @@ class BrowserViewLayout : public views::LayoutManager {
|
||||
const raw_ptr<WebAppFrameToolbarView> web_app_frame_toolbar_;
|
||||
const raw_ptr<views::Label> web_app_window_title_;
|
||||
const raw_ptr<TabStripRegionView> tab_strip_region_view_;
|
||||
@@ -876,13 +883,13 @@ index 451c5ad63337b..66f946c95b9b4 100644
|
||||
virtual bool IsBookmarkBarVisible() const = 0;
|
||||
virtual bool IsContentsSeparatorEnabled() const = 0;
|
||||
diff --git chrome/browser/ui/views/frame/contents_web_view.cc chrome/browser/ui/views/frame/contents_web_view.cc
|
||||
index 6bdd187588951..8ac385bcd0cb5 100644
|
||||
index 09de746cc67e4..6ddb95a4de303 100644
|
||||
--- chrome/browser/ui/views/frame/contents_web_view.cc
|
||||
+++ chrome/browser/ui/views/frame/contents_web_view.cc
|
||||
@@ -29,6 +29,12 @@ ContentsWebView::ContentsWebView(content::BrowserContext* browser_context)
|
||||
// Draws the ContentsWebView background.
|
||||
SetPaintToLayer(ui::LAYER_SOLID_COLOR);
|
||||
SetProperty(views::kElementIdentifierKey, kContentsWebViewElementId);
|
||||
@@ -33,6 +33,12 @@ ContentsWebView::ContentsWebView(content::BrowserContext* browser_context)
|
||||
status_bubble_ = std::make_unique<StatusBubbleViews>(this);
|
||||
status_bubble_->Reposition();
|
||||
web_contents_close_handler_ = std::make_unique<WebContentsCloseHandler>(this);
|
||||
+
|
||||
+ // Mouse events on draggable regions will not be handled by the WebView.
|
||||
+ // Avoid the resulting DCHECK in NativeViewHost::OnMousePressed by
|
||||
@@ -893,10 +900,10 @@ index 6bdd187588951..8ac385bcd0cb5 100644
|
||||
|
||||
ContentsWebView::~ContentsWebView() = default;
|
||||
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 8b0103c5920ef..adbb8eaa74885 100644
|
||||
index aacb186656d41..6987958bb6674 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
|
||||
@@ -638,6 +638,11 @@ PictureInPictureBrowserFrameView::PictureInPictureBrowserFrameView(
|
||||
@@ -650,6 +650,11 @@ PictureInPictureBrowserFrameView::PictureInPictureBrowserFrameView(
|
||||
frame_background_ = std::make_unique<views::FrameBackground>();
|
||||
}
|
||||
#endif
|
||||
@@ -908,7 +915,7 @@ index 8b0103c5920ef..adbb8eaa74885 100644
|
||||
}
|
||||
|
||||
PictureInPictureBrowserFrameView::~PictureInPictureBrowserFrameView() {
|
||||
@@ -771,18 +776,42 @@ gfx::Rect PictureInPictureBrowserFrameView::GetWindowBoundsForClientBounds(
|
||||
@@ -783,18 +788,42 @@ gfx::Rect PictureInPictureBrowserFrameView::GetWindowBoundsForClientBounds(
|
||||
|
||||
int PictureInPictureBrowserFrameView::NonClientHitTest(
|
||||
const gfx::Point& point) {
|
||||
@@ -959,7 +966,7 @@ index 8b0103c5920ef..adbb8eaa74885 100644
|
||||
|
||||
// Allow dragging and resizing the window.
|
||||
int window_component = GetHTComponentForFrame(
|
||||
@@ -856,7 +885,8 @@ void PictureInPictureBrowserFrameView::Layout(PassKey) {
|
||||
@@ -868,7 +897,8 @@ void PictureInPictureBrowserFrameView::Layout(PassKey) {
|
||||
gfx::Rect content_area = GetLocalBounds();
|
||||
content_area.Inset(FrameBorderInsets());
|
||||
gfx::Rect top_bar = content_area;
|
||||
@@ -969,7 +976,7 @@ index 8b0103c5920ef..adbb8eaa74885 100644
|
||||
top_bar_container_view_->SetBoundsRect(top_bar);
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
if (auto_pip_setting_overlay_) {
|
||||
@@ -1406,7 +1436,8 @@ gfx::Insets PictureInPictureBrowserFrameView::ResizeBorderInsets() const {
|
||||
@@ -1418,7 +1448,8 @@ gfx::Insets PictureInPictureBrowserFrameView::ResizeBorderInsets() const {
|
||||
}
|
||||
|
||||
int PictureInPictureBrowserFrameView::GetTopAreaHeight() const {
|
||||
@@ -994,12 +1001,12 @@ 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 a8c61cefa56be..7f40012829c5e 100644
|
||||
index c0d519f033713..6df5e004f43d2 100644
|
||||
--- chrome/browser/ui/views/page_action/page_action_icon_controller.cc
|
||||
+++ chrome/browser/ui/views/page_action/page_action_icon_controller.cc
|
||||
@@ -120,6 +120,14 @@ void PageActionIconController::Init(const PageActionIconParams& params,
|
||||
continue;
|
||||
}
|
||||
@@ -109,6 +109,14 @@ void PageActionIconController::Init(const PageActionIconParams& params,
|
||||
if (IsPageActionMigrated(type)) {
|
||||
continue;
|
||||
}
|
||||
+
|
||||
+#if BUILDFLAG(ENABLE_CEF)
|
||||
@@ -1013,7 +1020,7 @@ index a8c61cefa56be..7f40012829c5e 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 98d97b84906bd..d63bab08e8098 100644
|
||||
index ff62541aa946d..3c3258e36ad3f 100644
|
||||
--- chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
|
||||
+++ chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
|
||||
@@ -698,29 +698,41 @@ gfx::Range BrowserTabStripController::ListTabsInGroup(
|
||||
@@ -1059,7 +1066,7 @@ index 98d97b84906bd..d63bab08e8098 100644
|
||||
}
|
||||
|
||||
diff --git chrome/browser/ui/views/toolbar/toolbar_view.cc chrome/browser/ui/views/toolbar/toolbar_view.cc
|
||||
index fd5dcdf1f352f..44c30ba50ef38 100644
|
||||
index 62da5fee718a1..8a4a5a62d640f 100644
|
||||
--- chrome/browser/ui/views/toolbar/toolbar_view.cc
|
||||
+++ chrome/browser/ui/views/toolbar/toolbar_view.cc
|
||||
@@ -185,7 +185,7 @@ class TabstripLikeBackground : public views::Background {
|
||||
@@ -1112,7 +1119,7 @@ index fd5dcdf1f352f..44c30ba50ef38 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
|
||||
@@ -281,12 +297,12 @@ void ToolbarView::Init() {
|
||||
@@ -281,7 +297,7 @@ void ToolbarView::Init() {
|
||||
|
||||
auto location_bar = std::make_unique<LocationBarView>(
|
||||
browser_, browser_->profile(), browser_->command_controller(), this,
|
||||
@@ -1121,13 +1128,7 @@ index fd5dcdf1f352f..44c30ba50ef38 100644
|
||||
// Make sure the toolbar shows by default.
|
||||
size_animation_.Reset(1);
|
||||
|
||||
std::unique_ptr<DownloadToolbarButtonView> download_button;
|
||||
- if (download::IsDownloadBubbleEnabled() &&
|
||||
+ if (download::IsDownloadBubbleEnabled() && BUTTON_VISIBLE(kDownload) &&
|
||||
!base::FeatureList::IsEnabled(features::kPinnableDownloadsButton)) {
|
||||
download_button =
|
||||
std::make_unique<DownloadToolbarButtonView>(browser_view_);
|
||||
@@ -373,7 +389,8 @@ void ToolbarView::Init() {
|
||||
@@ -354,7 +370,8 @@ void ToolbarView::Init() {
|
||||
}
|
||||
std::unique_ptr<media_router::CastToolbarButton> cast;
|
||||
if (!base::FeatureList::IsEnabled(features::kPinnedCastButton)) {
|
||||
@@ -1137,17 +1138,7 @@ index fd5dcdf1f352f..44c30ba50ef38 100644
|
||||
cast = media_router::CastToolbarButton::Create(browser_);
|
||||
}
|
||||
}
|
||||
@@ -387,7 +404,8 @@ void ToolbarView::Init() {
|
||||
|
||||
std::unique_ptr<send_tab_to_self::SendTabToSelfToolbarIconView>
|
||||
send_tab_to_self_button;
|
||||
- if (!browser_->profile()->IsOffTheRecord()) {
|
||||
+ if (!browser_->profile()->IsOffTheRecord() &&
|
||||
+ BUTTON_VISIBLE(kSendTabToSelf)) {
|
||||
send_tab_to_self_button =
|
||||
std::make_unique<send_tab_to_self::SendTabToSelfToolbarIconView>(
|
||||
browser_view_);
|
||||
@@ -845,7 +863,8 @@ void ToolbarView::Layout(PassKey) {
|
||||
@@ -818,7 +835,8 @@ void ToolbarView::Layout(PassKey) {
|
||||
|
||||
if (display_mode_ == DisplayMode::NORMAL) {
|
||||
LayoutCommon();
|
||||
@@ -1158,10 +1149,10 @@ index fd5dcdf1f352f..44c30ba50ef38 100644
|
||||
|
||||
if (toolbar_controller_) {
|
||||
diff --git chrome/browser/ui/views/toolbar/toolbar_view.h chrome/browser/ui/views/toolbar/toolbar_view.h
|
||||
index f1a6841c1ef40..fe88512c90c8e 100644
|
||||
index ed47967198d0a..681d20ade8433 100644
|
||||
--- chrome/browser/ui/views/toolbar/toolbar_view.h
|
||||
+++ chrome/browser/ui/views/toolbar/toolbar_view.h
|
||||
@@ -100,7 +100,8 @@ class ToolbarView : public views::AccessiblePaneView,
|
||||
@@ -97,7 +97,8 @@ class ToolbarView : public views::AccessiblePaneView,
|
||||
DECLARE_CLASS_ELEMENT_IDENTIFIER_VALUE(kToolbarElementId);
|
||||
DECLARE_CLASS_ELEMENT_IDENTIFIER_VALUE(kToolbarContainerElementId);
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git chrome/browser/ui/views/sad_tab_view.cc chrome/browser/ui/views/sad_tab_view.cc
|
||||
index 6fdd6606c9eb5..88874797758c4 100644
|
||||
index 845dc1067447c..7927dd29fac6f 100644
|
||||
--- chrome/browser/ui/views/sad_tab_view.cc
|
||||
+++ chrome/browser/ui/views/sad_tab_view.cc
|
||||
@@ -703,6 +703,11 @@ void SadTabView::OnBoundsChanged(const gfx::Rect& previous_bounds) {
|
||||
@@ -707,6 +707,11 @@ void SadTabView::OnBoundsChanged(const gfx::Rect& previous_bounds) {
|
||||
title_->SizeToFit(max_width);
|
||||
}
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git components/prefs/pref_service.h components/prefs/pref_service.h
|
||||
index f1856d6ee4419..413b77e80d84d 100644
|
||||
index 0a360f45e89d9..c88c7ea9177e5 100644
|
||||
--- components/prefs/pref_service.h
|
||||
+++ components/prefs/pref_service.h
|
||||
@@ -52,6 +52,10 @@ namespace base {
|
||||
@@ -13,7 +13,7 @@ index f1856d6ee4419..413b77e80d84d 100644
|
||||
namespace prefs {
|
||||
class ScopedDictionaryPrefUpdate;
|
||||
}
|
||||
@@ -441,6 +445,8 @@ class COMPONENTS_PREFS_EXPORT PrefService {
|
||||
@@ -432,6 +436,8 @@ class COMPONENTS_PREFS_EXPORT PrefService {
|
||||
// declared as a friend, too.
|
||||
friend class PrefChangeRegistrar;
|
||||
friend class subtle::PrefMemberBase;
|
||||
|
@@ -1,21 +1,21 @@
|
||||
diff --git content/browser/devtools/devtools_http_handler.cc content/browser/devtools/devtools_http_handler.cc
|
||||
index e224ec0835bfa..87f18a56705d0 100644
|
||||
index a28237bf93ef4..9a01b185e76f4 100644
|
||||
--- content/browser/devtools/devtools_http_handler.cc
|
||||
+++ content/browser/devtools/devtools_http_handler.cc
|
||||
@@ -593,7 +593,7 @@ void DevToolsHttpHandler::OnJsonRequest(
|
||||
@@ -588,7 +588,7 @@ void DevToolsHttpHandler::OnJsonRequest(
|
||||
base::Value::Dict version;
|
||||
version.Set("Protocol-Version", DevToolsAgentHost::GetProtocolVersion());
|
||||
version.Set("WebKit-Version", GetWebKitVersion());
|
||||
version.Set("WebKit-Version", embedder_support::GetWebKitVersion());
|
||||
- version.Set("Browser", GetContentClient()->browser()->GetProduct());
|
||||
+ version.Set("Browser", GetContentClient()->browser()->GetChromeProduct());
|
||||
version.Set("User-Agent", GetContentClient()->browser()->GetUserAgent());
|
||||
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 8e47cbb36a8cb..5165aea10332e 100644
|
||||
index 085e9a60031ea..15e8ba49573e9 100644
|
||||
--- content/browser/loader/navigation_url_loader_impl.cc
|
||||
+++ content/browser/loader/navigation_url_loader_impl.cc
|
||||
@@ -943,7 +943,7 @@ NavigationURLLoaderImpl::CreateNonNetworkLoaderFactory(
|
||||
@@ -978,7 +978,7 @@ NavigationURLLoaderImpl::CreateNonNetworkLoaderFactory(
|
||||
mojo::PendingRemote<network::mojom::URLLoaderFactory>
|
||||
terminal_external_protocol;
|
||||
bool handled = GetContentClient()->browser()->HandleExternalProtocol(
|
||||
@@ -24,7 +24,7 @@ index 8e47cbb36a8cb..5165aea10332e 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,
|
||||
@@ -955,6 +955,21 @@ NavigationURLLoaderImpl::CreateNonNetworkLoaderFactory(
|
||||
@@ -990,6 +990,21 @@ NavigationURLLoaderImpl::CreateNonNetworkLoaderFactory(
|
||||
*request_info.initiator_document_token)
|
||||
: nullptr,
|
||||
request_info.isolation_info, &terminal_external_protocol);
|
||||
@@ -47,10 +47,10 @@ index 8e47cbb36a8cb..5165aea10332e 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 79490d0d3d622..537ac2d9763e6 100644
|
||||
index e2382e9769cb7..f5738329609c9 100644
|
||||
--- content/public/browser/content_browser_client.cc
|
||||
+++ content/public/browser/content_browser_client.cc
|
||||
@@ -1166,7 +1166,7 @@ ContentBrowserClient::CreateURLLoaderHandlerForServiceWorkerNavigationPreload(
|
||||
@@ -1181,7 +1181,7 @@ ContentBrowserClient::CreateURLLoaderHandlerForServiceWorkerNavigationPreload(
|
||||
void ContentBrowserClient::OnNetworkServiceCreated(
|
||||
network::mojom::NetworkService* network_service) {}
|
||||
|
||||
@@ -59,7 +59,7 @@ index 79490d0d3d622..537ac2d9763e6 100644
|
||||
BrowserContext* context,
|
||||
bool in_memory,
|
||||
const base::FilePath& relative_partition_path,
|
||||
@@ -1175,6 +1175,7 @@ void ContentBrowserClient::ConfigureNetworkContextParams(
|
||||
@@ -1190,6 +1190,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 79490d0d3d622..537ac2d9763e6 100644
|
||||
|
||||
std::vector<base::FilePath>
|
||||
diff --git content/public/browser/content_browser_client.h content/public/browser/content_browser_client.h
|
||||
index f0ac298846f7e..75ee3b0e6df86 100644
|
||||
index 9b75a6c3c222a..30cf0e43f3f09 100644
|
||||
--- content/public/browser/content_browser_client.h
|
||||
+++ content/public/browser/content_browser_client.h
|
||||
@@ -1360,6 +1360,12 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
@@ -1380,6 +1380,12 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
bool opener_suppressed,
|
||||
bool* no_javascript_access);
|
||||
|
||||
@@ -84,7 +84,7 @@ index f0ac298846f7e..75ee3b0e6df86 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*
|
||||
@@ -2211,7 +2217,7 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
@@ -2231,7 +2237,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 f0ac298846f7e..75ee3b0e6df86 100644
|
||||
BrowserContext* context,
|
||||
bool in_memory,
|
||||
const base::FilePath& relative_partition_path,
|
||||
@@ -2437,6 +2443,22 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
@@ -2473,6 +2479,22 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
const net::IsolationInfo& isolation_info,
|
||||
mojo::PendingRemote<network::mojom::URLLoaderFactory>* out_factory);
|
||||
|
||||
@@ -116,7 +116,7 @@ index f0ac298846f7e..75ee3b0e6df86 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.
|
||||
@@ -2502,6 +2524,10 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
@@ -2538,6 +2560,10 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
// Used as part of the user agent string.
|
||||
virtual std::string GetProduct();
|
||||
|
||||
@@ -153,10 +153,10 @@ index 7a2d251ba2d13..68297ee6f118f 100644
|
||||
// started.
|
||||
virtual void SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() {}
|
||||
diff --git content/renderer/render_thread_impl.cc content/renderer/render_thread_impl.cc
|
||||
index eda1a7a3f65b8..90658c671b2da 100644
|
||||
index 0a5556cb6eac8..cecc0ae19bc62 100644
|
||||
--- content/renderer/render_thread_impl.cc
|
||||
+++ content/renderer/render_thread_impl.cc
|
||||
@@ -589,6 +589,8 @@ void RenderThreadImpl::Init() {
|
||||
@@ -593,6 +593,8 @@ void RenderThreadImpl::Init() {
|
||||
GetContentClient()->renderer()->CreateURLLoaderThrottleProvider(
|
||||
blink::URLLoaderThrottleProviderType::kFrame);
|
||||
|
||||
@@ -166,10 +166,10 @@ index eda1a7a3f65b8..90658c671b2da 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 72a30a1711c15..1e9fcacf6c1bb 100644
|
||||
index c1d1c8a094a91..0978d3dba378f 100644
|
||||
--- content/renderer/renderer_blink_platform_impl.cc
|
||||
+++ content/renderer/renderer_blink_platform_impl.cc
|
||||
@@ -1053,6 +1053,15 @@ SkBitmap* RendererBlinkPlatformImpl::GetSadPageBitmap() {
|
||||
@@ -1051,6 +1051,15 @@ SkBitmap* RendererBlinkPlatformImpl::GetSadPageBitmap() {
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@@ -186,10 +186,10 @@ index 72a30a1711c15..1e9fcacf6c1bb 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 f726c03e34578..96bded19157a3 100644
|
||||
index ce5aee7746ba0..082fdfaab60de 100644
|
||||
--- content/renderer/renderer_blink_platform_impl.h
|
||||
+++ content/renderer/renderer_blink_platform_impl.h
|
||||
@@ -249,6 +249,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
|
||||
@@ -251,6 +251,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
|
||||
InertAndMinimumIntervalOfUserLevelMemoryPressureSignal() override;
|
||||
#endif // BUILDFLAG(IS_ANDROID)
|
||||
|
||||
@@ -200,7 +200,7 @@ index f726c03e34578..96bded19157a3 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 0c9cd70bbac8c..53fce2a4df907 100644
|
||||
index 0ac15538441aa..cc0f42fc3ebbd 100644
|
||||
--- content/shell/browser/shell_content_browser_client.cc
|
||||
+++ content/shell/browser/shell_content_browser_client.cc
|
||||
@@ -816,7 +816,7 @@ void ShellContentBrowserClient::OnNetworkServiceCreated(
|
||||
|
@@ -108,18 +108,18 @@ index ffc5c37742800..82e1c22b0f073 100644
|
||||
}
|
||||
|
||||
diff --git content/app/content_main_runner_impl.cc content/app/content_main_runner_impl.cc
|
||||
index 82e5123e35509..437c5d080cf24 100644
|
||||
index e81e89be0e190..a369b2086fa22 100644
|
||||
--- content/app/content_main_runner_impl.cc
|
||||
+++ content/app/content_main_runner_impl.cc
|
||||
@@ -49,6 +49,7 @@
|
||||
@@ -50,6 +50,7 @@
|
||||
#include "base/task/thread_pool/thread_pool_instance.h"
|
||||
#include "base/threading/hang_watcher.h"
|
||||
#include "base/threading/platform_thread.h"
|
||||
+#include "base/threading/thread_restrictions.h"
|
||||
#include "base/time/time.h"
|
||||
#include "base/trace_event/trace_event.h"
|
||||
#include "build/build_config.h"
|
||||
@@ -1336,6 +1337,11 @@ void ContentMainRunnerImpl::Shutdown() {
|
||||
#include "build/branding_buildflags.h"
|
||||
@@ -1338,6 +1339,11 @@ void ContentMainRunnerImpl::Shutdown() {
|
||||
is_shutdown_ = true;
|
||||
}
|
||||
|
||||
|
@@ -210,7 +210,7 @@ index 7c890b331be4a..75d22156605d3 100644
|
||||
|
||||
} // namespace crash_reporter
|
||||
diff --git components/crash/core/app/crashpad.cc components/crash/core/app/crashpad.cc
|
||||
index b63e5c28a63a6..3bf12a61a34d2 100644
|
||||
index 99218d8687f29..26dcd6cae208b 100644
|
||||
--- components/crash/core/app/crashpad.cc
|
||||
+++ components/crash/core/app/crashpad.cc
|
||||
@@ -132,7 +132,8 @@ bool InitializeCrashpadImpl(bool initial_client,
|
||||
|
@@ -146,7 +146,7 @@ index 39b2de869d225..5a4e621c650ee 100644
|
||||
struct Data;
|
||||
|
||||
diff --git third_party/crashpad/crashpad/handler/BUILD.gn third_party/crashpad/crashpad/handler/BUILD.gn
|
||||
index 368fef0540317..d8ec71b69dc77 100644
|
||||
index 99f4701555ae9..446c77758540b 100644
|
||||
--- third_party/crashpad/crashpad/handler/BUILD.gn
|
||||
+++ third_party/crashpad/crashpad/handler/BUILD.gn
|
||||
@@ -12,6 +12,7 @@
|
||||
@@ -157,7 +157,7 @@ index 368fef0540317..d8ec71b69dc77 100644
|
||||
import("../build/crashpad_buildconfig.gni")
|
||||
|
||||
static_library("handler") {
|
||||
@@ -75,11 +76,23 @@ static_library("handler") {
|
||||
@@ -73,11 +74,23 @@ static_library("handler") {
|
||||
"../minidump",
|
||||
"../snapshot",
|
||||
"../tools:tool_support",
|
||||
|
@@ -1,18 +1,18 @@
|
||||
diff --git components/embedder_support/user_agent_utils.cc components/embedder_support/user_agent_utils.cc
|
||||
index 64f9e50f60186..d97a8a461ffcb 100644
|
||||
index 941788ea3ea81..c98e054107123 100644
|
||||
--- components/embedder_support/user_agent_utils.cc
|
||||
+++ components/embedder_support/user_agent_utils.cc
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "base/version.h"
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "build/branding_buildflags.h"
|
||||
#include "build/build_config.h"
|
||||
#include "build/util/chromium_git_revision.h"
|
||||
+#include "cef/libcef/features/features.h"
|
||||
#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 @@
|
||||
#include "base/win/windows_version.h"
|
||||
#endif // BUILDFLAG(IS_WIN)
|
||||
@@ -56,6 +57,10 @@
|
||||
#include <sys/utsname.h>
|
||||
#endif
|
||||
|
||||
+#if BUILDFLAG(ENABLE_CEF)
|
||||
+constexpr char kUserAgentProductAndVersion[] = "user-agent-product";
|
||||
@@ -21,7 +21,7 @@ index 64f9e50f60186..d97a8a461ffcb 100644
|
||||
namespace embedder_support {
|
||||
|
||||
namespace {
|
||||
@@ -299,6 +304,13 @@ blink::UserAgentBrandList ShuffleBrandList(
|
||||
@@ -465,6 +470,13 @@ std::string BuildOSCpuInfo(
|
||||
|
||||
std::string GetProductAndVersion(
|
||||
UserAgentReductionEnterprisePolicyState user_agent_reduction) {
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git .gn .gn
|
||||
index 3f65718281973..66580417cc79e 100644
|
||||
index 54d2631ec2032..b5bc7d4e97a91 100644
|
||||
--- .gn
|
||||
+++ .gn
|
||||
@@ -158,6 +158,8 @@ exec_script_allowlist =
|
||||
@@ -159,6 +159,8 @@ exec_script_allowlist =
|
||||
"//chrome/android/webapk/shell_apk/prepare_upload_dir/BUILD.gn",
|
||||
"//chrome/version.gni",
|
||||
|
||||
@@ -12,12 +12,12 @@ index 3f65718281973..66580417cc79e 100644
|
||||
# https://crbug.com/474506.
|
||||
"//clank/java/BUILD.gn",
|
||||
diff --git BUILD.gn BUILD.gn
|
||||
index cf65a66212b8f..0a614a78f9907 100644
|
||||
index f7307e92c4e94..8d4a80cef7997 100644
|
||||
--- BUILD.gn
|
||||
+++ BUILD.gn
|
||||
@@ -19,6 +19,7 @@ import("//build/config/sanitizers/sanitizers.gni")
|
||||
import("//build/config/ui.gni")
|
||||
@@ -19,6 +19,7 @@ import("//build/config/ui.gni")
|
||||
import("//build/gn_logs.gni")
|
||||
import("//build/toolchain/rbe.gni")
|
||||
import("//build/util/generate_wrapper.gni")
|
||||
+import("//cef/libcef/features/features.gni")
|
||||
import("//chrome/enterprise_companion/buildflags.gni")
|
||||
@@ -78,18 +78,18 @@ index bd41166938952..fba7843d79796 100644
|
||||
|
||||
visual_studio_version_logs = [ "windows_sdk_version=${windows_sdk_version}" ]
|
||||
diff --git chrome/chrome_paks.gni chrome/chrome_paks.gni
|
||||
index 98745f8487d18..826c7e305dfbe 100644
|
||||
index f9741697fdc82..f956cc3421255 100644
|
||||
--- chrome/chrome_paks.gni
|
||||
+++ chrome/chrome_paks.gni
|
||||
@@ -6,6 +6,7 @@ import("//ash/ambient/resources/resources.gni")
|
||||
@@ -5,6 +5,7 @@
|
||||
import("//ash/ambient/resources/resources.gni")
|
||||
import("//build/config/chrome_build.gni")
|
||||
import("//build/config/chromeos/ui_mode.gni")
|
||||
import("//build/config/locales.gni")
|
||||
+import("//cef/libcef/features/features.gni")
|
||||
import("//chrome/browser/buildflags.gni")
|
||||
import("//chrome/common/features.gni")
|
||||
import("//components/compose/features.gni")
|
||||
@@ -480,6 +481,11 @@ template("chrome_extra_paks") {
|
||||
@@ -478,6 +479,11 @@ template("chrome_extra_paks") {
|
||||
deps += [ "//components/headless/command_handler" ]
|
||||
}
|
||||
|
||||
@@ -102,18 +102,18 @@ index 98745f8487d18..826c7e305dfbe 100644
|
||||
sources += [
|
||||
"$root_gen_dir/chrome/extensions_resources.pak",
|
||||
diff --git chrome/chrome_repack_locales.gni chrome/chrome_repack_locales.gni
|
||||
index c3b77e3653933..21f42ddf85a3b 100644
|
||||
index 3588fa340be0c..7fcb9072c2392 100644
|
||||
--- chrome/chrome_repack_locales.gni
|
||||
+++ chrome/chrome_repack_locales.gni
|
||||
@@ -6,6 +6,7 @@ import("//build/config/chrome_build.gni")
|
||||
import("//build/config/chromeos/ui_mode.gni")
|
||||
@@ -5,6 +5,7 @@
|
||||
import("//build/config/chrome_build.gni")
|
||||
import("//build/config/features.gni")
|
||||
import("//build/config/ui.gni")
|
||||
+import("//cef/libcef/features/features.gni")
|
||||
import("//extensions/buildflags/buildflags.gni")
|
||||
import("//tools/grit/repack.gni")
|
||||
|
||||
@@ -106,6 +107,10 @@ template("chrome_repack_locales") {
|
||||
@@ -104,6 +105,10 @@ template("chrome_repack_locales") {
|
||||
source_patterns += [ "${root_gen_dir}/components/strings/search_engine_descriptions_strings_" ]
|
||||
deps += [ "//components/strings:search_engine_descriptions_strings" ]
|
||||
}
|
||||
@@ -125,7 +125,7 @@ index c3b77e3653933..21f42ddf85a3b 100644
|
||||
source_patterns +=
|
||||
[ "${root_gen_dir}/extensions/strings/extensions_strings_" ]
|
||||
diff --git chrome/installer/mini_installer/BUILD.gn chrome/installer/mini_installer/BUILD.gn
|
||||
index be48771397da4..334808a723442 100644
|
||||
index 7e49b4e449981..b01e5db88a51e 100644
|
||||
--- chrome/installer/mini_installer/BUILD.gn
|
||||
+++ chrome/installer/mini_installer/BUILD.gn
|
||||
@@ -7,6 +7,7 @@ import("//build/config/features.gni")
|
||||
@@ -136,9 +136,9 @@ index be48771397da4..334808a723442 100644
|
||||
import("//chrome/process_version_rc_template.gni")
|
||||
import("//third_party/dawn/scripts/dawn_features.gni")
|
||||
import("//third_party/ffmpeg/ffmpeg_options.gni")
|
||||
@@ -145,11 +146,13 @@ action("mini_installer_archive") {
|
||||
inputs = [
|
||||
@@ -146,11 +147,13 @@ action("mini_installer_archive") {
|
||||
"$root_out_dir/chrome.dll",
|
||||
"$root_out_dir/chrome_elf.dll",
|
||||
"$root_out_dir/chrome.exe",
|
||||
- "$root_out_dir/locales/en-US.pak",
|
||||
"$root_out_dir/setup.exe",
|
||||
@@ -152,12 +152,12 @@ index be48771397da4..334808a723442 100644
|
||||
outputs = [
|
||||
"$root_out_dir/chrome.7z",
|
||||
diff --git tools/grit/grit_args.gni tools/grit/grit_args.gni
|
||||
index 904edbc9fbf04..c6e830faa2556 100644
|
||||
index 8df7cb1eb8e8c..6c21b1aaa9286 100644
|
||||
--- tools/grit/grit_args.gni
|
||||
+++ tools/grit/grit_args.gni
|
||||
@@ -5,7 +5,9 @@
|
||||
@@ -4,7 +4,9 @@
|
||||
|
||||
import("//build/config/chrome_build.gni")
|
||||
import("//build/config/chromeos/ui_mode.gni")
|
||||
import("//build/config/devtools.gni")
|
||||
+import("//build/config/locales.gni")
|
||||
import("//build/config/ui.gni")
|
||||
@@ -165,7 +165,7 @@ index 904edbc9fbf04..c6e830faa2556 100644
|
||||
|
||||
shared_intermediate_dir = rebase_path(root_gen_dir, root_build_dir)
|
||||
devtools_grd_path = "$shared_intermediate_dir/$devtools_grd_location"
|
||||
@@ -37,6 +39,9 @@ _grit_defines = [
|
||||
@@ -36,6 +38,9 @@ _grit_defines = [
|
||||
"use_titlecase=${is_mac}",
|
||||
|
||||
"is_desktop_android=${is_desktop_android}",
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git tools/gritsettings/resource_ids.spec tools/gritsettings/resource_ids.spec
|
||||
index 2cd6ca756a745..8db95cf5ad955 100644
|
||||
index 2f5be98233528..283bf667b3fa9 100644
|
||||
--- tools/gritsettings/resource_ids.spec
|
||||
+++ tools/gritsettings/resource_ids.spec
|
||||
@@ -1472,11 +1472,18 @@
|
||||
@@ -1504,11 +1504,18 @@
|
||||
"<(SHARED_INTERMEDIATE_DIR)/third_party/blink/public/strings/permission_element_generated_strings.grd": {
|
||||
"META": {"sizes": {"messages": [2000],}},
|
||||
"messages": [10080],
|
||||
|
@@ -1,13 +0,0 @@
|
||||
diff --git ui/gtk/gtk_compat.cc ui/gtk/gtk_compat.cc
|
||||
index a4f93deaa7c42..de236923186cc 100644
|
||||
--- ui/gtk/gtk_compat.cc
|
||||
+++ ui/gtk/gtk_compat.cc
|
||||
@@ -127,7 +127,7 @@ bool LoadGtkImpl() {
|
||||
}
|
||||
auto env = base::Environment::Create();
|
||||
const auto desktop = base::nix::GetDesktopEnvironment(env.get());
|
||||
- if (desktop == base::nix::DESKTOP_ENVIRONMENT_GNOME) {
|
||||
+ if (!gtk_version && desktop == base::nix::DESKTOP_ENVIRONMENT_GNOME) {
|
||||
// GNOME is currently the only desktop to support GTK4 starting with version
|
||||
// 42+. Try to match the loaded GTK version with the GNOME GTK version.
|
||||
// Checking the GNOME version is not necessary since GTK4 is available iff
|
@@ -67,7 +67,7 @@ index a28c128deecd3..e8c8a9825b0fe 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 95876b4040844..2f4480cacade6 100644
|
||||
index 3f8801c6042ef..c1bcab30a63aa 100644
|
||||
--- ui/native_theme/native_theme.cc
|
||||
+++ ui/native_theme/native_theme.cc
|
||||
@@ -146,6 +146,7 @@ void NativeTheme::NotifyOnNativeThemeUpdated() {
|
||||
@@ -78,7 +78,7 @@ index 95876b4040844..2f4480cacade6 100644
|
||||
|
||||
RecordNumColorProvidersInitializedDuringOnNativeThemeUpdated(
|
||||
color_provider_manager.num_providers_initialized() -
|
||||
@@ -294,6 +295,13 @@ bool NativeTheme::IsForcedDarkMode() {
|
||||
@@ -293,6 +294,13 @@ bool NativeTheme::IsForcedDarkMode() {
|
||||
return kIsForcedDarkMode;
|
||||
}
|
||||
|
||||
@@ -93,10 +93,10 @@ index 95876b4040844..2f4480cacade6 100644
|
||||
static bool kIsForcedHighContrast =
|
||||
base::CommandLine::ForCurrentProcess()->HasSwitch(
|
||||
diff --git ui/native_theme/native_theme.h ui/native_theme/native_theme.h
|
||||
index 4e825d649919c..ff1af10d30758 100644
|
||||
index 97cceb20da0fc..7c2282840ff56 100644
|
||||
--- ui/native_theme/native_theme.h
|
||||
+++ ui/native_theme/native_theme.h
|
||||
@@ -636,6 +636,9 @@ class NATIVE_THEME_EXPORT NativeTheme {
|
||||
@@ -636,6 +636,9 @@ class COMPONENT_EXPORT(NATIVE_THEME) NativeTheme {
|
||||
// Calculates and returns the use overlay scrollbar setting.
|
||||
static bool CalculateUseOverlayScrollbar();
|
||||
|
||||
@@ -107,10 +107,10 @@ index 4e825d649919c..ff1af10d30758 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 36d8e38eb0b07..0b96dd332363a 100644
|
||||
index e41728dd81663..a6396a778cae6 100644
|
||||
--- ui/native_theme/native_theme_mac.mm
|
||||
+++ ui/native_theme/native_theme_mac.mm
|
||||
@@ -631,11 +631,15 @@ void NativeThemeMac::PaintSelectedMenuItem(
|
||||
@@ -632,11 +632,15 @@ void NativeThemeMac::PaintSelectedMenuItem(
|
||||
|
||||
void NativeThemeMac::InitializeDarkModeStateAndObserver() {
|
||||
__block auto theme = this;
|
||||
@@ -129,10 +129,10 @@ index 36d8e38eb0b07..0b96dd332363a 100644
|
||||
theme->NotifyOnNativeThemeUpdated();
|
||||
}];
|
||||
diff --git ui/native_theme/native_theme_win.cc ui/native_theme/native_theme_win.cc
|
||||
index 2b2a12cd9d1ac..00c034b7f81f7 100644
|
||||
index dcf2d14d92f8b..ec99022b1f2ae 100644
|
||||
--- ui/native_theme/native_theme_win.cc
|
||||
+++ ui/native_theme/native_theme_win.cc
|
||||
@@ -685,7 +685,10 @@ bool NativeThemeWin::ShouldUseDarkColors() const {
|
||||
@@ -693,7 +693,10 @@ 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.
|
||||
@@ -144,7 +144,7 @@ index 2b2a12cd9d1ac..00c034b7f81f7 100644
|
||||
return false;
|
||||
}
|
||||
return NativeTheme::ShouldUseDarkColors();
|
||||
@@ -693,7 +696,7 @@ bool NativeThemeWin::ShouldUseDarkColors() const {
|
||||
@@ -701,7 +704,7 @@ bool NativeThemeWin::ShouldUseDarkColors() const {
|
||||
|
||||
NativeTheme::PreferredColorScheme
|
||||
NativeThemeWin::CalculatePreferredColorScheme() const {
|
||||
@@ -153,7 +153,7 @@ index 2b2a12cd9d1ac..00c034b7f81f7 100644
|
||||
return NativeTheme::CalculatePreferredColorScheme();
|
||||
}
|
||||
|
||||
@@ -1679,9 +1682,10 @@ void NativeThemeWin::RegisterColorFilteringRegkeyObserver() {
|
||||
@@ -1687,9 +1690,10 @@ void NativeThemeWin::RegisterColorFilteringRegkeyObserver() {
|
||||
}
|
||||
|
||||
void NativeThemeWin::UpdateDarkModeStatus() {
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git ui/accessibility/platform/BUILD.gn ui/accessibility/platform/BUILD.gn
|
||||
index 2f7f2a8f81ec0..6bea20e981df9 100644
|
||||
index 6207f4941839f..11d359dcab78c 100644
|
||||
--- ui/accessibility/platform/BUILD.gn
|
||||
+++ ui/accessibility/platform/BUILD.gn
|
||||
@@ -342,6 +342,10 @@ component("platform") {
|
||||
@@ -354,6 +354,10 @@ component("platform") {
|
||||
if (use_gio) {
|
||||
configs += [ "//build/linux:gio_config" ]
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git ui/gtk/gtk_ui.cc ui/gtk/gtk_ui.cc
|
||||
index 24a5a2c1228e1..7cd1fb1aab76c 100644
|
||||
index c761f9de266f6..ca4c0b705f2ad 100644
|
||||
--- ui/gtk/gtk_ui.cc
|
||||
+++ ui/gtk/gtk_ui.cc
|
||||
@@ -31,6 +31,7 @@
|
||||
@@ -10,7 +10,7 @@ index 24a5a2c1228e1..7cd1fb1aab76c 100644
|
||||
#include "chrome/browser/themes/theme_properties.h" // nogncheck
|
||||
#include "third_party/skia/include/core/SkBitmap.h"
|
||||
#include "third_party/skia/include/core/SkColor.h"
|
||||
@@ -252,10 +253,15 @@ bool GtkUi::Initialize() {
|
||||
@@ -253,10 +254,15 @@ bool GtkUi::Initialize() {
|
||||
};
|
||||
|
||||
GtkSettings* settings = gtk_settings_get_default();
|
||||
|
@@ -100,7 +100,7 @@ index 3ab395e3b0b45..c012641a5dc7e 100644
|
||||
}
|
||||
|
||||
diff --git ui/linux/linux_ui.h ui/linux/linux_ui.h
|
||||
index 090e770ac2f8e..a57f9695bc377 100644
|
||||
index 15db1bd5271cd..cb2d4090c7655 100644
|
||||
--- ui/linux/linux_ui.h
|
||||
+++ ui/linux/linux_ui.h
|
||||
@@ -20,6 +20,10 @@
|
||||
@@ -114,9 +114,9 @@ index 090e770ac2f8e..a57f9695bc377 100644
|
||||
// The main entrypoint into Linux toolkit specific code. GTK/QT code should only
|
||||
// be executed behind this interface.
|
||||
|
||||
@@ -62,9 +66,27 @@ class TextEditCommandAuraLinux;
|
||||
class WindowButtonOrderObserver;
|
||||
@@ -62,9 +66,27 @@ class WindowButtonOrderObserver;
|
||||
class WindowFrameProvider;
|
||||
enum class TextEditCommand;
|
||||
|
||||
+class COMPONENT_EXPORT(LINUX_UI) PrintingContextLinuxDelegate {
|
||||
+ public:
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git chrome/browser/ui/views/profiles/profile_menu_view_base.cc chrome/browser/ui/views/profiles/profile_menu_view_base.cc
|
||||
index dab4e4299c95b..4a5dbf95d5be1 100644
|
||||
index 541f4be99633e..bbfda1b3d9b59 100644
|
||||
--- chrome/browser/ui/views/profiles/profile_menu_view_base.cc
|
||||
+++ chrome/browser/ui/views/profiles/profile_menu_view_base.cc
|
||||
@@ -1231,8 +1231,8 @@ int ProfileMenuViewBase::GetMaxHeight() const {
|
||||
|
@@ -1,8 +1,8 @@
|
||||
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 d09df298697b9..2b5da8d0283af 100644
|
||||
index b0a49de7b4ed6..0abea22fc9a2c 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,
|
||||
@@ -172,6 +172,13 @@ void ExtractUnderlines(NSAttributedString* string,
|
||||
|
||||
// RenderWidgetHostViewCocoa ---------------------------------------------------
|
||||
|
||||
@@ -16,7 +16,7 @@ index d09df298697b9..2b5da8d0283af 100644
|
||||
// Private methods:
|
||||
@interface RenderWidgetHostViewCocoa ()
|
||||
|
||||
@@ -789,6 +796,15 @@ void ExtractUnderlines(NSAttributedString* string,
|
||||
@@ -783,6 +790,15 @@ void ExtractUnderlines(NSAttributedString* string,
|
||||
}
|
||||
|
||||
- (BOOL)acceptsFirstMouse:(NSEvent*)theEvent {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git base/message_loop/message_pump_win.cc base/message_loop/message_pump_win.cc
|
||||
index 5b9e417927870..f74cf332e6093 100644
|
||||
index 1a263dc22f472..09fa613e35649 100644
|
||||
--- base/message_loop/message_pump_win.cc
|
||||
+++ base/message_loop/message_pump_win.cc
|
||||
@@ -2,6 +2,7 @@
|
||||
@@ -10,7 +10,7 @@ index 5b9e417927870..f74cf332e6093 100644
|
||||
#include "base/message_loop/message_pump_win.h"
|
||||
|
||||
#include <windows.h>
|
||||
@@ -584,7 +585,17 @@ bool MessagePumpForUI::ProcessNextWindowsMessage() {
|
||||
@@ -585,7 +586,17 @@ bool MessagePumpForUI::ProcessNextWindowsMessage() {
|
||||
ctx.event()->set_chrome_message_pump();
|
||||
msg_pump_data->set_sent_messages_in_queue(more_work_is_plausible);
|
||||
});
|
||||
|
@@ -12,7 +12,7 @@ index 37cb1dac49610..6e5989c73bf08 100644
|
||||
virtual ~WebContentsView() = default;
|
||||
|
||||
diff --git extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
|
||||
index 16babdc7affda..1d6dc078bb902 100644
|
||||
index 60de0d74ee40f..ae66707e652be 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
|
||||
@@ -226,6 +226,8 @@ void MimeHandlerViewGuest::CreateInnerPage(
|
||||
|
@@ -184,7 +184,7 @@ index 3de514b2696ba..ac057000ea20b 100644
|
||||
|
||||
MessagePipeHandle handle() const {
|
||||
diff --git mojo/public/cpp/bindings/lib/connector.cc mojo/public/cpp/bindings/lib/connector.cc
|
||||
index ffc753b121e53..f85b7e878588c 100644
|
||||
index 6127288d3fbbc..9713b21569bf3 100644
|
||||
--- mojo/public/cpp/bindings/lib/connector.cc
|
||||
+++ mojo/public/cpp/bindings/lib/connector.cc
|
||||
@@ -438,6 +438,8 @@ void Connector::OnSyncHandleWatcherHandleReady(const char* interface_name,
|
||||
@@ -197,7 +197,7 @@ index ffc753b121e53..f85b7e878588c 100644
|
||||
// No more messages on the pipe and the peer is closed.
|
||||
HandleError(false /* force_pipe_reset */, false /* force_async_handler */);
|
||||
diff --git mojo/public/cpp/bindings/lib/interface_endpoint_client.cc mojo/public/cpp/bindings/lib/interface_endpoint_client.cc
|
||||
index 8001dffa21977..87e318fd1334e 100644
|
||||
index 9615abc747135..face0222f6023 100644
|
||||
--- mojo/public/cpp/bindings/lib/interface_endpoint_client.cc
|
||||
+++ mojo/public/cpp/bindings/lib/interface_endpoint_client.cc
|
||||
@@ -731,7 +731,8 @@ bool InterfaceEndpointClient::HandleIncomingMessage(Message* message) {
|
||||
|
@@ -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 301c46fc7b832..b9272d9985a9f 100644
|
||||
index 271c601381a0d..0e22f8ea606e7 100644
|
||||
--- net/url_request/url_request_http_job.cc
|
||||
+++ net/url_request/url_request_http_job.cc
|
||||
@@ -2085,7 +2085,8 @@ bool URLRequestHttpJob::ShouldAddCookieHeader() const {
|
||||
@@ -2106,7 +2106,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 301c46fc7b832..b9272d9985a9f 100644
|
||||
|
||||
bool URLRequestHttpJob::ShouldRecordPartitionedCookieUsage() const {
|
||||
diff --git services/network/public/cpp/resource_request.cc services/network/public/cpp/resource_request.cc
|
||||
index 3783559dc1ea3..5b5b26cb6fda2 100644
|
||||
index 7d97d0fd5481b..307e5f2beb370 100644
|
||||
--- services/network/public/cpp/resource_request.cc
|
||||
+++ services/network/public/cpp/resource_request.cc
|
||||
@@ -354,7 +354,8 @@ bool ResourceRequest::EqualsForTesting(const ResourceRequest& request) const {
|
||||
@@ -356,7 +356,8 @@ bool ResourceRequest::EqualsForTesting(const ResourceRequest& request) const {
|
||||
}
|
||||
|
||||
bool ResourceRequest::SendsCookies() const {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git net/url_request/url_request_job.cc net/url_request/url_request_job.cc
|
||||
index 746d983c20d36..87f42ccc9fec6 100644
|
||||
index 8bdef06e92c85..4821bbb7f53e2 100644
|
||||
--- net/url_request/url_request_job.cc
|
||||
+++ net/url_request/url_request_job.cc
|
||||
@@ -38,6 +38,7 @@
|
||||
@@ -27,7 +27,7 @@ index 746d983c20d36..87f42ccc9fec6 100644
|
||||
} // namespace
|
||||
|
||||
// Each SourceStreams own the previous SourceStream in the chain, but the
|
||||
@@ -327,8 +338,7 @@ GURL URLRequestJob::ComputeReferrerForPolicy(
|
||||
@@ -335,8 +346,7 @@ GURL URLRequestJob::ComputeReferrerForPolicy(
|
||||
}
|
||||
|
||||
bool secure_referrer_but_insecure_destination =
|
||||
|
@@ -56,10 +56,10 @@ 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 13120da83057f..a7562af5b868d 100644
|
||||
index 573269ba54150..a51715e7dc6cc 100644
|
||||
--- content/browser/renderer_host/render_widget_host_impl.cc
|
||||
+++ content/browser/renderer_host/render_widget_host_impl.cc
|
||||
@@ -3741,6 +3741,11 @@ void RenderWidgetHostImpl::StopFling() {
|
||||
@@ -3718,6 +3718,11 @@ void RenderWidgetHostImpl::StopFling() {
|
||||
GetRenderInputRouter()->StopFling();
|
||||
}
|
||||
|
||||
@@ -72,10 +72,10 @@ index 13120da83057f..a7562af5b868d 100644
|
||||
uint16_t angle,
|
||||
display::mojom::ScreenOrientation type) {
|
||||
diff --git content/browser/renderer_host/render_widget_host_impl.h content/browser/renderer_host/render_widget_host_impl.h
|
||||
index 99fe44aab8599..5af702180004e 100644
|
||||
index 3b3eec99c80a8..b07e1d00d4a1e 100644
|
||||
--- content/browser/renderer_host/render_widget_host_impl.h
|
||||
+++ content/browser/renderer_host/render_widget_host_impl.h
|
||||
@@ -843,6 +843,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl
|
||||
@@ -847,6 +847,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl
|
||||
|
||||
void ProgressFlingIfNeeded(base::TimeTicks current_time);
|
||||
void StopFling();
|
||||
|
@@ -24,10 +24,10 @@ index f51591d21a0ce..6393280a99f38 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 4f216eb88e51c..e216283028864 100644
|
||||
index 7c90eca71d395..9c40397be51f1 100644
|
||||
--- media/video/renderable_gpu_memory_buffer_video_frame_pool.cc
|
||||
+++ media/video/renderable_gpu_memory_buffer_video_frame_pool.cc
|
||||
@@ -194,7 +194,7 @@ gfx::Size GetBufferSizeInPixelsForVideoPixelFormat(
|
||||
@@ -196,7 +196,7 @@ gfx::Size GetBufferSizeInPixelsForVideoPixelFormat(
|
||||
bool FrameResources::Initialize() {
|
||||
auto* context = pool_->GetContext();
|
||||
|
||||
@@ -36,7 +36,7 @@ index 4f216eb88e51c..e216283028864 100644
|
||||
#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS)
|
||||
gfx::BufferUsage::SCANOUT_VEA_CPU_READ
|
||||
#else
|
||||
@@ -208,6 +208,23 @@ bool FrameResources::Initialize() {
|
||||
@@ -210,6 +210,23 @@ bool FrameResources::Initialize() {
|
||||
const gfx::Size buffer_size_in_pixels =
|
||||
GetBufferSizeInPixelsForVideoPixelFormat(format_, coded_size_);
|
||||
|
||||
@@ -60,7 +60,7 @@ index 4f216eb88e51c..e216283028864 100644
|
||||
gpu::SharedImageUsageSet usage =
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
gpu::SHARED_IMAGE_USAGE_MACOS_VIDEO_TOOLBOX |
|
||||
@@ -248,7 +265,7 @@ bool FrameResources::Initialize() {
|
||||
@@ -250,7 +267,7 @@ bool FrameResources::Initialize() {
|
||||
viz::GetSharedImageFormat(buffer_format);
|
||||
|
||||
shared_image_ =
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git chrome/browser/printing/printer_query.cc chrome/browser/printing/printer_query.cc
|
||||
index 402be34ab888c..28769289c6b46 100644
|
||||
index 4f2e70c243550..59257dc71304b 100644
|
||||
--- chrome/browser/printing/printer_query.cc
|
||||
+++ chrome/browser/printing/printer_query.cc
|
||||
@@ -124,6 +124,7 @@ PrinterQuery::PrinterQuery(content::GlobalRenderFrameHostId rfh_id)
|
||||
@@ -125,6 +125,7 @@ PrinterQuery::PrinterQuery(content::GlobalRenderFrameHostId rfh_id)
|
||||
rfh_id_(rfh_id),
|
||||
cookie_(PrintSettings::NewCookie()) {
|
||||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git content/browser/renderer_host/render_view_host_impl.cc content/browser/renderer_host/render_view_host_impl.cc
|
||||
index a387789fe4270..e5d9dc26601e8 100644
|
||||
index 6c1e46e58d975..dbf513a643697 100644
|
||||
--- content/browser/renderer_host/render_view_host_impl.cc
|
||||
+++ content/browser/renderer_host/render_view_host_impl.cc
|
||||
@@ -762,6 +762,8 @@ bool RenderViewHostImpl::IsRenderViewLive() const {
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git ui/base/resource/resource_bundle.cc ui/base/resource/resource_bundle.cc
|
||||
index 9dcd953d2bcfe..35c0218ce4a84 100644
|
||||
index f43a7a7f0bba1..da904e0407475 100644
|
||||
--- ui/base/resource/resource_bundle.cc
|
||||
+++ ui/base/resource/resource_bundle.cc
|
||||
@@ -948,6 +948,12 @@ ResourceBundle::ResourceBundle(Delegate* delegate)
|
||||
@@ -947,6 +947,12 @@ ResourceBundle::ResourceBundle(Delegate* delegate)
|
||||
: delegate_(delegate),
|
||||
locale_resources_data_lock_(new base::Lock),
|
||||
max_scale_factor_(k100Percent) {
|
||||
@@ -15,7 +15,7 @@ index 9dcd953d2bcfe..35c0218ce4a84 100644
|
||||
mangle_localized_strings_ = base::CommandLine::ForCurrentProcess()->HasSwitch(
|
||||
switches::kMangleLocalizedStrings);
|
||||
}
|
||||
@@ -957,6 +963,11 @@ ResourceBundle::~ResourceBundle() {
|
||||
@@ -956,6 +962,11 @@ ResourceBundle::~ResourceBundle() {
|
||||
UnloadLocaleResources();
|
||||
}
|
||||
|
||||
|
@@ -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 a5287d9c28938..e634fb46bb619 100644
|
||||
index 775a132ea523c..6fb096739a3dc 100644
|
||||
--- content/browser/renderer_host/render_frame_host_impl.cc
|
||||
+++ content/browser/renderer_host/render_frame_host_impl.cc
|
||||
@@ -9628,6 +9628,16 @@ void RenderFrameHostImpl::CreateNewWindow(
|
||||
@@ -9662,6 +9662,16 @@ void RenderFrameHostImpl::CreateNewWindow(
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ index a5287d9c28938..e634fb46bb619 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.
|
||||
@@ -12018,6 +12028,7 @@ void RenderFrameHostImpl::CommitNavigation(
|
||||
@@ -12069,6 +12079,7 @@ void RenderFrameHostImpl::CommitNavigation(
|
||||
auto browser_calc_origin_to_commit =
|
||||
navigation_request->GetOriginToCommitWithDebugInfo();
|
||||
if (!process_lock.is_error_page() && !is_mhtml_subframe &&
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git build/toolchain/win/setup_toolchain.py build/toolchain/win/setup_toolchain.py
|
||||
index 927fce24fcdc6..834c84eae805e 100644
|
||||
index d6598893c06a6..0b1adcf999dac 100644
|
||||
--- build/toolchain/win/setup_toolchain.py
|
||||
+++ build/toolchain/win/setup_toolchain.py
|
||||
@@ -166,13 +166,17 @@ def _LoadToolchainEnv(cpu, toolchain_root, sdk_dir, target_store):
|
||||
@@ -26,7 +26,7 @@ index 927fce24fcdc6..834c84eae805e 100644
|
||||
if (cpu != 'x64'):
|
||||
# x64 is default target CPU thus any other CPU requires a target set
|
||||
diff --git build/vs_toolchain.py build/vs_toolchain.py
|
||||
index f0b8bacf57360..585e64876f44e 100755
|
||||
index 61b3229502571..6bb14f7cf7e28 100755
|
||||
--- build/vs_toolchain.py
|
||||
+++ build/vs_toolchain.py
|
||||
@@ -136,9 +136,16 @@ def SetEnvironmentAndGetRuntimeDllDirs():
|
||||
|
@@ -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 1d08f25b91496..ecac98345a92c 100644
|
||||
index 5867fc3e77326..54ac130dea600 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 @@
|
||||
@@ -28,7 +28,7 @@ index 1d08f25b91496..ecac98345a92c 100644
|
||||
SkColor color = *GetBackgroundColor();
|
||||
window_->layer()->SetColor(color);
|
||||
}
|
||||
@@ -2649,6 +2654,16 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) {
|
||||
@@ -2664,6 +2669,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 6fa7119d30df8..224d2113000fb 100644
|
||||
index a3accb800e24a..61d4b48d43707 100644
|
||||
--- ui/display/screen.cc
|
||||
+++ ui/display/screen.cc
|
||||
@@ -108,13 +108,13 @@ base::TimeDelta Screen::CalculateIdleTime() const {
|
||||
@@ -19,10 +19,10 @@ index 6fa7119d30df8..224d2113000fb 100644
|
||||
|
||||
bool Screen::GetDisplayWithDisplayId(int64_t display_id,
|
||||
diff --git ui/display/win/screen_win.cc ui/display/win/screen_win.cc
|
||||
index 0d277625e3b82..4e648418c360e 100644
|
||||
index 3a0dc73315d90..aa645eb1ba974 100644
|
||||
--- ui/display/win/screen_win.cc
|
||||
+++ ui/display/win/screen_win.cc
|
||||
@@ -632,7 +632,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 0d277625e3b82..4e648418c360e 100644
|
||||
}
|
||||
|
||||
// static
|
||||
@@ -647,7 +647,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,8 +1,8 @@
|
||||
diff --git net/cookies/cookie_monster.cc net/cookies/cookie_monster.cc
|
||||
index cd7ce8c483362..4e05ca9aa5896 100644
|
||||
index 274e997b7c3c4..fc2f8b5e17680 100644
|
||||
--- net/cookies/cookie_monster.cc
|
||||
+++ net/cookies/cookie_monster.cc
|
||||
@@ -681,6 +681,25 @@ void CookieMonster::SetCookieableSchemes(
|
||||
@@ -668,6 +668,25 @@ void CookieMonster::SetCookieableSchemes(
|
||||
MaybeRunCookieCallback(std::move(callback), true);
|
||||
}
|
||||
|
||||
@@ -29,10 +29,10 @@ index cd7ce8c483362..4e05ca9aa5896 100644
|
||||
void CookieMonster::SetPersistSessionCookies(bool persist_session_cookies) {
|
||||
DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
|
||||
diff --git net/cookies/cookie_monster.h net/cookies/cookie_monster.h
|
||||
index 18fed025ee0b2..8d7ed64030ad1 100644
|
||||
index 66fc28e1eae7c..243fd76546952 100644
|
||||
--- net/cookies/cookie_monster.h
|
||||
+++ net/cookies/cookie_monster.h
|
||||
@@ -239,6 +239,8 @@ class NET_EXPORT CookieMonster : public CookieStore {
|
||||
@@ -238,6 +238,8 @@ class NET_EXPORT CookieMonster : public CookieStore {
|
||||
CookieChangeDispatcher& GetChangeDispatcher() override;
|
||||
void SetCookieableSchemes(const std::vector<std::string>& schemes,
|
||||
SetCookieableSchemesCallback callback) override;
|
||||
@@ -80,10 +80,10 @@ index 95f73bcb9fb40..e17a93f69c089 100644
|
||||
|
||||
void CookieManager::SetForceKeepSessionState() {
|
||||
diff --git services/network/network_context.cc services/network/network_context.cc
|
||||
index 85e8de6a7ce8e..30da6c19d6ef5 100644
|
||||
index 8014bb16d8108..bc8e80e9eb9c3 100644
|
||||
--- services/network/network_context.cc
|
||||
+++ services/network/network_context.cc
|
||||
@@ -2815,22 +2815,26 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
|
||||
@@ -2821,22 +2821,26 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
|
||||
pref_service.get(), network_service_->network_quality_estimator());
|
||||
}
|
||||
|
||||
@@ -127,10 +127,10 @@ index 85e8de6a7ce8e..30da6c19d6ef5 100644
|
||||
base::FilePath transport_security_persister_file_name;
|
||||
if (GetFullDataFilePath(params_->file_paths,
|
||||
diff --git services/network/public/mojom/network_context.mojom services/network/public/mojom/network_context.mojom
|
||||
index 46204bc820cf8..e96ab8e3674ba 100644
|
||||
index feed273c8c77d..ca999f5ed75d5 100644
|
||||
--- services/network/public/mojom/network_context.mojom
|
||||
+++ services/network/public/mojom/network_context.mojom
|
||||
@@ -360,6 +360,9 @@ struct NetworkContextParams {
|
||||
@@ -361,6 +361,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 91b0547550e85..34972a982e866 100644
|
||||
index 861d6c3b3e71a..7db0effe43f45 100644
|
||||
--- content/browser/storage_partition_impl.cc
|
||||
+++ content/browser/storage_partition_impl.cc
|
||||
@@ -3449,9 +3449,12 @@ void StoragePartitionImpl::InitNetworkContext() {
|
||||
@@ -3504,9 +3504,12 @@ void StoragePartitionImpl::InitNetworkContext() {
|
||||
cert_verifier::mojom::CertVerifierCreationParamsPtr
|
||||
cert_verifier_creation_params =
|
||||
cert_verifier::mojom::CertVerifierCreationParams::New();
|
||||
|
@@ -14,7 +14,7 @@ index 0414d4c020839..62c4367b23d06 100644
|
||||
if (crashed_overlay_view_.view() == crashed_overlay_view) {
|
||||
return;
|
||||
diff --git ui/views/controls/webview/webview.h ui/views/controls/webview/webview.h
|
||||
index de6fe5c099273..c34a2555b023d 100644
|
||||
index e34f94cec2d89..fcecfac138244 100644
|
||||
--- ui/views/controls/webview/webview.h
|
||||
+++ ui/views/controls/webview/webview.h
|
||||
@@ -107,6 +107,10 @@ class WEBVIEW_EXPORT WebView : public View,
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git base/trace_event/builtin_categories.h base/trace_event/builtin_categories.h
|
||||
index c428a5f8d79e8..47b076605604d 100644
|
||||
index 19e3f2fc7b3e0..c9469d3da6409 100644
|
||||
--- base/trace_event/builtin_categories.h
|
||||
+++ base/trace_event/builtin_categories.h
|
||||
@@ -69,6 +69,8 @@ PERFETTO_DEFINE_CATEGORIES_IN_NAMESPACE_WITH_ATTRS(
|
||||
|
@@ -1,16 +1,16 @@
|
||||
diff --git BUILD.gn BUILD.gn
|
||||
index bc75d8130b4..f15faf2d9c5 100644
|
||||
index 9a2b2cdd94f..dd05f318329 100644
|
||||
--- BUILD.gn
|
||||
+++ BUILD.gn
|
||||
@@ -11,6 +11,7 @@ import("//build/config/mips.gni")
|
||||
import("//build/config/riscv.gni")
|
||||
@@ -12,6 +12,7 @@ import("//build/config/riscv.gni")
|
||||
import("//build/config/rust.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")
|
||||
@@ -484,6 +485,9 @@ declare_args() {
|
||||
@@ -496,6 +497,9 @@ declare_args() {
|
||||
# Experimental testing mode where various limits are artificially set lower.
|
||||
v8_lower_limits_mode = false
|
||||
|
||||
@@ -20,7 +20,7 @@ index bc75d8130b4..f15faf2d9c5 100644
|
||||
# Enables the use of partition_alloc as the default allocator for standalone
|
||||
# V8. This should be used for benchmarking and testing purposes to more
|
||||
# closely mimic in-browser behavior.
|
||||
@@ -849,6 +853,10 @@ config("internal_config") {
|
||||
@@ -875,6 +879,10 @@ config("internal_config") {
|
||||
defines += [ "BUILDING_V8_SHARED" ]
|
||||
}
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git chrome/browser/ui/views/toolbar/app_menu.cc chrome/browser/ui/views/toolbar/app_menu.cc
|
||||
index 43e388d5517d1..b16a6961232fd 100644
|
||||
index 15a2e6f3eac5f..d1db608df307f 100644
|
||||
--- chrome/browser/ui/views/toolbar/app_menu.cc
|
||||
+++ chrome/browser/ui/views/toolbar/app_menu.cc
|
||||
@@ -1044,7 +1044,9 @@ void AppMenu::RunMenu(views::MenuButtonController* host) {
|
||||
@@ -1043,7 +1043,9 @@ void AppMenu::RunMenu(views::MenuButtonController* host) {
|
||||
host->button()->GetWidget(), host,
|
||||
host->button()->GetAnchorBoundsInScreen(),
|
||||
views::MenuAnchorPosition::kTopRight, ui::mojom::MenuSourceType::kNone,
|
||||
@@ -120,7 +120,7 @@ index 55d05c746eb00..7883a183f274d 100644
|
||||
|
||||
} // namespace gfx
|
||||
diff --git ui/views/animation/ink_drop_host.h ui/views/animation/ink_drop_host.h
|
||||
index e5135719b8df9..fe88f01136990 100644
|
||||
index 26734958c1faa..10a5d50190834 100644
|
||||
--- ui/views/animation/ink_drop_host.h
|
||||
+++ ui/views/animation/ink_drop_host.h
|
||||
@@ -194,6 +194,8 @@ class VIEWS_EXPORT InkDropHost {
|
||||
@@ -133,10 +133,10 @@ index e5135719b8df9..fe88f01136990 100644
|
||||
friend class test::InkDropHostTestApi;
|
||||
|
||||
diff --git ui/views/controls/button/label_button.cc ui/views/controls/button/label_button.cc
|
||||
index ccbd45bf8bba7..2a2f403e8fe01 100644
|
||||
index 74c21a8d33b5e..4dadf74b6097d 100644
|
||||
--- ui/views/controls/button/label_button.cc
|
||||
+++ ui/views/controls/button/label_button.cc
|
||||
@@ -604,6 +604,12 @@ void LabelButton::OnThemeChanged() {
|
||||
@@ -605,6 +605,12 @@ void LabelButton::OnThemeChanged() {
|
||||
SchedulePaint();
|
||||
}
|
||||
|
||||
@@ -164,7 +164,7 @@ index 8efaccff40e09..e420e2f4e80ec 100644
|
||||
LabelButtonImageContainer* image_container() {
|
||||
return image_container_.get();
|
||||
diff --git ui/views/controls/label.cc ui/views/controls/label.cc
|
||||
index e2bdc42003fa3..fb060e6a6cc5f 100644
|
||||
index 774640f711d13..54325afd0b1a5 100644
|
||||
--- ui/views/controls/label.cc
|
||||
+++ ui/views/controls/label.cc
|
||||
@@ -56,12 +56,29 @@ enum LabelPropertyKey {
|
||||
@@ -254,12 +254,12 @@ index b4cb7c83a3e4c..562e096930147 100644
|
||||
std::unique_ptr<SelectionController> selection_controller_;
|
||||
|
||||
diff --git ui/views/controls/menu/menu_controller.cc ui/views/controls/menu/menu_controller.cc
|
||||
index 6337d0d70f247..8ee49d582cbf8 100644
|
||||
index 74dd82258742f..4fa18ef92247f 100644
|
||||
--- ui/views/controls/menu/menu_controller.cc
|
||||
+++ ui/views/controls/menu/menu_controller.cc
|
||||
@@ -588,7 +588,8 @@ void MenuController::Run(Widget* parent,
|
||||
@@ -599,7 +599,8 @@ void MenuController::Run(Widget* parent,
|
||||
ui::mojom::MenuSourceType source_type,
|
||||
bool context_menu,
|
||||
MenuType menu_type,
|
||||
bool is_nested_drag,
|
||||
- gfx::NativeView native_view_for_gestures) {
|
||||
+ gfx::NativeView native_view_for_gestures,
|
||||
@@ -267,7 +267,7 @@ index 6337d0d70f247..8ee49d582cbf8 100644
|
||||
exit_type_ = ExitType::kNone;
|
||||
possible_drag_ = false;
|
||||
drag_in_progress_ = false;
|
||||
@@ -657,6 +658,7 @@ void MenuController::Run(Widget* parent,
|
||||
@@ -668,6 +669,7 @@ void MenuController::Run(Widget* parent,
|
||||
}
|
||||
|
||||
native_view_for_gestures_ = native_view_for_gestures;
|
||||
@@ -275,7 +275,7 @@ index 6337d0d70f247..8ee49d582cbf8 100644
|
||||
|
||||
// Only create a MenuPreTargetHandler for non-nested menus. Nested menus
|
||||
// will use the existing one.
|
||||
@@ -2380,6 +2382,7 @@ void MenuController::OpenMenuImpl(MenuItemView* item, bool show) {
|
||||
@@ -2396,6 +2398,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 6337d0d70f247..8ee49d582cbf8 100644
|
||||
if (item->GetParentMenuItem()) {
|
||||
params.context = item->GetWidget();
|
||||
// (crbug.com/1414232) The item to be open is a submenu. Make sure
|
||||
@@ -3091,7 +3094,11 @@ MenuItemView* MenuController::FindInitialSelectableMenuItem(
|
||||
@@ -3119,7 +3122,11 @@ MenuItemView* MenuController::FindInitialSelectableMenuItem(
|
||||
|
||||
void MenuController::OpenSubmenuChangeSelectionIfCan() {
|
||||
MenuItemView* item = pending_state_.item;
|
||||
@@ -296,7 +296,7 @@ index 6337d0d70f247..8ee49d582cbf8 100644
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3116,6 +3123,7 @@ void MenuController::CloseSubmenu() {
|
||||
@@ -3144,6 +3151,7 @@ void MenuController::CloseSubmenu() {
|
||||
MenuItemView* item = state_.item;
|
||||
DCHECK(item);
|
||||
if (!item->GetParentMenuItem()) {
|
||||
@@ -305,12 +305,12 @@ index 6337d0d70f247..8ee49d582cbf8 100644
|
||||
}
|
||||
if (item->SubmenuIsShowing()) {
|
||||
diff --git ui/views/controls/menu/menu_controller.h ui/views/controls/menu/menu_controller.h
|
||||
index 737b5dd9a243e..44b088afd01c8 100644
|
||||
index 2a42f071fcfad..3de8c2be46058 100644
|
||||
--- ui/views/controls/menu/menu_controller.h
|
||||
+++ ui/views/controls/menu/menu_controller.h
|
||||
@@ -140,7 +140,8 @@ class VIEWS_EXPORT MenuController final : public gfx::AnimationDelegate,
|
||||
@@ -146,7 +146,8 @@ class VIEWS_EXPORT MenuController final : public gfx::AnimationDelegate,
|
||||
ui::mojom::MenuSourceType source_type = ui::mojom::MenuSourceType::kNone,
|
||||
bool context_menu = false,
|
||||
MenuType menu_type = MenuType::kNormal,
|
||||
bool is_nested_drag = false,
|
||||
- gfx::NativeView native_view_for_gestures = gfx::NativeView());
|
||||
+ gfx::NativeView native_view_for_gestures = gfx::NativeView(),
|
||||
@@ -318,7 +318,7 @@ index 737b5dd9a243e..44b088afd01c8 100644
|
||||
|
||||
bool for_drop() const { return for_drop_; }
|
||||
|
||||
@@ -740,6 +741,8 @@ class VIEWS_EXPORT MenuController final : public gfx::AnimationDelegate,
|
||||
@@ -746,6 +747,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();
|
||||
|
||||
@@ -367,10 +367,10 @@ index ea82da6dc2f45..575bd9484c2bf 100644
|
||||
virtual int GetMaxWidthForMenu(MenuItemView* menu);
|
||||
|
||||
diff --git ui/views/controls/menu/menu_host.cc ui/views/controls/menu/menu_host.cc
|
||||
index a462f65d2eb0e..4ae344a2b355a 100644
|
||||
index 84c5e0c9e5091..4d4cc966670e5 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) {
|
||||
@@ -153,6 +153,8 @@ void MenuHost::InitMenuHost(const InitParams& init_params) {
|
||||
: gfx::NativeWindow();
|
||||
params.bounds = init_params.bounds;
|
||||
|
||||
@@ -379,7 +379,7 @@ index a462f65d2eb0e..4ae344a2b355a 100644
|
||||
#if defined(USE_AURA)
|
||||
params.init_properties_container.SetProperty(aura::client::kOwnedWindowAnchor,
|
||||
init_params.owned_window_anchor);
|
||||
@@ -155,7 +157,8 @@ void MenuHost::InitMenuHost(const InitParams& init_params) {
|
||||
@@ -160,7 +162,8 @@ void MenuHost::InitMenuHost(const InitParams& init_params) {
|
||||
// If MenuHost has no parent widget, it needs to be marked
|
||||
// Activatable, so that calling Show in ShowMenuHost will
|
||||
// get keyboard focus.
|
||||
@@ -403,7 +403,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 03dddd5040a34..442bbfdb3f6f5 100644
|
||||
index 75433da75bee3..351c209cb21c8 100644
|
||||
--- ui/views/controls/menu/menu_item_view.cc
|
||||
+++ ui/views/controls/menu/menu_item_view.cc
|
||||
@@ -1158,6 +1158,15 @@ void MenuItemView::PaintBackground(gfx::Canvas* canvas,
|
||||
@@ -567,10 +567,10 @@ index 87739aa15210f..e785faf160c2e 100644
|
||||
}
|
||||
|
||||
diff --git ui/views/controls/menu/menu_runner.h ui/views/controls/menu/menu_runner.h
|
||||
index c60b13df53aae..2e2b9174938f7 100644
|
||||
index cb9d9d46eea37..a9ffb74761fce 100644
|
||||
--- ui/views/controls/menu/menu_runner.h
|
||||
+++ ui/views/controls/menu/menu_runner.h
|
||||
@@ -160,6 +160,8 @@ class VIEWS_EXPORT MenuRunner {
|
||||
@@ -164,6 +164,8 @@ class VIEWS_EXPORT MenuRunner {
|
||||
MenuAnchorPosition anchor,
|
||||
ui::mojom::MenuSourceType source_type,
|
||||
gfx::NativeView native_view_for_gestures = gfx::NativeView(),
|
||||
@@ -580,7 +580,7 @@ index c60b13df53aae..2e2b9174938f7 100644
|
||||
std::optional<std::string> show_menu_host_duration_histogram =
|
||||
std::nullopt);
|
||||
diff --git ui/views/controls/menu/menu_runner_impl.cc ui/views/controls/menu/menu_runner_impl.cc
|
||||
index bf7f7c6d8d31e..b7054a59a8876 100644
|
||||
index 3793390d203db..d56aa411470ab 100644
|
||||
--- ui/views/controls/menu/menu_runner_impl.cc
|
||||
+++ ui/views/controls/menu/menu_runner_impl.cc
|
||||
@@ -119,6 +119,7 @@ void MenuRunnerImpl::RunMenuAt(
|
||||
@@ -591,9 +591,9 @@ index bf7f7c6d8d31e..b7054a59a8876 100644
|
||||
std::optional<gfx::RoundedCornersF> corners,
|
||||
std::optional<std::string> show_menu_host_duration_histogram) {
|
||||
closing_event_time_ = base::TimeTicks();
|
||||
@@ -193,7 +194,7 @@ void MenuRunnerImpl::RunMenuAt(
|
||||
@@ -199,7 +200,7 @@ void MenuRunnerImpl::RunMenuAt(
|
||||
controller->Run(parent, button_controller, menu_.get(), bounds, anchor,
|
||||
source_type, (run_types & MenuRunner::CONTEXT_MENU) != 0,
|
||||
source_type, menu_type,
|
||||
(run_types & MenuRunner::NESTED_DRAG) != 0,
|
||||
- native_view_for_gestures);
|
||||
+ native_view_for_gestures, parent_widget);
|
||||
@@ -654,7 +654,7 @@ index f5b0936aac647..20f476c9abd93 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 e1e3f0d4c54dd..f8afecca2016b 100644
|
||||
index 05322e627acab..a866a76c50372 100644
|
||||
--- ui/views/controls/menu/menu_runner_impl_cocoa.mm
|
||||
+++ ui/views/controls/menu/menu_runner_impl_cocoa.mm
|
||||
@@ -72,6 +72,7 @@ void MenuRunnerImplCocoa::RunMenuAt(
|
||||
@@ -749,7 +749,7 @@ index da772edd48c00..43c930e932287 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 265c4713b41e0..8204af77e97fb 100644
|
||||
index e997f21d56ce8..ca69158a8dbfa 100644
|
||||
--- ui/views/controls/menu/menu_scroll_view_container.cc
|
||||
+++ ui/views/controls/menu/menu_scroll_view_container.cc
|
||||
@@ -273,6 +273,11 @@ MenuScrollViewContainer::MenuScrollViewContainer(SubmenuView* content_view)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user