mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Compare commits
18 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
7e14fe138e | ||
|
1547f8c8ce | ||
|
aaaa0bf625 | ||
|
2c2bc6e86d | ||
|
d5187afaac | ||
|
24fa18a759 | ||
|
8614a8dc19 | ||
|
9ff4909e86 | ||
|
c91f84b975 | ||
|
9c38803a02 | ||
|
ad4fa9cf24 | ||
|
8b09ea4324 | ||
|
a16513512e | ||
|
7944038baf | ||
|
faa85bf980 | ||
|
f59112d839 | ||
|
d5339f1f2a | ||
|
77f2451a5e |
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,5 +7,5 @@
|
||||
# https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
|
||||
|
||||
{
|
||||
'chromium_checkout': 'refs/tags/136.0.7103.0'
|
||||
'chromium_checkout': 'refs/tags/137.0.7151.69'
|
||||
}
|
||||
|
@@ -53,8 +53,20 @@
|
||||
"linux": "eb353ba7b8b9bcbef890217971cd8ec41efeaa75",
|
||||
"mac": "22c77d1f2305de8a6147f14e52f074b4a4e5222c",
|
||||
"windows": "a8832519b4eb058567d68b65be1e1c9e80aae566"
|
||||
},
|
||||
"13601": {
|
||||
"comment": "Added April 22, 2025.",
|
||||
"linux": "40b224f295a20694241c5db49721bc90a3796f30",
|
||||
"mac": "ff885fe921f9eae1a5ce6a71b30b0c37b306bf56",
|
||||
"windows": "116a4153047ee1ee67f17fc938f084ee72b24e54"
|
||||
},
|
||||
"13700": {
|
||||
"comment": "Added May 07, 2025.",
|
||||
"linux": "e5ac12b1bd88b9ece6ceaa57848aaba61ab85242",
|
||||
"mac": "9e84009c92c25aa80935727b5e4526b23439a575",
|
||||
"windows": "65c7157dd3e8eba9bcc38db2bd7f26508c717f3e"
|
||||
}
|
||||
},
|
||||
"last": "13600",
|
||||
"last": "13700",
|
||||
"min": "13300"
|
||||
}
|
@@ -410,6 +410,8 @@
|
||||
'tests/cefclient/browser/temp_window_mac.mm',
|
||||
'tests/cefclient/browser/text_input_client_osr_mac.h',
|
||||
'tests/cefclient/browser/text_input_client_osr_mac.mm',
|
||||
'tests/cefclient/browser/util_mac.h',
|
||||
'tests/cefclient/browser/util_mac.mm',
|
||||
'tests/cefclient/browser/views_window_mac.mm',
|
||||
'tests/cefclient/browser/window_test_runner_mac.h',
|
||||
'tests/cefclient/browser/window_test_runner_mac.mm',
|
||||
@@ -526,6 +528,7 @@
|
||||
'tests/ceftests/permission_prompt_unittest.cc',
|
||||
'tests/ceftests/preference_unittest.cc',
|
||||
'tests/ceftests/print_unittest.cc',
|
||||
'tests/ceftests/print_to_pdf_unittest.cc',
|
||||
'tests/ceftests/process_message_unittest.cc',
|
||||
'tests/ceftests/request_context_unittest.cc',
|
||||
'tests/ceftests/request_handler_unittest.cc',
|
||||
|
@@ -72,8 +72,8 @@ int CefExecuteProcess(const CefMainArgs& args,
|
||||
/// early exit is desired (for example, due to process singleton relaunch
|
||||
/// behavior). If this function returns false then the application should exit
|
||||
/// immediately without calling any other CEF functions except, optionally,
|
||||
/// CefGetErrorCode. The |windows_sandbox_info| parameter is only used on
|
||||
/// Windows and may be NULL (see cef_sandbox_win.h for details).
|
||||
/// CefGetExitCode. The |windows_sandbox_info| parameter is only used on Windows
|
||||
/// and may be NULL (see cef_sandbox_win.h for details).
|
||||
///
|
||||
/*--cef(api_hash_check,optional_param=application,
|
||||
optional_param=windows_sandbox_info)--*/
|
||||
|
@@ -707,12 +707,24 @@ class CefBrowserHost : public virtual CefBaseRefCounted {
|
||||
virtual void WasHidden(bool hidden) = 0;
|
||||
|
||||
///
|
||||
/// Send a notification to the browser that the screen info has changed. The
|
||||
/// browser will then call CefRenderHandler::GetScreenInfo to update the
|
||||
/// screen information with the new values. This simulates moving the webview
|
||||
/// window from one display to another, or changing the properties of the
|
||||
/// current display. This method is only used when window rendering is
|
||||
/// disabled.
|
||||
/// Notify the browser that screen information has changed. Updated
|
||||
/// information will be sent to the renderer process to configure screen size
|
||||
/// and position values used by CSS and JavaScript (window.deviceScaleFactor,
|
||||
/// window.screenX/Y, window.outerWidth/Height, etc.). For background see
|
||||
/// https://bitbucket.org/chromiumembedded/cef/wiki/GeneralUsage.md#markdown-header-coordinate-systems
|
||||
///
|
||||
/// This method is used with (a) windowless rendering and (b) windowed
|
||||
/// rendering with external (client-provided) root window.
|
||||
///
|
||||
/// With windowless rendering the browser will call
|
||||
/// CefRenderHandler::GetScreenInfo, CefRenderHandler::GetRootScreenRect and
|
||||
/// CefRenderHandler::GetViewRect. This simulates moving or resizing the root
|
||||
/// window in the current display, moving the root window from one display to
|
||||
/// another, or changing the properties of the current display.
|
||||
///
|
||||
/// With windowed rendering the browser will call
|
||||
/// CefDisplayHandler::GetRootWindowScreenRect and use the associated
|
||||
/// display properties.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void NotifyScreenInfoChanged() = 0;
|
||||
|
@@ -38,6 +38,7 @@
|
||||
#define CEF_INCLUDE_CEF_DISPLAY_HANDLER_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_api_hash.h"
|
||||
#include "include/cef_base.h"
|
||||
#include "include/cef_browser.h"
|
||||
#include "include/cef_frame.h"
|
||||
@@ -123,7 +124,7 @@ class CefDisplayHandler : public virtual CefBaseRefCounted {
|
||||
///
|
||||
/// Called when auto-resize is enabled via
|
||||
/// CefBrowserHost::SetAutoResizeEnabled and the contents have auto-resized.
|
||||
/// |new_size| will be the desired size in view coordinates. Return true if
|
||||
/// |new_size| will be the desired size in DIP coordinates. Return true if
|
||||
/// the resize was handled or false for default handling.
|
||||
///
|
||||
/*--cef()--*/
|
||||
@@ -162,6 +163,46 @@ class CefDisplayHandler : public virtual CefBaseRefCounted {
|
||||
virtual void OnMediaAccessChange(CefRefPtr<CefBrowser> browser,
|
||||
bool has_video_access,
|
||||
bool has_audio_access) {}
|
||||
|
||||
#if CEF_API_ADDED(13700)
|
||||
///
|
||||
/// Called when JavaScript is requesting new bounds via window.moveTo/By() or
|
||||
/// window.resizeTo/By(). |new_bounds| are in DIP screen coordinates.
|
||||
///
|
||||
/// With Views-hosted browsers |new_bounds| are the desired bounds for
|
||||
/// the containing CefWindow and may be passed directly to
|
||||
/// CefWindow::SetBounds. With external (client-provided) parent on macOS and
|
||||
/// Windows |new_bounds| are the desired frame bounds for the containing root
|
||||
/// window. With other non-Views browsers |new_bounds| are the desired bounds
|
||||
/// for the browser content only unless the client implements either
|
||||
/// CefDisplayHandler::GetRootWindowScreenRect for windowed browsers or
|
||||
/// CefRenderHandler::GetWindowScreenRect for windowless browsers. Clients may
|
||||
/// expand browser content bounds to window bounds using OS-specific or
|
||||
/// CefDisplay methods.
|
||||
///
|
||||
/// Return true if this method was handled or false for default handling.
|
||||
/// Default move/resize behavior is only provided with Views-hosted Chrome
|
||||
/// style browsers.
|
||||
///
|
||||
/*--cef(added=13700)--*/
|
||||
virtual bool OnContentsBoundsChange(CefRefPtr<CefBrowser> browser,
|
||||
const CefRect& new_bounds) {
|
||||
return false;
|
||||
}
|
||||
|
||||
///
|
||||
/// Called to retrieve the external (client-provided) root window rectangle in
|
||||
/// screen DIP coordinates. Only called for windowed browsers on Windows and
|
||||
/// Linux. Return true if the rectangle was provided. Return false to use the
|
||||
/// root window bounds on Windows or the browser content bounds on Linux. For
|
||||
/// additional usage details see CefBrowserHost::NotifyScreenInfoChanged.
|
||||
///
|
||||
/*--cef(added=13700)--*/
|
||||
virtual bool GetRootWindowScreenRect(CefRefPtr<CefBrowser> browser,
|
||||
CefRect& rect) {
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_DISPLAY_HANDLER_H_
|
||||
|
@@ -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;
|
||||
|
||||
///
|
||||
|
@@ -329,7 +329,7 @@ typedef enum {
|
||||
/// HTTP header.
|
||||
CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_IDENTITY_PROVIDER_SIGNIN_STATUS,
|
||||
|
||||
/// Website setting which is used for UnusedSitePermissionsService to
|
||||
/// Website setting which is used for RevokedPermissionsService to
|
||||
/// store revoked permissions of unused sites from unused site permissions
|
||||
/// feature.
|
||||
CEF_CONTENT_SETTING_TYPE_REVOKED_UNUSED_SITE_PERMISSIONS,
|
||||
@@ -382,12 +382,16 @@ typedef enum {
|
||||
/// a requesting-origin/top-level-site combination and persistent.
|
||||
CEF_CONTENT_SETTING_TYPE_TOP_LEVEL_TPCD_TRIAL,
|
||||
|
||||
/// Content Setting for a first-party origin trial that allows websites to
|
||||
/// enable third-party cookie deprecation.
|
||||
/// ALLOW (default): no effect (e.g. third-party cookies allowed, if not
|
||||
/// blocked otherwise).
|
||||
/// BLOCK: third-party cookies blocked, but 3PCD mitigations enabled.
|
||||
/// Content Setting for a first-party origin trial that allows websites to
|
||||
/// enable third-party cookie deprecation.
|
||||
/// 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.
|
||||
@@ -438,7 +442,7 @@ typedef enum {
|
||||
/// access to mouse inputs.
|
||||
CEF_CONTENT_SETTING_TYPE_POINTER_LOCK,
|
||||
|
||||
/// Website setting which is used for UnusedSitePermissionsService to store
|
||||
/// Website setting which is used for RevokedPermissionsService to store
|
||||
/// auto-revoked notification permissions from abusive sites.
|
||||
CEF_CONTENT_SETTING_TYPE_REVOKED_ABUSIVE_NOTIFICATION_PERMISSIONS,
|
||||
|
||||
@@ -496,7 +500,7 @@ typedef enum {
|
||||
#endif
|
||||
|
||||
#if CEF_API_ADDED(13500)
|
||||
/// Website setting which is used for UnusedSitePermissionsService to
|
||||
/// Website setting which is used for RevokedPermissionsService to
|
||||
/// store revoked notification permissions of disruptive sites.
|
||||
CEF_CONTENT_SETTING_TYPE_REVOKED_DISRUPTIVE_NOTIFICATION_PERMISSIONS,
|
||||
#endif
|
||||
|
@@ -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
|
||||
|
@@ -50,6 +50,9 @@
|
||||
/// indicated. Methods must be called on the browser process UI thread unless
|
||||
/// otherwise indicated.
|
||||
///
|
||||
/// For details on coordinate systems and usage see
|
||||
/// https://bitbucket.org/chromiumembedded/cef/wiki/GeneralUsage#markdown-header-coordinate-systems
|
||||
///
|
||||
/*--cef(source=library)--*/
|
||||
class CefDisplay : public CefBaseRefCounted {
|
||||
public:
|
||||
@@ -129,7 +132,9 @@ class CefDisplay : public CefBaseRefCounted {
|
||||
/// Returns this Display's device pixel scale factor. This specifies how much
|
||||
/// the UI should be scaled when the actual output has more pixels than
|
||||
/// standard displays (which is around 100~120dpi). The potential return
|
||||
/// values differ by platform.
|
||||
/// values differ by platform. Windowed browsers with 1.0 zoom will have a
|
||||
/// JavaScript `window.devicePixelRatio` value matching the associated
|
||||
/// Display's GetDeviceScaleFactor() value.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual float GetDeviceScaleFactor() = 0;
|
||||
|
@@ -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
|
||||
@@ -419,24 +416,6 @@ void AlloyBrowserHostImpl::WasHidden(bool hidden) {
|
||||
}
|
||||
}
|
||||
|
||||
void AlloyBrowserHostImpl::NotifyScreenInfoChanged() {
|
||||
if (!IsWindowless()) {
|
||||
DCHECK(false) << "Window rendering is not disabled";
|
||||
return;
|
||||
}
|
||||
|
||||
if (!CEF_CURRENTLY_ON_UIT()) {
|
||||
CEF_POST_TASK(
|
||||
CEF_UIT,
|
||||
base::BindOnce(&AlloyBrowserHostImpl::NotifyScreenInfoChanged, this));
|
||||
return;
|
||||
}
|
||||
|
||||
if (platform_delegate_) {
|
||||
platform_delegate_->NotifyScreenInfoChanged();
|
||||
}
|
||||
}
|
||||
|
||||
void AlloyBrowserHostImpl::Invalidate(PaintElementType type) {
|
||||
if (!IsWindowless()) {
|
||||
DCHECK(false) << "Window rendering is not disabled";
|
||||
@@ -1001,6 +980,11 @@ void AlloyBrowserHostImpl::CloseContents(content::WebContents* source) {
|
||||
}
|
||||
}
|
||||
|
||||
void AlloyBrowserHostImpl::SetContentsBounds(content::WebContents* source,
|
||||
const gfx::Rect& bounds) {
|
||||
contents_delegate_.SetContentsBoundsEx(source, bounds);
|
||||
}
|
||||
|
||||
void AlloyBrowserHostImpl::UpdateTargetURL(content::WebContents* source,
|
||||
const GURL& url) {
|
||||
contents_delegate_.UpdateTargetURL(source, url);
|
||||
@@ -1121,8 +1105,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 +1123,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(
|
||||
|
@@ -90,7 +90,6 @@ class AlloyBrowserHostImpl : public CefBrowserHostBase,
|
||||
bool IsWindowRenderingDisabled() override;
|
||||
void WasResized() override;
|
||||
void WasHidden(bool hidden) override;
|
||||
void NotifyScreenInfoChanged() override;
|
||||
void Invalidate(PaintElementType type) override;
|
||||
void SendExternalBeginFrame() override;
|
||||
void SendTouchEvent(const CefTouchEvent& event) override;
|
||||
@@ -193,6 +192,8 @@ class AlloyBrowserHostImpl : public CefBrowserHostBase,
|
||||
void LoadingStateChanged(content::WebContents* source,
|
||||
bool should_show_loading_ui) override;
|
||||
void CloseContents(content::WebContents* source) override;
|
||||
void SetContentsBounds(content::WebContents* source,
|
||||
const gfx::Rect& bounds) override;
|
||||
void UpdateTargetURL(content::WebContents* source, const GURL& url) override;
|
||||
bool DidAddMessageToConsole(content::WebContents* source,
|
||||
blink::mojom::ConsoleMessageLevel log_level,
|
||||
@@ -298,7 +299,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);
|
||||
|
||||
|
@@ -142,6 +142,18 @@ content::WebContents* CefBrowserContentsDelegate::OpenURLFromTabEx(
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool CefBrowserContentsDelegate::SetContentsBoundsEx(
|
||||
content::WebContents* source,
|
||||
const gfx::Rect& bounds) {
|
||||
if (auto c = client()) {
|
||||
if (auto handler = c->GetDisplayHandler()) {
|
||||
return handler->OnContentsBoundsChange(
|
||||
browser(), {bounds.x(), bounds.y(), bounds.width(), bounds.height()});
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void CefBrowserContentsDelegate::LoadingStateChanged(
|
||||
content::WebContents* source,
|
||||
bool should_show_loading_ui) {
|
||||
|
@@ -87,6 +87,10 @@ class CefBrowserContentsDelegate : public content::WebContentsDelegate,
|
||||
base::OnceCallback<void(content::NavigationHandle&)>&
|
||||
navigation_handle_callback);
|
||||
|
||||
// Same as SetContentsBounds but returning false if unhandled.
|
||||
bool SetContentsBoundsEx(content::WebContents* source,
|
||||
const gfx::Rect& bounds);
|
||||
|
||||
// WebContentsDelegate methods:
|
||||
void LoadingStateChanged(content::WebContents* source,
|
||||
bool should_show_loading_ui) override;
|
||||
|
@@ -817,9 +817,30 @@ void CefBrowserHostBase::NotifyMoveOrResizeStarted() {
|
||||
if (platform_delegate_) {
|
||||
platform_delegate_->NotifyMoveOrResizeStarted();
|
||||
}
|
||||
#else
|
||||
LOG(WARNING)
|
||||
<< "Incorrect usage of CefBrowserHost::NotifyMoveOrResizeStarted";
|
||||
#endif
|
||||
}
|
||||
|
||||
void CefBrowserHostBase::NotifyScreenInfoChanged() {
|
||||
if (!CEF_CURRENTLY_ON_UIT()) {
|
||||
CEF_POST_TASK(
|
||||
CEF_UIT,
|
||||
base::BindOnce(&CefBrowserHostBase::NotifyScreenInfoChanged, this));
|
||||
return;
|
||||
}
|
||||
|
||||
if (platform_delegate_) {
|
||||
if (IsWindowless() || platform_delegate_->HasExternalParent()) {
|
||||
platform_delegate_->NotifyScreenInfoChanged();
|
||||
} else {
|
||||
LOG(WARNING)
|
||||
<< "Incorrect usage of CefBrowserHost::NotifyScreenInfoChanged";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool CefBrowserHostBase::IsFullscreen() {
|
||||
if (!CEF_CURRENTLY_ON_UIT()) {
|
||||
DCHECK(false) << "called on invalid thread";
|
||||
|
@@ -265,6 +265,7 @@ class CefBrowserHostBase : public CefBrowserHost,
|
||||
void SetAudioMuted(bool mute) override;
|
||||
bool IsAudioMuted() override;
|
||||
void NotifyMoveOrResizeStarted() override;
|
||||
void NotifyScreenInfoChanged() override;
|
||||
bool IsFullscreen() override;
|
||||
void ExitFullscreen(bool will_cause_resize) override;
|
||||
bool IsRenderProcessUnresponsive() override;
|
||||
|
@@ -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
|
||||
|
@@ -244,8 +244,7 @@ void CefBrowserPlatformDelegate::PopupBrowserCreated(
|
||||
return;
|
||||
}
|
||||
|
||||
CefRefPtr<CefBrowserView> new_browser_view =
|
||||
CefBrowserView::GetForBrowser(new_browser);
|
||||
auto new_browser_view = new_browser->GetBrowserView();
|
||||
CHECK(new_browser_view);
|
||||
|
||||
bool popup_handled = false;
|
||||
@@ -389,9 +388,7 @@ bool CefBrowserPlatformDelegate::IsHidden() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
void CefBrowserPlatformDelegate::NotifyScreenInfoChanged() {
|
||||
DCHECK(false);
|
||||
}
|
||||
void CefBrowserPlatformDelegate::NotifyScreenInfoChanged() {}
|
||||
|
||||
void CefBrowserPlatformDelegate::Invalidate(cef_paint_element_type_t type) {
|
||||
DCHECK(false);
|
||||
@@ -567,6 +564,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"
|
||||
@@ -305,7 +306,7 @@ class CefBrowserPlatformDelegate {
|
||||
virtual bool IsHidden() const;
|
||||
|
||||
// Notify the browser that screen information has changed. Only used with
|
||||
// windowless rendering.
|
||||
// windowless rendering and external (client-provided) root window.
|
||||
virtual void NotifyScreenInfoChanged();
|
||||
|
||||
// Invalidate the view. Only used with windowless rendering.
|
||||
@@ -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>;
|
||||
|
@@ -173,6 +173,12 @@ class BrowserDelegate : public content::WebContentsDelegate {
|
||||
navigation_handle_callback) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Same as SetContentsBounds but returning false if unhandled.
|
||||
virtual bool SetContentsBoundsEx(content::WebContents* source,
|
||||
const gfx::Rect& bounds) {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace cef
|
||||
|
@@ -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(
|
||||
@@ -573,6 +573,14 @@ bool ChromeBrowserDelegate::OpenURLFromTabEx(
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChromeBrowserDelegate::SetContentsBoundsEx(content::WebContents* source,
|
||||
const gfx::Rect& bounds) {
|
||||
if (auto delegate = GetDelegateForWebContents(source)) {
|
||||
return delegate->SetContentsBoundsEx(source, bounds);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void ChromeBrowserDelegate::LoadingStateChanged(content::WebContents* source,
|
||||
bool should_show_loading_ui) {
|
||||
if (auto delegate = GetDelegateForWebContents(source)) {
|
||||
@@ -759,8 +767,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.
|
||||
|
@@ -94,6 +94,8 @@ class ChromeBrowserDelegate : public cef::BrowserDelegate {
|
||||
const content::OpenURLParams& params,
|
||||
base::OnceCallback<void(content::NavigationHandle&)>&
|
||||
navigation_handle_callback) override;
|
||||
bool SetContentsBoundsEx(content::WebContents* source,
|
||||
const gfx::Rect& bounds) override;
|
||||
|
||||
// WebContentsDelegate methods:
|
||||
void WebContentsCreated(content::WebContents* source_contents,
|
||||
|
@@ -250,10 +250,6 @@ void ChromeBrowserHostImpl::WasHidden(bool hidden) {
|
||||
NOTIMPLEMENTED();
|
||||
}
|
||||
|
||||
void ChromeBrowserHostImpl::NotifyScreenInfoChanged() {
|
||||
NOTIMPLEMENTED();
|
||||
}
|
||||
|
||||
void ChromeBrowserHostImpl::Invalidate(PaintElementType type) {
|
||||
NOTIMPLEMENTED();
|
||||
}
|
||||
@@ -500,8 +496,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.
|
||||
|
@@ -84,7 +84,6 @@ class ChromeBrowserHostImpl : public CefBrowserHostBase {
|
||||
bool IsWindowRenderingDisabled() override { return false; }
|
||||
void WasResized() override;
|
||||
void WasHidden(bool hidden) override;
|
||||
void NotifyScreenInfoChanged() override;
|
||||
void Invalidate(PaintElementType type) override;
|
||||
void SendExternalBeginFrame() override;
|
||||
void SendTouchEvent(const CefTouchEvent& event) override;
|
||||
|
@@ -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(); }
|
||||
|
||||
|
@@ -14,6 +14,10 @@
|
||||
#include "ui/views/win/hwnd_util.h"
|
||||
#endif
|
||||
|
||||
#if defined(USE_AURA)
|
||||
#include "cef/libcef/browser/native/browser_platform_delegate_native_aura.h"
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
|
||||
gfx::AcceleratedWidget GetParentWidget(const CefWindowInfo& window_info) {
|
||||
@@ -61,6 +65,9 @@ class ChildWindowDelegate : public CefWindowDelegate {
|
||||
void OnWindowDestroyed(CefRefPtr<CefWindow> window) override {
|
||||
browser_view_ = nullptr;
|
||||
window_ = nullptr;
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
native_delegate_ = nullptr;
|
||||
#endif
|
||||
}
|
||||
|
||||
CefRect GetInitialBounds(CefRefPtr<CefWindow> window) override {
|
||||
@@ -71,22 +78,38 @@ class ChildWindowDelegate : public CefWindowDelegate {
|
||||
return initial_bounds;
|
||||
}
|
||||
|
||||
#if defined(USE_AURA)
|
||||
void OnWindowBoundsChanged(CefRefPtr<CefWindow> window,
|
||||
const CefRect& new_bounds) override {
|
||||
if (native_delegate_) {
|
||||
// Send new bounds to the renderer process and trigger the resize event.
|
||||
native_delegate_->NotifyScreenInfoChanged();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
private:
|
||||
void ShowWindow() {
|
||||
#if defined(USE_AURA)
|
||||
auto browser = CefBrowserHostBase::FromBrowser(browser_view_->GetBrowser());
|
||||
auto platform_delegate = browser->platform_delegate();
|
||||
DCHECK(platform_delegate->IsViewsHosted());
|
||||
auto chrome_delegate =
|
||||
static_cast<CefBrowserPlatformDelegateChromeViews*>(platform_delegate);
|
||||
native_delegate_ = static_cast<CefBrowserPlatformDelegateNativeAura*>(
|
||||
chrome_delegate->native_delegate());
|
||||
native_delegate_->InstallRootWindowBoundsCallback();
|
||||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
auto widget = static_cast<CefWindowImpl*>(window_.get())->widget();
|
||||
DCHECK(widget);
|
||||
const HWND widget_hwnd = HWNDForWidget(widget);
|
||||
DCHECK(widget_hwnd);
|
||||
|
||||
// The native delegate needs state to perform some actions.
|
||||
auto browser = CefBrowserHostBase::FromBrowser(browser_view_->GetBrowser());
|
||||
auto platform_delegate = browser->platform_delegate();
|
||||
DCHECK(platform_delegate->IsViewsHosted());
|
||||
auto chrome_delegate =
|
||||
static_cast<CefBrowserPlatformDelegateChromeViews*>(platform_delegate);
|
||||
auto native_delegate = static_cast<CefBrowserPlatformDelegateNativeWin*>(
|
||||
chrome_delegate->native_delegate());
|
||||
native_delegate->set_widget(widget, widget_hwnd);
|
||||
// The Windows delegate needs state to perform some actions.
|
||||
auto* delegate_win =
|
||||
static_cast<CefBrowserPlatformDelegateNativeWin*>(native_delegate_);
|
||||
delegate_win->set_widget(widget, widget_hwnd);
|
||||
|
||||
if (window_info_.ex_style & WS_EX_NOACTIVATE) {
|
||||
const DWORD widget_ex_styles = GetWindowLongPtr(widget_hwnd, GWL_EXSTYLE);
|
||||
@@ -105,6 +128,7 @@ class ChildWindowDelegate : public CefWindowDelegate {
|
||||
return;
|
||||
}
|
||||
#endif // BUILDFLAG(IS_WIN)
|
||||
#endif // defined(USE_AURA)
|
||||
|
||||
window_->Show();
|
||||
|
||||
@@ -112,7 +136,6 @@ class ChildWindowDelegate : public CefWindowDelegate {
|
||||
browser_view_->RequestFocus();
|
||||
}
|
||||
|
||||
private:
|
||||
ChildWindowDelegate(CefRefPtr<CefBrowserView> browser_view,
|
||||
const CefWindowInfo& window_info)
|
||||
: browser_view_(browser_view), window_info_(window_info) {}
|
||||
@@ -122,6 +145,11 @@ class ChildWindowDelegate : public CefWindowDelegate {
|
||||
|
||||
CefRefPtr<CefWindow> window_;
|
||||
|
||||
#if defined(USE_AURA)
|
||||
base::raw_ptr<CefBrowserPlatformDelegateNativeAura> native_delegate_ =
|
||||
nullptr;
|
||||
#endif
|
||||
|
||||
IMPLEMENT_REFCOUNTING(ChildWindowDelegate);
|
||||
};
|
||||
|
||||
|
@@ -18,6 +18,7 @@
|
||||
#include "cef/libcef/common/cef_switches.h"
|
||||
#include "chrome/browser/browser_process_impl.h"
|
||||
#include "chrome/browser/chrome_process_singleton.h"
|
||||
#include "chrome/chrome_elf/chrome_elf_main.h"
|
||||
#include "chrome/common/chrome_result_codes.h"
|
||||
#include "components/crash/core/app/crash_switches.h"
|
||||
#include "components/keep_alive_registry/keep_alive_types.h"
|
||||
@@ -35,6 +36,8 @@
|
||||
#include <memory>
|
||||
|
||||
#include "content/public/app/sandbox_helper_win.h"
|
||||
#include "sandbox/policy/mojom/sandbox.mojom.h"
|
||||
#include "sandbox/policy/sandbox_type.h"
|
||||
#include "sandbox/win/src/sandbox_types.h"
|
||||
#endif
|
||||
|
||||
@@ -241,9 +244,29 @@ int CefMainRunner::RunAsHelperProcess(const CefMainArgs& args,
|
||||
// Execute the secondary process.
|
||||
content::ContentMainParams main_params(main_delegate.get());
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
// Initialize the sandbox services.
|
||||
// Match the logic in MainDllLoader::Launch.
|
||||
sandbox::SandboxInterfaceInfo sandbox_info = {nullptr};
|
||||
if (windows_sandbox_info == nullptr) {
|
||||
content::InitializeSandboxInfo(&sandbox_info);
|
||||
|
||||
// IsUnsandboxedSandboxType() can't be used here because its result can be
|
||||
// gated behind a feature flag, which are not yet initialized.
|
||||
const bool is_sandboxed =
|
||||
sandbox::policy::SandboxTypeFromCommandLine(command_line) !=
|
||||
sandbox::mojom::Sandbox::kNoSandbox;
|
||||
|
||||
// When using cef_sandbox_info_create() the sandbox info will always be
|
||||
// initialized. This is incorrect for cases where the sandbox is disabled, and
|
||||
// we adjust for that here.
|
||||
if (!is_sandboxed || windows_sandbox_info == nullptr) {
|
||||
if (is_sandboxed) {
|
||||
// For child processes that are running as --no-sandbox, don't
|
||||
// initialize the sandbox info, otherwise they'll be treated as brokers
|
||||
// (as if they were the browser).
|
||||
content::InitializeSandboxInfo(
|
||||
&sandbox_info, IsExtensionPointDisableSet()
|
||||
? sandbox::MITIGATION_EXTENSION_POINT_DISABLE
|
||||
: 0);
|
||||
}
|
||||
windows_sandbox_info = &sandbox_info;
|
||||
}
|
||||
|
||||
|
@@ -5,6 +5,7 @@
|
||||
#include "cef/libcef/browser/native/browser_platform_delegate_native.h"
|
||||
|
||||
#include "cef/libcef/browser/alloy/alloy_browser_host_impl.h"
|
||||
#include "content/browser/renderer_host/render_widget_host_impl.h"
|
||||
#include "content/public/browser/render_view_host.h"
|
||||
#include "content/public/browser/render_widget_host.h"
|
||||
#include "third_party/blink/public/common/input/web_mouse_event.h"
|
||||
@@ -24,3 +25,25 @@ void CefBrowserPlatformDelegateNative::WasResized() {
|
||||
host->GetWidget()->SynchronizeVisualProperties();
|
||||
}
|
||||
}
|
||||
|
||||
void CefBrowserPlatformDelegateNative::NotifyScreenInfoChanged() {
|
||||
content::RenderWidgetHostImpl* render_widget_host = nullptr;
|
||||
if (web_contents_) {
|
||||
if (auto* rvh = web_contents_->GetRenderViewHost()) {
|
||||
render_widget_host =
|
||||
content::RenderWidgetHostImpl::From(rvh->GetWidget());
|
||||
}
|
||||
}
|
||||
if (!render_widget_host) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Send updated screen bounds information to the renderer process.
|
||||
if (render_widget_host->delegate()) {
|
||||
render_widget_host->delegate()->SendScreenRects();
|
||||
} else {
|
||||
render_widget_host->SendScreenRects();
|
||||
}
|
||||
|
||||
render_widget_host->NotifyScreenInfoChanged();
|
||||
}
|
||||
|
@@ -32,6 +32,7 @@ class CefBrowserPlatformDelegateNative
|
||||
// CefBrowserPlatformDelegate methods:
|
||||
SkColor GetBackgroundColor() const override;
|
||||
void WasResized() override;
|
||||
void NotifyScreenInfoChanged() override;
|
||||
|
||||
// Translate CEF events to Chromium/Blink Web events.
|
||||
virtual input::NativeWebKeyboardEvent TranslateWebKeyEvent(
|
||||
|
@@ -4,6 +4,7 @@
|
||||
|
||||
#include "cef/libcef/browser/native/browser_platform_delegate_native_aura.h"
|
||||
|
||||
#include "cef/libcef/browser/browser_host_base.h"
|
||||
#include "cef/libcef/browser/native/menu_runner_views_aura.h"
|
||||
#include "cef/libcef/browser/views/view_util.h"
|
||||
#include "content/browser/renderer_host/render_widget_host_view_aura.h"
|
||||
@@ -19,6 +20,42 @@ CefBrowserPlatformDelegateNativeAura::CefBrowserPlatformDelegateNativeAura(
|
||||
SkColor background_color)
|
||||
: CefBrowserPlatformDelegateNative(window_info, background_color) {}
|
||||
|
||||
void CefBrowserPlatformDelegateNativeAura::InstallRootWindowBoundsCallback() {
|
||||
auto* host_view = GetHostView();
|
||||
CHECK(host_view);
|
||||
|
||||
host_view->SetRootWindowBoundsCallback(base::BindRepeating(
|
||||
[](base::WeakPtr<CefBrowserPlatformDelegateNativeAura> self) {
|
||||
return self->RootWindowBoundsCallback();
|
||||
},
|
||||
weak_ptr_factory_.GetWeakPtr()));
|
||||
}
|
||||
|
||||
std::optional<gfx::Rect>
|
||||
CefBrowserPlatformDelegateNativeAura::RootWindowBoundsCallback() {
|
||||
if (browser_) {
|
||||
if (auto client = browser_->client()) {
|
||||
if (auto handler = client->GetDisplayHandler()) {
|
||||
CefRect rect;
|
||||
if (handler->GetRootWindowScreenRect(browser_.get(), rect) &&
|
||||
!rect.IsEmpty()) {
|
||||
return gfx::Rect(rect.x, rect.y, rect.width, rect.height);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Call the default platform implementation, if any.
|
||||
return GetRootWindowBounds();
|
||||
}
|
||||
|
||||
void CefBrowserPlatformDelegateNativeAura::RenderViewReady() {
|
||||
CefBrowserPlatformDelegateNative::RenderViewReady();
|
||||
|
||||
// The RWHV should now exist for Alloy style browsers.
|
||||
InstallRootWindowBoundsCallback();
|
||||
}
|
||||
|
||||
void CefBrowserPlatformDelegateNativeAura::SendKeyEvent(
|
||||
const CefKeyEvent& event) {
|
||||
auto view = GetHostView();
|
||||
|
@@ -5,19 +5,19 @@
|
||||
#ifndef CEF_LIBCEF_BROWSER_NATIVE_BROWSER_PLATFORM_DELEGATE_NATIVE_AURA_H_
|
||||
#define CEF_LIBCEF_BROWSER_NATIVE_BROWSER_PLATFORM_DELEGATE_NATIVE_AURA_H_
|
||||
|
||||
#include <optional>
|
||||
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "base/memory/weak_ptr.h"
|
||||
#include "cef/libcef/browser/native/browser_platform_delegate_native.h"
|
||||
#include "ui/events/event.h"
|
||||
#include "ui/gfx/geometry/rect.h"
|
||||
#include "ui/gfx/geometry/vector2d.h"
|
||||
|
||||
namespace content {
|
||||
class RenderWidgetHostViewAura;
|
||||
}
|
||||
|
||||
namespace gfx {
|
||||
class Vector2d;
|
||||
}
|
||||
|
||||
// Windowed browser implementation for Aura platforms.
|
||||
class CefBrowserPlatformDelegateNativeAura
|
||||
: public CefBrowserPlatformDelegateNative {
|
||||
@@ -25,7 +25,10 @@ class CefBrowserPlatformDelegateNativeAura
|
||||
CefBrowserPlatformDelegateNativeAura(const CefWindowInfo& window_info,
|
||||
SkColor background_color);
|
||||
|
||||
void InstallRootWindowBoundsCallback();
|
||||
|
||||
// CefBrowserPlatformDelegate methods:
|
||||
void RenderViewReady() override;
|
||||
void SendKeyEvent(const CefKeyEvent& event) override;
|
||||
void SendMouseClickEvent(const CefMouseEvent& event,
|
||||
CefBrowserHost::MouseButtonType type,
|
||||
@@ -71,9 +74,16 @@ class CefBrowserPlatformDelegateNativeAura
|
||||
int deltaY) const;
|
||||
virtual gfx::Vector2d GetUiWheelEventOffset(int deltaX, int deltaY) const;
|
||||
|
||||
// Returns the root window bounds in screen DIP coordinates.
|
||||
virtual std::optional<gfx::Rect> GetRootWindowBounds() {
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
protected:
|
||||
base::OnceClosure GetWidgetDeleteCallback();
|
||||
|
||||
std::optional<gfx::Rect> RootWindowBoundsCallback();
|
||||
|
||||
static base::TimeTicks GetEventTimeStamp();
|
||||
static int TranslateUiEventModifiers(uint32_t cef_modifiers);
|
||||
static int TranslateUiChangedButtonFlags(uint32_t cef_modifiers);
|
||||
|
@@ -73,7 +73,7 @@ CefRect GetScreenFrameRectFromDIPContentRect(HWND window,
|
||||
// Convert from DIP using a method that can handle multiple displays with
|
||||
// different DPI. If |window| is nullptr the closest display will be used.
|
||||
const auto screen_rect =
|
||||
display::win::ScreenWin::DIPToScreenRect(window, dip_rect);
|
||||
display::win::GetScreenWin()->DIPToScreenRect(window, dip_rect);
|
||||
|
||||
RECT rect = {screen_rect.x(), screen_rect.y(),
|
||||
screen_rect.x() + screen_rect.width(),
|
||||
@@ -109,7 +109,7 @@ CefRect GetAdjustedScreenFrameRect(CefRect screen_rect,
|
||||
|
||||
// Convert to DIP using a method that can handle multiple displays with
|
||||
// different DPI.
|
||||
const auto dip_rect = display::win::ScreenWin::ScreenToDIPRect(
|
||||
const auto dip_rect = display::win::GetScreenWin()->ScreenToDIPRect(
|
||||
nullptr, gfx::Rect(screen_rect.x, screen_rect.y, screen_rect.width,
|
||||
screen_rect.height));
|
||||
const auto visible_dip_rect = MakeVisibleOnScreenRect(
|
||||
@@ -206,7 +206,7 @@ bool CefBrowserPlatformDelegateNativeWin::CreateHostWindow() {
|
||||
|
||||
// Convert to DIP using a method that can handle multiple displays with
|
||||
// different DPI. Client coordinates always have origin (0,0).
|
||||
const gfx::Rect dip_rect = display::win::ScreenWin::ScreenToDIPRect(
|
||||
const gfx::Rect dip_rect = display::win::GetScreenWin()->ScreenToDIPRect(
|
||||
window_info_.window, gfx::Rect(0, 0, cr.right, cr.bottom));
|
||||
|
||||
// Stay on top if top-most window hosting the web view is topmost.
|
||||
@@ -427,6 +427,27 @@ CefEventHandle CefBrowserPlatformDelegateNativeWin::GetEventHandle(
|
||||
const_cast<CHROME_MSG*>(&event.os_event->native_event()));
|
||||
}
|
||||
|
||||
std::optional<gfx::Rect>
|
||||
CefBrowserPlatformDelegateNativeWin::GetRootWindowBounds() {
|
||||
if (window_widget_) {
|
||||
if (HWND hwnd = GetHostWindowHandle()) {
|
||||
if (HWND root_hwnd = ::GetAncestor(hwnd, GA_ROOT)) {
|
||||
RECT root_rect = {};
|
||||
if (::GetWindowRect(root_hwnd, &root_rect)) {
|
||||
auto* top_level =
|
||||
window_widget_->GetNativeWindow()->GetToplevelWindow();
|
||||
gfx::Rect bounds(root_rect);
|
||||
bounds = display::Screen::GetScreen()->ScreenToDIPRectInWindow(
|
||||
top_level, bounds);
|
||||
return bounds;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
ui::KeyEvent CefBrowserPlatformDelegateNativeWin::TranslateUiKeyEvent(
|
||||
const CefKeyEvent& key_event) const {
|
||||
int flags = TranslateUiEventModifiers(key_event.modifiers);
|
||||
@@ -596,8 +617,8 @@ LRESULT CALLBACK CefBrowserPlatformDelegateNativeWin::WndProc(HWND hwnd,
|
||||
|
||||
case WM_MOVING:
|
||||
case WM_MOVE:
|
||||
if (browser) {
|
||||
browser->NotifyMoveOrResizeStarted();
|
||||
if (platform_delegate) {
|
||||
platform_delegate->NotifyMoveOrResizeStarted();
|
||||
}
|
||||
return 0;
|
||||
|
||||
|
@@ -32,6 +32,7 @@ class CefBrowserPlatformDelegateNativeWin
|
||||
bool HandleKeyboardEvent(const input::NativeWebKeyboardEvent& event) override;
|
||||
CefEventHandle GetEventHandle(
|
||||
const input::NativeWebKeyboardEvent& event) const override;
|
||||
std::optional<gfx::Rect> GetRootWindowBounds() override;
|
||||
|
||||
// CefBrowserPlatformDelegateNativeAura methods:
|
||||
ui::KeyEvent TranslateUiKeyEvent(const CefKeyEvent& key_event) const override;
|
||||
|
@@ -68,8 +68,10 @@ void CefWindowDelegateView::Init(gfx::AcceleratedWidget parent_widget,
|
||||
DCHECK(widget->widget_delegate()->CanActivate());
|
||||
|
||||
// WidgetDelegate::DeleteDelegate() will execute the registered callback.
|
||||
RegisterDeleteDelegateCallback(base::BindOnce(
|
||||
&CefWindowDelegateView::DeleteDelegate, base::Unretained(this)));
|
||||
RegisterDeleteDelegateCallback(
|
||||
RegisterDeleteCallbackPassKey(),
|
||||
base::BindOnce(&CefWindowDelegateView::DeleteDelegate,
|
||||
base::Unretained(this)));
|
||||
}
|
||||
|
||||
void CefWindowDelegateView::InitContent() {
|
||||
|
@@ -252,7 +252,7 @@ void LoadCookies(const CefBrowserContext::Getter& browser_context_getter,
|
||||
if (request.trusted_params.has_value() &&
|
||||
!request.trusted_params->isolation_info.IsEmpty()) {
|
||||
const auto& isolation_info = request.trusted_params->isolation_info;
|
||||
partition_key_collection = net::CookiePartitionKeyCollection::FromOptional(
|
||||
partition_key_collection = net::CookiePartitionKeyCollection(
|
||||
net::CookiePartitionKey::FromNetworkIsolationKey(
|
||||
isolation_info.network_isolation_key(), request.site_for_cookies,
|
||||
net::SchemefulSite(request.url),
|
||||
|
@@ -9,6 +9,7 @@
|
||||
#include "base/notreached.h"
|
||||
#include "cef/libcef/browser/browser_host_base.h"
|
||||
#include "chrome/browser/ui/permission_bubble/permission_prompt.h"
|
||||
#include "components/permissions/permission_request.h"
|
||||
|
||||
namespace permission_prompt {
|
||||
|
||||
|
@@ -216,8 +216,9 @@ void CefOverlayViewHost::Init(views::View* host_view,
|
||||
|
||||
// Cause WidgetDelegate::DeleteDelegate() to delete |this| after executing the
|
||||
// registered DeleteDelegate callback.
|
||||
SetOwnedByWidget(true);
|
||||
SetOwnedByWidget(OwnedByWidgetPassKey());
|
||||
RegisterDeleteDelegateCallback(
|
||||
RegisterDeleteCallbackPassKey(),
|
||||
base::BindOnce(&CefOverlayViewHost::Cleanup, base::Unretained(this)));
|
||||
|
||||
if (window_view_->IsChromeStyle()) {
|
||||
|
@@ -218,7 +218,7 @@ display::Display GetDisplayNearestPoint(const gfx::Point& point,
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
if (input_pixel_coords) {
|
||||
find_point = gfx::ToFlooredPoint(
|
||||
display::win::ScreenWin::ScreenToDIPPoint(gfx::PointF(point)));
|
||||
display::win::GetScreenWin()->ScreenToDIPPoint(gfx::PointF(point)));
|
||||
}
|
||||
#endif
|
||||
return display::Screen::GetScreen()->GetDisplayNearestPoint(find_point);
|
||||
@@ -230,7 +230,7 @@ display::Display GetDisplayMatchingBounds(const gfx::Rect& bounds,
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
if (input_pixel_coords) {
|
||||
find_bounds =
|
||||
display::win::ScreenWin::ScreenToDIPRect(nullptr, find_bounds);
|
||||
display::win::GetScreenWin()->ScreenToDIPRect(nullptr, find_bounds);
|
||||
}
|
||||
#endif
|
||||
return display::Screen::GetScreen()->GetDisplayMatching(find_bounds);
|
||||
@@ -249,19 +249,19 @@ void ConvertPointToPixels(gfx::Point* point, float device_scale_factor) {
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
gfx::Point ConvertPointFromPixels(const gfx::Point& point) {
|
||||
return gfx::ToFlooredPoint(
|
||||
display::win::ScreenWin::ScreenToDIPPoint(gfx::PointF(point)));
|
||||
display::win::GetScreenWin()->ScreenToDIPPoint(gfx::PointF(point)));
|
||||
}
|
||||
|
||||
gfx::Point ConvertPointToPixels(const gfx::Point& point) {
|
||||
return display::win::ScreenWin::DIPToScreenPoint(point);
|
||||
return display::win::GetScreenWin()->DIPToScreenPoint(point);
|
||||
}
|
||||
|
||||
gfx::Rect ConvertRectFromPixels(const gfx::Rect& rect) {
|
||||
return display::win::ScreenWin::ScreenToDIPRect(nullptr, rect);
|
||||
return display::win::GetScreenWin()->ScreenToDIPRect(nullptr, rect);
|
||||
}
|
||||
|
||||
gfx::Rect ConvertRectToPixels(const gfx::Rect& rect) {
|
||||
return display::win::ScreenWin::DIPToScreenRect(nullptr, rect);
|
||||
return display::win::GetScreenWin()->DIPToScreenRect(nullptr, rect);
|
||||
}
|
||||
#endif // BUILDFLAG(IS_WIN)
|
||||
|
||||
|
@@ -110,7 +110,7 @@ class NativeFrameViewEx : public views::NativeFrameView {
|
||||
// Convert from DIP to pixel coordinates using a method that can handle
|
||||
// multiple displays with different DPI.
|
||||
const auto screen_rect =
|
||||
display::win::ScreenWin::DIPToScreenRect(window, client_bounds);
|
||||
display::win::GetScreenWin()->DIPToScreenRect(window, client_bounds);
|
||||
|
||||
RECT rect = {screen_rect.x(), screen_rect.y(),
|
||||
screen_rect.x() + screen_rect.width(),
|
||||
@@ -123,7 +123,7 @@ class NativeFrameViewEx : public views::NativeFrameView {
|
||||
rect.right - rect.left, rect.bottom - rect.top);
|
||||
|
||||
// Convert back to DIP.
|
||||
return display::win::ScreenWin::ScreenToDIPRect(window, pixel_rect);
|
||||
return display::win::GetScreenWin()->ScreenToDIPRect(window, pixel_rect);
|
||||
#else
|
||||
// Use the default implementation.
|
||||
return views::NativeFrameView::GetWindowBoundsForClientBounds(
|
||||
@@ -420,8 +420,9 @@ void CefWindowView::CreateWidget(gfx::AcceleratedWidget parent_widget) {
|
||||
|
||||
// Cause WidgetDelegate::DeleteDelegate() to delete |this| after executing the
|
||||
// registered DeleteDelegate callback.
|
||||
SetOwnedByWidget(true);
|
||||
SetOwnedByWidget(OwnedByWidgetPassKey());
|
||||
RegisterDeleteDelegateCallback(
|
||||
RegisterDeleteCallbackPassKey(),
|
||||
base::BindOnce(&CefWindowView::DeleteDelegate, base::Unretained(this)));
|
||||
|
||||
if (cef_delegate()) {
|
||||
|
@@ -208,7 +208,7 @@ CEF_EXPORT int cef_get_min_log_level() {
|
||||
}
|
||||
|
||||
CEF_EXPORT int cef_get_vlog_level(const char* file_start, size_t N) {
|
||||
return logging::GetVlogLevelHelper(std::string_view(file_start, N));
|
||||
return logging::GetVlogLevelHelper(file_start, N);
|
||||
}
|
||||
|
||||
CEF_EXPORT void cef_log(const char* file,
|
||||
|
@@ -548,13 +548,12 @@ bool CefCrashReporterClient::ReadCrashConfigFile() {
|
||||
// Allow override of some values via environment variables.
|
||||
{
|
||||
std::unique_ptr<base::Environment> env(base::Environment::Create());
|
||||
std::string val_str;
|
||||
|
||||
if (env->GetVar("CEF_CRASH_REPORTER_SERVER_URL", &val_str)) {
|
||||
ParseURL(val_str, &server_url_);
|
||||
if (const auto& var_str = env->GetVar("CEF_CRASH_REPORTER_SERVER_URL")) {
|
||||
ParseURL(*var_str, &server_url_);
|
||||
}
|
||||
if (env->GetVar("CEF_CRASH_REPORTER_RATE_LIMIT_ENABLED", &val_str)) {
|
||||
rate_limit_ = ParseBool(val_str);
|
||||
if (const auto& var_str =
|
||||
env->GetVar("CEF_CRASH_REPORTER_RATE_LIMIT_ENABLED")) {
|
||||
rate_limit_ = ParseBool(*var_str);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -642,11 +641,9 @@ bool CefCrashReporterClient::GetCrashDumpLocation(base::FilePath* crash_dir) {
|
||||
// By setting the BREAKPAD_DUMP_LOCATION environment variable, an alternate
|
||||
// location to write breakpad crash dumps can be set.
|
||||
std::unique_ptr<base::Environment> env(base::Environment::Create());
|
||||
std::string alternate_crash_dump_location;
|
||||
if (env->GetVar("BREAKPAD_DUMP_LOCATION", &alternate_crash_dump_location)) {
|
||||
base::FilePath crash_dumps_dir_path =
|
||||
base::FilePath::FromUTF8Unsafe(alternate_crash_dump_location);
|
||||
base::PathService::Override(chrome::DIR_CRASH_DUMPS, crash_dumps_dir_path);
|
||||
if (const auto& val = env->GetVar("BREAKPAD_DUMP_LOCATION")) {
|
||||
base::PathService::Override(chrome::DIR_CRASH_DUMPS,
|
||||
base::FilePath::FromUTF8Unsafe(*val));
|
||||
}
|
||||
return base::PathService::Get(chrome::DIR_CRASH_DUMPS, crash_dir);
|
||||
}
|
||||
@@ -726,8 +723,7 @@ bool CefCrashReporterClient::EnableBrowserCrashForwarding() {
|
||||
// storage for each key size and later substituting the actual key name during
|
||||
// crash dump processing.
|
||||
|
||||
#define IDKEY(name) \
|
||||
{ name, IDKey::Tag::kArray }
|
||||
#define IDKEY(name) {name, IDKey::Tag::kArray}
|
||||
|
||||
#define IDKEY_ENTRIES(n) \
|
||||
IDKEY(n "-A"), IDKEY(n "-B"), IDKEY(n "-C"), IDKEY(n "-D"), IDKEY(n "-E"), \
|
||||
|
@@ -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;
|
||||
};
|
||||
|
||||
|
@@ -36,9 +36,7 @@ std::string GenerateHeaders(const HeaderMap& map) {
|
||||
|
||||
void ParseHeaders(const std::string& header_str, HeaderMap& map) {
|
||||
// Parse the request header values
|
||||
for (net::HttpUtil::HeadersIterator i(header_str.begin(), header_str.end(),
|
||||
"\n\r");
|
||||
i.GetNext();) {
|
||||
for (net::HttpUtil::HeadersIterator i(header_str, "\n\r"); i.GetNext();) {
|
||||
map.insert(std::make_pair(i.name(), i.values()));
|
||||
}
|
||||
}
|
||||
|
@@ -568,8 +568,7 @@ void CefRequestImpl::Get(const cef::mojom::RequestParamsPtr& params,
|
||||
|
||||
CefRequest::HeaderMap headerMap;
|
||||
if (!params->headers.empty()) {
|
||||
for (net::HttpUtil::HeadersIterator i(params->headers.begin(),
|
||||
params->headers.end(), "\n\r");
|
||||
for (net::HttpUtil::HeadersIterator i(params->headers, "\n\r");
|
||||
i.GetNext();) {
|
||||
request.AddHttpHeaderField(blink::WebString::FromUTF8(i.name()),
|
||||
blink::WebString::FromUTF8(i.values()));
|
||||
|
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',
|
||||
},
|
||||
{
|
||||
@@ -123,6 +126,10 @@ patches = [
|
||||
# win: Delay enablement of native occlusion tracking until the initially-
|
||||
# minimized window is restored for the first time.
|
||||
# https://github.com/chromiumembedded/cef/issues/3638
|
||||
#
|
||||
# win: Don't call DwmSetWindowAttribute when the browser has an external
|
||||
# parent. This call only applies for top-level windows.
|
||||
# https://issuetracker.google.com/issues/41241478
|
||||
'name': 'views_widget',
|
||||
},
|
||||
{
|
||||
@@ -221,10 +228,6 @@ patches = [
|
||||
# See related documentation in
|
||||
# libcef/browser/chrome/views/chrome_browser_frame.h.
|
||||
# https://github.com/chromiumembedded/cef/issues/2969
|
||||
#
|
||||
# Properly disable 3-dot > "Open glic" menu item to avoid crash in
|
||||
# GlicKeyedService::ToggleUI.
|
||||
# https://issues.chromium.org/issues/408163318
|
||||
'name': 'chrome_runtime_views',
|
||||
},
|
||||
{
|
||||
@@ -267,6 +270,9 @@ patches = [
|
||||
# Fix usage of JavaScript tab modal dialogs with Alloy style browsers.
|
||||
# Modifies the logic added in https://crrev.com/78ce55cbc0.
|
||||
# https://github.com/chromiumembedded/cef/issues/3818
|
||||
#
|
||||
# Fix crash with OSR browsers on Linux.
|
||||
# https://github.com/chromiumembedded/cef/issues/3921
|
||||
'name': 'chrome_browser_dialogs_jsmodal',
|
||||
},
|
||||
{
|
||||
@@ -351,7 +357,8 @@ patches = [
|
||||
'name': 'embedder_product_override',
|
||||
},
|
||||
{
|
||||
# Fix Jumbo/component build dependency issue.
|
||||
# Fix component build dependency issue.
|
||||
# https://issues.chromium.org/issues/414506471
|
||||
'name': 'chrome_browser_safe_browsing',
|
||||
},
|
||||
{
|
||||
@@ -390,7 +397,10 @@ patches = [
|
||||
#
|
||||
# Windows: Fix crash during window creation.
|
||||
# https://bugs.chromium.org/p/chromium/issues/detail?id=761389
|
||||
'name': 'rwh_background_color_1984',
|
||||
#
|
||||
# Add RWHVAura::SetRootWindowBoundsCallback.
|
||||
# https://github.com/chromiumembedded/cef/issues/3920
|
||||
'name': 'renderer_host_aura',
|
||||
},
|
||||
{
|
||||
# Expose RFH via NavigationHandle for retrieval in DidFinishNavigation on
|
||||
@@ -626,6 +636,9 @@ patches = [
|
||||
},
|
||||
{
|
||||
# Create top-level widget type when Widget::InitParams::child is false.
|
||||
#
|
||||
# Allow access to deprecated "owned by widget" model.
|
||||
# https://github.com/chromiumembedded/cef/issues/3924
|
||||
'name': 'ui_views_widget_type'
|
||||
},
|
||||
{
|
||||
@@ -782,10 +795,5 @@ patches = [
|
||||
# builds.
|
||||
# https://github.com/chromiumembedded/cef/issues/3892
|
||||
'name': 'config_3892'
|
||||
},
|
||||
{
|
||||
# Fix DCHECK_EQ in SchemefulSite with custom standard schemes.
|
||||
# https://issues.chromium.org/issues/408329644
|
||||
'name': 'net_schemeful_site_408329644'
|
||||
}
|
||||
]
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git base/BUILD.gn base/BUILD.gn
|
||||
index 50893c5653a42..75dd03c3df9a8 100644
|
||||
index 59721ed3c9e26..c0ee7567a534c 100644
|
||||
--- base/BUILD.gn
|
||||
+++ base/BUILD.gn
|
||||
@@ -41,6 +41,7 @@ import("//build/rust/rust_static_library.gni")
|
||||
@@ -10,8 +10,8 @@ index 50893c5653a42..75dd03c3df9a8 100644
|
||||
import("//testing/libfuzzer/fuzzer_test.gni")
|
||||
import("//testing/test.gni")
|
||||
|
||||
@@ -1518,7 +1519,13 @@ component("base") {
|
||||
"hash/md5_constexpr_internal.h",
|
||||
@@ -1531,7 +1532,13 @@ component("base") {
|
||||
"hash/md5.h",
|
||||
"hash/sha1.h",
|
||||
]
|
||||
- if (is_nacl) {
|
||||
@@ -25,7 +25,7 @@ index 50893c5653a42..75dd03c3df9a8 100644
|
||||
sources += [
|
||||
"hash/md5_nacl.cc",
|
||||
"hash/md5_nacl.h",
|
||||
@@ -1968,6 +1975,12 @@ component("base") {
|
||||
@@ -1982,6 +1989,12 @@ component("base") {
|
||||
defines += [ "COM_INIT_CHECK_HOOK_DISABLED" ]
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ index f680f63cffc5b..9cb615bbc8a5a 100644
|
||||
auto const was_set = is_initialized_check_flag_.test_and_set();
|
||||
is_initialized_check_flag_.clear();
|
||||
diff --git base/hash/md5.h base/hash/md5.h
|
||||
index 215d636fec275..922e88f31b999 100644
|
||||
index 4d358570d81c5..09bf13a965541 100644
|
||||
--- base/hash/md5.h
|
||||
+++ base/hash/md5.h
|
||||
@@ -11,8 +11,9 @@
|
||||
@@ -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 48a9b893d3f9d..a5a2223b2a0fa 100644
|
||||
index f32622d353f1d..def35a3ae1c5c 100644
|
||||
--- base/json/json_reader.cc
|
||||
+++ base/json/json_reader.cc
|
||||
@@ -12,8 +12,9 @@
|
||||
@@ -113,7 +113,7 @@ index 48a9b893d3f9d..a5a2223b2a0fa 100644
|
||||
|
||||
namespace {
|
||||
const char kSecurityJsonParsingTime[] = "Security.JSONParser.ParsingTime";
|
||||
@@ -138,7 +139,7 @@ namespace base {
|
||||
@@ -137,7 +138,7 @@ namespace base {
|
||||
std::optional<Value> JSONReader::Read(std::string_view json,
|
||||
int options,
|
||||
size_t max_depth) {
|
||||
@@ -122,7 +122,7 @@ index 48a9b893d3f9d..a5a2223b2a0fa 100644
|
||||
internal::JSONParser parser(options, max_depth);
|
||||
return parser.Parse(json);
|
||||
#else // BUILDFLAG(IS_NACL)
|
||||
@@ -183,7 +184,7 @@ std::optional<Value::List> JSONReader::ReadList(std::string_view json,
|
||||
@@ -182,7 +183,7 @@ std::optional<Value::List> JSONReader::ReadList(std::string_view json,
|
||||
JSONReader::Result JSONReader::ReadAndReturnValueWithError(
|
||||
std::string_view json,
|
||||
int options) {
|
||||
@@ -131,7 +131,7 @@ index 48a9b893d3f9d..a5a2223b2a0fa 100644
|
||||
internal::JSONParser parser(options);
|
||||
auto value = parser.Parse(json);
|
||||
if (!value) {
|
||||
@@ -224,7 +225,7 @@ bool JSONReader::UsingRust() {
|
||||
@@ -223,7 +224,7 @@ bool JSONReader::UsingRust() {
|
||||
if (!base::FeatureList::GetInstance()) {
|
||||
return false;
|
||||
}
|
||||
@@ -141,7 +141,7 @@ index 48a9b893d3f9d..a5a2223b2a0fa 100644
|
||||
#else
|
||||
return base::FeatureList::IsEnabled(base::features::kUseRustJsonParser);
|
||||
diff --git base/logging.cc base/logging.cc
|
||||
index 22aa478001fb5..e799d8da52589 100644
|
||||
index 26ba1a286e451..99b2ce6feb274 100644
|
||||
--- base/logging.cc
|
||||
+++ base/logging.cc
|
||||
@@ -51,6 +51,7 @@
|
||||
@@ -152,7 +152,7 @@ index 22aa478001fb5..e799d8da52589 100644
|
||||
#include "third_party/abseil-cpp/absl/base/internal/raw_logging.h"
|
||||
#include "third_party/abseil-cpp/absl/cleanup/cleanup.h"
|
||||
|
||||
@@ -538,7 +539,7 @@ bool BaseInitLoggingImpl(const LoggingSettings& settings) {
|
||||
@@ -530,7 +531,7 @@ bool BaseInitLoggingImpl(const LoggingSettings& settings) {
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@@ -1,10 +1,10 @@
|
||||
diff --git base/test/BUILD.gn base/test/BUILD.gn
|
||||
index 5beef03e5fd94..0b12fd3afc8fc 100644
|
||||
index e7f8b523e899a..234e5e0e3a2e3 100644
|
||||
--- base/test/BUILD.gn
|
||||
+++ base/test/BUILD.gn
|
||||
@@ -212,11 +212,6 @@ static_library("test_support") {
|
||||
|
||||
if (enable_base_tracing) {
|
||||
@@ -216,11 +216,6 @@ static_library("test_support") {
|
||||
# that would require special support in gn2bp (AOSP Cronet).
|
||||
if (enable_base_tracing && !is_cronet_build) {
|
||||
public_deps += [ "//third_party/perfetto:perfetto_test_support" ]
|
||||
- public_deps += [ ":test_trace_processor" ]
|
||||
- sources += [
|
||||
@@ -14,7 +14,7 @@ index 5beef03e5fd94..0b12fd3afc8fc 100644
|
||||
deps += [
|
||||
":amalgamated_perfetto_sql_stdlib",
|
||||
":gen_cc_chrome_track_event_descriptor",
|
||||
@@ -611,7 +606,7 @@ if (enable_base_tracing) {
|
||||
@@ -616,7 +611,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 5beef03e5fd94..0b12fd3afc8fc 100644
|
||||
if (is_ios) {
|
||||
_target_type = "ios_framework_bundle"
|
||||
}
|
||||
@@ -620,6 +615,8 @@ if (enable_base_tracing) {
|
||||
@@ -625,6 +620,8 @@ if (enable_base_tracing) {
|
||||
defines = [ "TEST_TRACE_PROCESSOR_IMPL" ]
|
||||
testonly = true
|
||||
sources = [
|
||||
@@ -32,7 +32,7 @@ index 5beef03e5fd94..0b12fd3afc8fc 100644
|
||||
"test_trace_processor_export.h",
|
||||
"test_trace_processor_impl.cc",
|
||||
"test_trace_processor_impl.h",
|
||||
@@ -637,33 +634,6 @@ if (enable_base_tracing) {
|
||||
@@ -642,33 +639,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 f4288459097cd..c48696020414c 100644
|
||||
index 205af82b45ce2..5944a9aa253f2 100644
|
||||
--- content/shell/BUILD.gn
|
||||
+++ content/shell/BUILD.gn
|
||||
@@ -926,7 +926,6 @@ if (is_mac) {
|
||||
@@ -936,7 +936,6 @@ if (is_mac) {
|
||||
# Specify a sensible install_name for static builds. The library is
|
||||
# dlopen()ed so this is not used to resolve the module.
|
||||
ldflags = [ "-Wl,-install_name,@executable_path/../Frameworks/$output_name.framework/$output_name" ]
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git third_party/blink/public/web/web_element.h third_party/blink/public/web/web_element.h
|
||||
index 1547a5ee8178c..e3bc0e82b1c66 100644
|
||||
index 5fef13808a906..57f16de69e1c7 100644
|
||||
--- third_party/blink/public/web/web_element.h
|
||||
+++ third_party/blink/public/web/web_element.h
|
||||
@@ -81,6 +81,9 @@ class BLINK_EXPORT WebElement : public WebNode {
|
||||
@@ -83,6 +83,9 @@ class BLINK_EXPORT WebElement : public WebNode {
|
||||
WebString TextContent() const;
|
||||
WebString TextContentAbridged(unsigned int max_length) const;
|
||||
WebString InnerHTML() const;
|
||||
@@ -10,13 +10,13 @@ index 1547a5ee8178c..e3bc0e82b1c66 100644
|
||||
+ WebString AttributeValue(unsigned index) const;
|
||||
+ unsigned AttributeCount() const;
|
||||
|
||||
// Returns true if the element's computed writing suggestions value is true.
|
||||
// https://html.spec.whatwg.org/#writing-suggestions:computed-writing-suggestions-value
|
||||
void Focus();
|
||||
|
||||
diff --git third_party/blink/renderer/core/exported/web_element.cc third_party/blink/renderer/core/exported/web_element.cc
|
||||
index 8baa5193bfbe0..98c3b930a0498 100644
|
||||
index 2ec717ac9c654..85fb4e44aa4a0 100644
|
||||
--- third_party/blink/renderer/core/exported/web_element.cc
|
||||
+++ third_party/blink/renderer/core/exported/web_element.cc
|
||||
@@ -119,6 +119,24 @@ void WebElement::SetAttribute(const WebString& attr_name,
|
||||
@@ -122,6 +122,24 @@ void WebElement::SetAttribute(const WebString& attr_name,
|
||||
IGNORE_EXCEPTION_FOR_TESTING);
|
||||
}
|
||||
|
||||
|
@@ -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 29740121f1371..97e4e6b0bcd29 100644
|
||||
index ac9fd53f8fc22..3624ea2a10a3e 100644
|
||||
--- content/browser/renderer_host/navigation_request.cc
|
||||
+++ content/browser/renderer_host/navigation_request.cc
|
||||
@@ -8499,10 +8499,22 @@ NavigationRequest::GetOriginForURLLoaderFactoryBeforeResponseWithDebugInfo(
|
||||
@@ -8622,10 +8622,22 @@ NavigationRequest::GetOriginForURLLoaderFactoryBeforeResponseWithDebugInfo(
|
||||
bool use_opaque_origin =
|
||||
(sandbox_flags & network::mojom::WebSandboxFlags::kOrigin) ==
|
||||
network::mojom::WebSandboxFlags::kOrigin;
|
||||
@@ -47,7 +47,7 @@ index 29740121f1371..97e4e6b0bcd29 100644
|
||||
}
|
||||
|
||||
return origin_and_debug_info;
|
||||
@@ -8610,11 +8622,20 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() {
|
||||
@@ -8733,11 +8745,20 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() {
|
||||
DetermineInitiatorRelationship(initiator_rfh,
|
||||
frame_tree_node_->current_frame_host()));
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git build/config/compiler/BUILD.gn build/config/compiler/BUILD.gn
|
||||
index e7a60d56b5425..e9a4a4eb91ce8 100644
|
||||
index e579cc9a9d1fd..73f42525d0071 100644
|
||||
--- build/config/compiler/BUILD.gn
|
||||
+++ build/config/compiler/BUILD.gn
|
||||
@@ -131,6 +131,9 @@ declare_args() {
|
||||
@@ -12,7 +12,7 @@ index e7a60d56b5425..e9a4a4eb91ce8 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,
|
||||
@@ -2326,6 +2329,7 @@ config("export_dynamic") {
|
||||
@@ -2387,6 +2390,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 e7a60d56b5425..e9a4a4eb91ce8 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`.
|
||||
@@ -2344,6 +2348,7 @@ config("thin_archive") {
|
||||
@@ -2405,6 +2409,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 5186cdf0bcf3b..deb65db4ed097 100644
|
||||
index ad39862fdd9a5..c0f75004f4fc4 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 5186cdf0bcf3b..deb65db4ed097 100644
|
||||
import("//chrome/browser/buildflags.gni")
|
||||
import("//chrome/browser/downgrade/buildflags.gni")
|
||||
import("//chrome/browser/request_header_integrity/buildflags.gni")
|
||||
@@ -1876,6 +1877,7 @@ static_library("browser") {
|
||||
@@ -1879,6 +1880,7 @@ static_library("browser") {
|
||||
"//build/config/compiler:compiler_buildflags",
|
||||
"//build/config/linux/dbus:buildflags",
|
||||
"//cc",
|
||||
@@ -18,7 +18,7 @@ index 5186cdf0bcf3b..deb65db4ed097 100644
|
||||
"//chrome:extra_resources",
|
||||
"//chrome:resources",
|
||||
"//chrome:strings",
|
||||
@@ -2575,6 +2577,10 @@ static_library("browser") {
|
||||
@@ -2583,6 +2585,10 @@ static_library("browser") {
|
||||
sources += [ "net/net_error_diagnostics_dialog_stub.cc" ]
|
||||
}
|
||||
|
||||
|
@@ -13,10 +13,10 @@ index 7603c2662b8dc..9a38d816bdc40 100644
|
||||
return false;
|
||||
}
|
||||
diff --git chrome/browser/devtools/devtools_window.cc chrome/browser/devtools/devtools_window.cc
|
||||
index 8e0717f34f37f..df852d4b2e69f 100644
|
||||
index 720839ed7b796..0d14fe57d841d 100644
|
||||
--- chrome/browser/devtools/devtools_window.cc
|
||||
+++ chrome/browser/devtools/devtools_window.cc
|
||||
@@ -38,6 +38,7 @@
|
||||
@@ -39,6 +39,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"
|
||||
@@ -24,7 +24,7 @@ index 8e0717f34f37f..df852d4b2e69f 100644
|
||||
#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(
|
||||
@@ -1206,6 +1207,13 @@ DevToolsWindow* DevToolsWindow::Create(
|
||||
if (!browser || !browser->is_type_normal()) {
|
||||
can_dock = false;
|
||||
}
|
||||
@@ -38,7 +38,7 @@ index 8e0717f34f37f..df852d4b2e69f 100644
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1646,7 +1654,9 @@ void DevToolsWindow::OpenInNewTab(const GURL& url) {
|
||||
@@ -1647,7 +1655,9 @@ void DevToolsWindow::OpenInNewTab(const GURL& url) {
|
||||
/*navigation_handle_callback=*/{})) {
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
NOTIMPLEMENTED();
|
||||
@@ -49,7 +49,7 @@ index 8e0717f34f37f..df852d4b2e69f 100644
|
||||
chrome::ScopedTabbedBrowserDisplayer displayer(profile_);
|
||||
chrome::AddSelectedTabWithURL(displayer.browser(), fixed_url,
|
||||
ui::PAGE_TRANSITION_LINK);
|
||||
@@ -1827,12 +1837,26 @@ void DevToolsWindow::CreateDevToolsBrowser() {
|
||||
@@ -1828,12 +1838,26 @@ void DevToolsWindow::CreateDevToolsBrowser() {
|
||||
Browser::CreationStatus::kOk) {
|
||||
return;
|
||||
}
|
||||
@@ -83,7 +83,7 @@ index 8e0717f34f37f..df852d4b2e69f 100644
|
||||
OverrideAndSyncDevToolsRendererPrefs();
|
||||
}
|
||||
diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn
|
||||
index 51c55cb054ae7..df9aa9bc45a67 100644
|
||||
index 93096ad92c1a3..9f6ad01bb1cc6 100644
|
||||
--- chrome/browser/ui/BUILD.gn
|
||||
+++ chrome/browser/ui/BUILD.gn
|
||||
@@ -7,6 +7,7 @@ import("//build/config/compiler/compiler.gni")
|
||||
@@ -94,7 +94,7 @@ index 51c55cb054ae7..df9aa9bc45a67 100644
|
||||
import("//chrome/browser/buildflags.gni")
|
||||
import("//chrome/common/features.gni")
|
||||
import("//chromeos/ash/components/assistant/assistant.gni")
|
||||
@@ -302,6 +303,10 @@ static_library("ui") {
|
||||
@@ -303,6 +304,10 @@ static_library("ui") {
|
||||
"//build/config/compiler:wexit_time_destructors",
|
||||
]
|
||||
|
||||
@@ -105,7 +105,7 @@ index 51c55cb054ae7..df9aa9bc45a67 100644
|
||||
public_deps = [
|
||||
# WARNING WARNING WARNING
|
||||
# New dependencies outside of //chrome/browser should be added to
|
||||
@@ -329,6 +334,7 @@ static_library("ui") {
|
||||
@@ -330,6 +335,7 @@ static_library("ui") {
|
||||
"//build/config/chromebox_for_meetings:buildflags",
|
||||
"//build/config/linux/dbus:buildflags",
|
||||
"//cc/paint",
|
||||
@@ -113,7 +113,7 @@ index 51c55cb054ae7..df9aa9bc45a67 100644
|
||||
"//chrome:resources",
|
||||
"//chrome:strings",
|
||||
"//chrome/app:chrome_dll_resources",
|
||||
@@ -701,6 +707,13 @@ static_library("ui") {
|
||||
@@ -707,6 +713,13 @@ static_library("ui") {
|
||||
deps += [ "//components/plus_addresses/resources:vector_icons" ]
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ index 51c55cb054ae7..df9aa9bc45a67 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.
|
||||
@@ -5501,6 +5514,7 @@ static_library("ui") {
|
||||
@@ -5539,6 +5552,7 @@ static_library("ui") {
|
||||
if (enable_printing) {
|
||||
deps += [
|
||||
"//components/printing/browser",
|
||||
@@ -136,10 +136,10 @@ index 51c55cb054ae7..df9aa9bc45a67 100644
|
||||
]
|
||||
}
|
||||
diff --git chrome/browser/ui/browser.cc chrome/browser/ui/browser.cc
|
||||
index d45f8f1713c87..7d69f3d8bd4cc 100644
|
||||
index 435235c067f70..63d2b0381c277 100644
|
||||
--- chrome/browser/ui/browser.cc
|
||||
+++ chrome/browser/ui/browser.cc
|
||||
@@ -272,6 +272,25 @@
|
||||
@@ -273,6 +273,25 @@
|
||||
#include "components/captive_portal/content/captive_portal_tab_helper.h"
|
||||
#endif
|
||||
|
||||
@@ -165,7 +165,7 @@ index d45f8f1713c87..7d69f3d8bd4cc 100644
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
#include "chrome/browser/extensions/extension_browser_window_helper.h"
|
||||
#endif
|
||||
@@ -571,6 +590,10 @@ Browser::Browser(const CreateParams& params)
|
||||
@@ -572,6 +591,10 @@ Browser::Browser(const CreateParams& params)
|
||||
type_(params.type),
|
||||
profile_(params.profile),
|
||||
window_(nullptr),
|
||||
@@ -176,7 +176,7 @@ index d45f8f1713c87..7d69f3d8bd4cc 100644
|
||||
tab_strip_model_delegate_(
|
||||
std::make_unique<chrome::BrowserTabStripModelDelegate>(this)),
|
||||
tab_strip_model_(std::make_unique<TabStripModel>(
|
||||
@@ -818,6 +841,12 @@ Browser::~Browser() {
|
||||
@@ -819,6 +842,12 @@ Browser::~Browser() {
|
||||
if (select_file_dialog_.get()) {
|
||||
select_file_dialog_->ListenerDestroyed();
|
||||
}
|
||||
@@ -189,7 +189,7 @@ index d45f8f1713c87..7d69f3d8bd4cc 100644
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@@ -1275,6 +1304,10 @@ BrowserWindowInterface::Type Browser::GetType() const {
|
||||
@@ -1284,6 +1313,10 @@ BrowserWindowInterface::Type Browser::GetType() const {
|
||||
return type_;
|
||||
}
|
||||
|
||||
@@ -200,7 +200,7 @@ index d45f8f1713c87..7d69f3d8bd4cc 100644
|
||||
BrowserUserEducationInterface* Browser::GetUserEducationInterface() {
|
||||
return window();
|
||||
}
|
||||
@@ -1436,6 +1469,8 @@ void Browser::WindowFullscreenStateChanged() {
|
||||
@@ -1466,6 +1499,8 @@ void Browser::WindowFullscreenStateChanged() {
|
||||
->WindowFullscreenStateChanged();
|
||||
command_controller_->FullscreenStateChanged();
|
||||
UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TOGGLE_FULLSCREEN);
|
||||
@@ -209,7 +209,7 @@ index d45f8f1713c87..7d69f3d8bd4cc 100644
|
||||
}
|
||||
|
||||
void Browser::FullscreenTopUIStateChanged() {
|
||||
@@ -1807,6 +1842,15 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent(
|
||||
@@ -1837,6 +1872,15 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent(
|
||||
return content::KeyboardEventProcessingResult::HANDLED;
|
||||
}
|
||||
|
||||
@@ -225,7 +225,7 @@ index d45f8f1713c87..7d69f3d8bd4cc 100644
|
||||
return window()->PreHandleKeyboardEvent(event);
|
||||
}
|
||||
|
||||
@@ -1814,8 +1858,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source,
|
||||
@@ -1844,8 +1888,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source,
|
||||
const NativeWebKeyboardEvent& event) {
|
||||
DevToolsWindow* devtools_window =
|
||||
DevToolsWindow::GetInstanceForInspectedWebContents(source);
|
||||
@@ -246,7 +246,7 @@ index d45f8f1713c87..7d69f3d8bd4cc 100644
|
||||
}
|
||||
|
||||
bool Browser::TabsNeedBeforeUnloadFired() const {
|
||||
@@ -1910,9 +1964,14 @@ bool Browser::IsBackForwardCacheSupported(content::WebContents& web_contents) {
|
||||
@@ -1940,9 +1994,14 @@ bool Browser::IsBackForwardCacheSupported(content::WebContents& web_contents) {
|
||||
content::PreloadingEligibility Browser::IsPrerender2Supported(
|
||||
content::WebContents& web_contents,
|
||||
content::PreloadingTriggerType trigger_type) {
|
||||
@@ -261,7 +261,7 @@ index d45f8f1713c87..7d69f3d8bd4cc 100644
|
||||
}
|
||||
|
||||
bool Browser::ShouldShowStaleContentOnEviction(content::WebContents* source) {
|
||||
@@ -1975,6 +2034,14 @@ WebContents* Browser::OpenURLFromTab(
|
||||
@@ -2005,6 +2064,14 @@ WebContents* Browser::OpenURLFromTab(
|
||||
std::move(navigation_handle_callback));
|
||||
}
|
||||
|
||||
@@ -276,7 +276,7 @@ index d45f8f1713c87..7d69f3d8bd4cc 100644
|
||||
NavigateParams nav_params(this, params.url, params.transition);
|
||||
nav_params.FillNavigateParamsFromOpenURLParams(params);
|
||||
nav_params.source_contents = source;
|
||||
@@ -2148,6 +2215,8 @@ void Browser::LoadingStateChanged(WebContents* source,
|
||||
@@ -2178,6 +2245,8 @@ void Browser::LoadingStateChanged(WebContents* source,
|
||||
bool should_show_loading_ui) {
|
||||
ScheduleUIUpdate(source, content::INVALIDATE_TYPE_LOAD);
|
||||
UpdateWindowForLoadingStateChanged(source, should_show_loading_ui);
|
||||
@@ -285,7 +285,21 @@ index d45f8f1713c87..7d69f3d8bd4cc 100644
|
||||
}
|
||||
|
||||
void Browser::CloseContents(WebContents* source) {
|
||||
@@ -2177,6 +2246,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) {
|
||||
@@ -2187,6 +2256,13 @@ void Browser::CloseContents(WebContents* source) {
|
||||
}
|
||||
|
||||
void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) {
|
||||
+#if BUILDFLAG(ENABLE_CEF)
|
||||
+ if (cef_browser_delegate_ &&
|
||||
+ cef_browser_delegate_->SetContentsBoundsEx(source, bounds)) {
|
||||
+ return;
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
if (is_type_normal()) {
|
||||
return;
|
||||
}
|
||||
@@ -2207,6 +2283,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) {
|
||||
}
|
||||
|
||||
void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
|
||||
@@ -294,7 +308,7 @@ index d45f8f1713c87..7d69f3d8bd4cc 100644
|
||||
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) {
|
||||
@@ -2220,6 +2298,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -312,7 +326,7 @@ index d45f8f1713c87..7d69f3d8bd4cc 100644
|
||||
void Browser::ContentsMouseEvent(WebContents* source, const ui::Event& event) {
|
||||
const ui::EventType type = event.type();
|
||||
const bool exited = type == ui::EventType::kMouseExited;
|
||||
@@ -2223,9 +2305,23 @@ void Browser::ContentsZoomChange(bool zoom_in) {
|
||||
@@ -2253,9 +2342,23 @@ void Browser::ContentsZoomChange(bool zoom_in) {
|
||||
}
|
||||
|
||||
bool Browser::TakeFocus(content::WebContents* source, bool reverse) {
|
||||
@@ -336,7 +350,7 @@ index d45f8f1713c87..7d69f3d8bd4cc 100644
|
||||
void Browser::BeforeUnloadFired(WebContents* web_contents,
|
||||
bool proceed,
|
||||
bool* proceed_to_fire_unload) {
|
||||
@@ -2338,12 +2434,24 @@ void Browser::WebContentsCreated(WebContents* source_contents,
|
||||
@@ -2372,12 +2475,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);
|
||||
@@ -361,7 +375,7 @@ index d45f8f1713c87..7d69f3d8bd4cc 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();
|
||||
@@ -2356,6 +2464,13 @@ void Browser::RendererUnresponsive(
|
||||
@@ -2390,6 +2505,13 @@ void Browser::RendererUnresponsive(
|
||||
void Browser::RendererResponsive(
|
||||
WebContents* source,
|
||||
content::RenderWidgetHost* render_widget_host) {
|
||||
@@ -375,7 +389,7 @@ index d45f8f1713c87..7d69f3d8bd4cc 100644
|
||||
RenderWidgetHostView* view = render_widget_host->GetView();
|
||||
if (view && !render_widget_host->GetView()->IsHTMLFormPopup()) {
|
||||
TabDialogs::FromWebContents(source)->HideHungRendererDialog(
|
||||
@@ -2365,6 +2480,15 @@ void Browser::RendererResponsive(
|
||||
@@ -2399,6 +2521,15 @@ void Browser::RendererResponsive(
|
||||
|
||||
content::JavaScriptDialogManager* Browser::GetJavaScriptDialogManager(
|
||||
WebContents* source) {
|
||||
@@ -391,7 +405,7 @@ index d45f8f1713c87..7d69f3d8bd4cc 100644
|
||||
return javascript_dialogs::TabModalDialogManager::FromWebContents(source);
|
||||
}
|
||||
|
||||
@@ -2400,6 +2524,11 @@ void Browser::DraggableRegionsChanged(
|
||||
@@ -2434,6 +2565,11 @@ void Browser::DraggableRegionsChanged(
|
||||
if (app_controller_) {
|
||||
app_controller_->DraggableRegionsChanged(regions, contents);
|
||||
}
|
||||
@@ -403,7 +417,7 @@ index d45f8f1713c87..7d69f3d8bd4cc 100644
|
||||
}
|
||||
|
||||
std::vector<blink::mojom::RelatedApplicationPtr>
|
||||
@@ -2514,11 +2643,15 @@ void Browser::EnterFullscreenModeForTab(
|
||||
@@ -2548,11 +2684,15 @@ void Browser::EnterFullscreenModeForTab(
|
||||
const blink::mojom::FullscreenOptions& options) {
|
||||
exclusive_access_manager_->fullscreen_controller()->EnterFullscreenModeForTab(
|
||||
requesting_frame, options.display_id);
|
||||
@@ -419,7 +433,7 @@ index d45f8f1713c87..7d69f3d8bd4cc 100644
|
||||
}
|
||||
|
||||
bool Browser::IsFullscreenForTabOrPending(const WebContents* web_contents) {
|
||||
@@ -2728,6 +2861,16 @@ void Browser::RequestMediaAccessPermission(
|
||||
@@ -2762,6 +2902,16 @@ void Browser::RequestMediaAccessPermission(
|
||||
content::WebContents* web_contents,
|
||||
const content::MediaStreamRequest& request,
|
||||
content::MediaResponseCallback callback) {
|
||||
@@ -436,7 +450,7 @@ index d45f8f1713c87..7d69f3d8bd4cc 100644
|
||||
const extensions::Extension* extension =
|
||||
GetExtensionForOrigin(profile_, request.security_origin);
|
||||
MediaCaptureDevicesDispatcher::GetInstance()->ProcessMediaAccessRequest(
|
||||
@@ -3313,9 +3456,11 @@ void Browser::RemoveScheduledUpdatesFor(WebContents* contents) {
|
||||
@@ -3352,9 +3502,11 @@ void Browser::RemoveScheduledUpdatesFor(WebContents* contents) {
|
||||
// Browser, Getters for UI (private):
|
||||
|
||||
std::vector<StatusBubble*> Browser::GetStatusBubbles() {
|
||||
@@ -449,7 +463,7 @@ index d45f8f1713c87..7d69f3d8bd4cc 100644
|
||||
}
|
||||
|
||||
// We hide the status bar for web apps windows as this matches native
|
||||
@@ -3323,6 +3468,12 @@ std::vector<StatusBubble*> Browser::GetStatusBubbles() {
|
||||
@@ -3362,6 +3514,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()) {
|
||||
@@ -462,7 +476,7 @@ index d45f8f1713c87..7d69f3d8bd4cc 100644
|
||||
return {};
|
||||
}
|
||||
|
||||
@@ -3476,6 +3627,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) {
|
||||
@@ -3515,6 +3673,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) {
|
||||
BookmarkTabHelper::FromWebContents(web_contents)->RemoveObserver(this);
|
||||
web_contents_collection_.StopObserving(web_contents);
|
||||
}
|
||||
@@ -471,7 +485,7 @@ index d45f8f1713c87..7d69f3d8bd4cc 100644
|
||||
}
|
||||
|
||||
void Browser::TabDetachedAtImpl(content::WebContents* contents,
|
||||
@@ -3637,6 +3790,14 @@ bool Browser::PictureInPictureBrowserSupportsWindowFeature(
|
||||
@@ -3676,6 +3836,14 @@ bool Browser::PictureInPictureBrowserSupportsWindowFeature(
|
||||
|
||||
bool Browser::SupportsWindowFeatureImpl(WindowFeature feature,
|
||||
bool check_can_support) const {
|
||||
@@ -487,7 +501,7 @@ index d45f8f1713c87..7d69f3d8bd4cc 100644
|
||||
case TYPE_NORMAL:
|
||||
return NormalBrowserSupportsWindowFeature(feature, check_can_support);
|
||||
diff --git chrome/browser/ui/browser.h chrome/browser/ui/browser.h
|
||||
index ce1e404e45a60..7193496de6b31 100644
|
||||
index c4cea0b6e8c4c..2beda8338cb08 100644
|
||||
--- chrome/browser/ui/browser.h
|
||||
+++ chrome/browser/ui/browser.h
|
||||
@@ -24,6 +24,7 @@
|
||||
@@ -552,7 +566,7 @@ index ce1e404e45a60..7193496de6b31 100644
|
||||
// Get the FindBarController for this browser, creating it if it does not
|
||||
// yet exist.
|
||||
FindBarController* GetFindBarController();
|
||||
@@ -889,6 +916,7 @@ class Browser : public TabStripModelObserver,
|
||||
@@ -891,6 +918,7 @@ class Browser : public TabStripModelObserver,
|
||||
ImmersiveModeController* GetImmersiveModeController() override;
|
||||
BrowserActions* GetActions() override;
|
||||
Type GetType() const override;
|
||||
@@ -560,7 +574,7 @@ index ce1e404e45a60..7193496de6b31 100644
|
||||
BrowserUserEducationInterface* GetUserEducationInterface() override;
|
||||
web_app::AppBrowserController* GetAppBrowserController() override;
|
||||
std::vector<tabs::TabInterface*> GetAllTabInterfaces() override;
|
||||
@@ -991,10 +1019,18 @@ class Browser : public TabStripModelObserver,
|
||||
@@ -1012,10 +1040,18 @@ class Browser : public TabStripModelObserver,
|
||||
void SetContentsBounds(content::WebContents* source,
|
||||
const gfx::Rect& bounds) override;
|
||||
void UpdateTargetURL(content::WebContents* source, const GURL& url) override;
|
||||
@@ -579,7 +593,7 @@ index ce1e404e45a60..7193496de6b31 100644
|
||||
void BeforeUnloadFired(content::WebContents* source,
|
||||
bool proceed,
|
||||
bool* proceed_to_fire_unload) override;
|
||||
@@ -1341,6 +1377,10 @@ class Browser : public TabStripModelObserver,
|
||||
@@ -1362,6 +1398,10 @@ class Browser : public TabStripModelObserver,
|
||||
// The active state of this browser.
|
||||
bool is_active_ = false;
|
||||
|
||||
@@ -590,7 +604,7 @@ index ce1e404e45a60..7193496de6b31 100644
|
||||
std::unique_ptr<TabStripModelDelegate> const tab_strip_model_delegate_;
|
||||
std::unique_ptr<TabStripModel> const tab_strip_model_;
|
||||
|
||||
@@ -1407,6 +1447,8 @@ class Browser : public TabStripModelObserver,
|
||||
@@ -1428,6 +1468,8 @@ class Browser : public TabStripModelObserver,
|
||||
const std::string initial_workspace_;
|
||||
bool initial_visible_on_all_workspaces_state_;
|
||||
|
||||
@@ -600,10 +614,10 @@ index ce1e404e45a60..7193496de6b31 100644
|
||||
|
||||
UnloadController unload_controller_;
|
||||
diff --git chrome/browser/ui/browser_navigator.cc chrome/browser/ui/browser_navigator.cc
|
||||
index cefd4bc59943a..69425ab604ddb 100644
|
||||
index 474e4ba66d7af..ca68cd989693e 100644
|
||||
--- chrome/browser/ui/browser_navigator.cc
|
||||
+++ chrome/browser/ui/browser_navigator.cc
|
||||
@@ -260,6 +260,10 @@ std::tuple<Browser*, int> GetBrowserAndTabForDisposition(
|
||||
@@ -255,6 +255,10 @@ std::tuple<Browser*, int> GetBrowserAndTabForDisposition(
|
||||
|
||||
browser_params.pip_options = pip_options;
|
||||
|
||||
@@ -614,7 +628,7 @@ index cefd4bc59943a..69425ab604ddb 100644
|
||||
const BrowserWindow* const browser_window = params.browser->window();
|
||||
const gfx::NativeWindow native_window =
|
||||
browser_window ? browser_window->GetNativeWindow()
|
||||
@@ -547,7 +551,17 @@ std::unique_ptr<content::WebContents> CreateTargetContents(
|
||||
@@ -543,7 +547,17 @@ std::unique_ptr<content::WebContents> CreateTargetContents(
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -670,10 +684,10 @@ 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 274b403d01d91..4dd3239bf5f48 100644
|
||||
index db33c12d1d71b..af0c2f5203e0d 100644
|
||||
--- chrome/browser/ui/browser_window/browser_window_features.cc
|
||||
+++ chrome/browser/ui/browser_window/browser_window_features.cc
|
||||
@@ -92,6 +92,15 @@ BrowserWindowFeatures::CreateBrowserWindowFeatures() {
|
||||
@@ -99,6 +99,15 @@ BrowserWindowFeatures::CreateBrowserWindowFeatures() {
|
||||
|
||||
BrowserWindowFeatures::~BrowserWindowFeatures() = default;
|
||||
|
||||
@@ -689,7 +703,7 @@ index 274b403d01d91..4dd3239bf5f48 100644
|
||||
// static
|
||||
void BrowserWindowFeatures::ReplaceBrowserWindowFeaturesForTesting(
|
||||
BrowserWindowFeaturesFactory factory) {
|
||||
@@ -168,10 +177,12 @@ void BrowserWindowFeatures::Init(BrowserWindowInterface* browser) {
|
||||
@@ -189,10 +198,12 @@ void BrowserWindowFeatures::Init(BrowserWindowInterface* browser) {
|
||||
}
|
||||
|
||||
void BrowserWindowFeatures::InitPostWindowConstruction(Browser* browser) {
|
||||
@@ -703,7 +717,7 @@ index 274b403d01d91..4dd3239bf5f48 100644
|
||||
if (IsChromeLabsEnabled()) {
|
||||
chrome_labs_coordinator_ =
|
||||
std::make_unique<ChromeLabsCoordinator>(browser);
|
||||
@@ -213,7 +224,7 @@ void BrowserWindowFeatures::InitPostWindowConstruction(Browser* browser) {
|
||||
@@ -234,7 +245,7 @@ void BrowserWindowFeatures::InitPostWindowConstruction(Browser* browser) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -712,7 +726,7 @@ index 274b403d01d91..4dd3239bf5f48 100644
|
||||
base::FeatureList::IsEnabled(toast_features::kToastFramework)) {
|
||||
toast_service_ = std::make_unique<ToastService>(browser);
|
||||
}
|
||||
@@ -251,10 +262,12 @@ void BrowserWindowFeatures::InitPostBrowserViewConstruction(
|
||||
@@ -267,10 +278,12 @@ void BrowserWindowFeatures::InitPostBrowserViewConstruction(
|
||||
browser_view->browser(),
|
||||
side_panel_coordinator_->GetWindowRegistry());
|
||||
|
||||
@@ -727,10 +741,10 @@ index 274b403d01d91..4dd3239bf5f48 100644
|
||||
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
|
||||
index 0da8c64756ee2..2566fff471c8e 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 {
|
||||
@@ -90,6 +90,8 @@ class BrowserWindowFeatures {
|
||||
static std::unique_ptr<BrowserWindowFeatures> CreateBrowserWindowFeatures();
|
||||
virtual ~BrowserWindowFeatures();
|
||||
|
||||
@@ -740,10 +754,10 @@ index a318b2507f3ca..04bed96bbe382 100644
|
||||
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
|
||||
index d1862cd7b90b2..fcaa4b4ac3ade 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 {
|
||||
@@ -211,6 +211,10 @@ class BrowserWindowInterface : public content::PageNavigator {
|
||||
};
|
||||
virtual Type GetType() const = 0;
|
||||
|
||||
@@ -755,7 +769,7 @@ index f2b51e7923e96..644d0655ea6c9 100644
|
||||
// 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
|
||||
index cd93e66f918eb..dda28d11241d7 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)
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git components/content_settings/renderer/content_settings_agent_impl.cc components/content_settings/renderer/content_settings_agent_impl.cc
|
||||
index 0897668803c2e..12cdbd7642ffd 100644
|
||||
index 2394aeb4fb33e..7f27b04a0dc50 100644
|
||||
--- components/content_settings/renderer/content_settings_agent_impl.cc
|
||||
+++ components/content_settings/renderer/content_settings_agent_impl.cc
|
||||
@@ -146,7 +146,7 @@ ContentSetting GetContentSettingFromRules(
|
||||
|
@@ -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 60543740c1b66..0f76b20df356a 100644
|
||||
index 49c051ea6eabc..b98a2bfc2d131 100644
|
||||
--- chrome/browser/renderer_context_menu/render_view_context_menu.cc
|
||||
+++ chrome/browser/renderer_context_menu/render_view_context_menu.cc
|
||||
@@ -351,6 +351,18 @@ base::OnceCallback<void(RenderViewContextMenu*)>* GetMenuShownCallback() {
|
||||
@@ -352,6 +352,18 @@ base::OnceCallback<void(RenderViewContextMenu*)>* GetMenuShownCallback() {
|
||||
return callback.get();
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ index 60543740c1b66..0f76b20df356a 100644
|
||||
enum class UmaEnumIdLookupType {
|
||||
GeneralEnumId,
|
||||
ContextSpecificEnumId,
|
||||
@@ -623,6 +635,10 @@ int FindUMAEnumValueForCommand(int id, UmaEnumIdLookupType type) {
|
||||
@@ -624,6 +636,10 @@ int FindUMAEnumValueForCommand(int id, UmaEnumIdLookupType type) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ index 60543740c1b66..0f76b20df356a 100644
|
||||
id = CollapseCommandsForUMA(id);
|
||||
const auto& map = GetIdcToUmaMap(type);
|
||||
auto it = map.find(id);
|
||||
@@ -894,6 +910,14 @@ RenderViewContextMenu::RenderViewContextMenu(
|
||||
@@ -895,6 +911,14 @@ RenderViewContextMenu::RenderViewContextMenu(
|
||||
: nullptr;
|
||||
#endif // BUILDFLAG(IS_CHROMEOS)
|
||||
|
||||
@@ -47,7 +47,7 @@ index 60543740c1b66..0f76b20df356a 100644
|
||||
observers_.AddObserver(&autofill_context_menu_manager_);
|
||||
}
|
||||
|
||||
@@ -1352,6 +1376,12 @@ void RenderViewContextMenu::InitMenu() {
|
||||
@@ -1353,6 +1377,12 @@ void RenderViewContextMenu::InitMenu() {
|
||||
autofill_client->HideAutofillSuggestions(
|
||||
autofill::SuggestionHidingReason::kContextMenuOpened);
|
||||
}
|
||||
@@ -60,7 +60,7 @@ index 60543740c1b66..0f76b20df356a 100644
|
||||
}
|
||||
|
||||
Profile* RenderViewContextMenu::GetProfile() const {
|
||||
@@ -3643,6 +3673,26 @@ void RenderViewContextMenu::RemoveObserverForTesting(
|
||||
@@ -3649,6 +3679,26 @@ void RenderViewContextMenu::RemoveObserverForTesting(
|
||||
observers_.RemoveObserver(observer);
|
||||
}
|
||||
|
||||
|
@@ -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 8b3ce4e53ef25..7fcec86f074e3 100644
|
||||
index 8c06a19a64e5d..2b9429f7b2bab 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 @@
|
||||
@@ -57,10 +57,27 @@ index 8b3ce4e53ef25..7fcec86f074e3 100644
|
||||
}
|
||||
|
||||
diff --git chrome/browser/ui/views/javascript_tab_modal_dialog_view_views.cc chrome/browser/ui/views/javascript_tab_modal_dialog_view_views.cc
|
||||
index 3c56e658d05c4..980caca1469bd 100644
|
||||
index e0c7c6df6f415..106cf8d8b998a 100644
|
||||
--- chrome/browser/ui/views/javascript_tab_modal_dialog_view_views.cc
|
||||
+++ chrome/browser/ui/views/javascript_tab_modal_dialog_view_views.cc
|
||||
@@ -79,10 +79,13 @@ JavaScriptTabModalDialogViewViews::JavaScriptTabModalDialogViewViews(
|
||||
@@ -49,9 +49,13 @@ views::View* JavaScriptTabModalDialogViewViews::GetInitiallyFocusedView() {
|
||||
}
|
||||
|
||||
void JavaScriptTabModalDialogViewViews::AddedToWidget() {
|
||||
- auto* bubble_frame_view = static_cast<views::BubbleFrameView*>(
|
||||
- GetWidget()->non_client_view()->frame_view());
|
||||
- bubble_frame_view->SetTitleView(CreateTitleOriginLabel(GetWindowTitle()));
|
||||
+ auto* frame_view = GetWidget()->non_client_view()->frame_view();
|
||||
+ // With CEF OSR this may be a NativeFrameView, in which case HasWindowTitle()
|
||||
+ // will return false.
|
||||
+ if (frame_view->HasWindowTitle()) {
|
||||
+ auto* bubble_frame_view = static_cast<views::BubbleFrameView*>(frame_view);
|
||||
+ bubble_frame_view->SetTitleView(CreateTitleOriginLabel(GetWindowTitle()));
|
||||
+ }
|
||||
if (!message_text_.empty()) {
|
||||
GetWidget()->GetRootView()->GetViewAccessibility().SetDescription(
|
||||
message_text_);
|
||||
@@ -79,10 +83,13 @@ JavaScriptTabModalDialogViewViews::JavaScriptTabModalDialogViewViews(
|
||||
default_prompt_text_(default_prompt_text),
|
||||
dialog_callback_(std::move(dialog_callback)),
|
||||
dialog_force_closed_callback_(std::move(dialog_force_closed_callback)) {
|
||||
|
@@ -12,7 +12,7 @@ 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 8251a54246126..ebf7da47ed642 100644
|
||||
index 6e91ffc4b8bfe..a1616f77c87ae 100644
|
||||
--- components/constrained_window/constrained_window_views.cc
|
||||
+++ components/constrained_window/constrained_window_views.cc
|
||||
@@ -103,10 +103,17 @@ class ModalDialogHostObserverViews : public ModalDialogHostObserver {
|
||||
@@ -121,7 +121,28 @@ index 8251a54246126..ebf7da47ed642 100644
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -304,8 +299,12 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog,
|
||||
@@ -197,11 +192,18 @@ class BrowserModalHelper {
|
||||
public:
|
||||
static views::Widget* Show(std::unique_ptr<ui::DialogModel> dialog_model,
|
||||
gfx::NativeWindow parent) {
|
||||
+ gfx::NativeView parent_view =
|
||||
+ parent ? CurrentBrowserModalClient()->GetDialogHostView(parent) :
|
||||
+ gfx::NativeView();
|
||||
+ // Use with CEF windowless rendering.
|
||||
+ gfx::AcceleratedWidget parent_widget =
|
||||
+ parent ? CurrentBrowserModalClient()->GetModalDialogHost(parent)->
|
||||
+ GetAcceleratedWidget() : gfx::kNullAcceleratedWidget;
|
||||
+
|
||||
// TODO(crbug.com/41493925): Remove will_use_custom_frame once native frame
|
||||
// dialogs support autosize.
|
||||
bool will_use_custom_frame = views::DialogDelegate::CanSupportCustomFrame(
|
||||
- parent ? CurrentBrowserModalClient()->GetDialogHostView(parent)
|
||||
- : gfx::NativeView());
|
||||
+ parent_view, parent_widget);
|
||||
auto dialog = views::BubbleDialogModelHost::CreateModal(
|
||||
std::move(dialog_model), ui::mojom::ModalType::kWindow,
|
||||
will_use_custom_frame);
|
||||
@@ -326,8 +328,12 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog,
|
||||
gfx::NativeView parent_view =
|
||||
parent ? CurrentBrowserModalClient()->GetDialogHostView(parent)
|
||||
: gfx::NativeView();
|
||||
@@ -135,7 +156,7 @@ index 8251a54246126..ebf7da47ed642 100644
|
||||
widget->SetNativeWindowProperty(
|
||||
views::kWidgetIdentifierKey,
|
||||
const_cast<void*>(kConstrainedWindowWidgetIdentifier));
|
||||
@@ -322,8 +321,7 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog,
|
||||
@@ -344,8 +350,7 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog,
|
||||
return widget;
|
||||
|
||||
ModalDialogHost* host =
|
||||
@@ -145,27 +166,6 @@ index 8251a54246126..ebf7da47ed642 100644
|
||||
if (host) {
|
||||
DCHECK_EQ(parent_view, host->GetHostView());
|
||||
std::unique_ptr<ModalDialogHostObserver> observer =
|
||||
@@ -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) :
|
||||
+ gfx::NativeView();
|
||||
+ // Use with CEF windowless rendering.
|
||||
+ gfx::AcceleratedWidget parent_widget =
|
||||
+ parent ? CurrentBrowserModalClient()->GetModalDialogHost(parent)->
|
||||
+ GetAcceleratedWidget() : gfx::kNullAcceleratedWidget;
|
||||
+
|
||||
// TODO(crbug.com/41493925): Remove will_use_custom_frame once native frame
|
||||
// dialogs support autosize.
|
||||
bool will_use_custom_frame = views::DialogDelegate::CanSupportCustomFrame(
|
||||
- parent ? CurrentBrowserModalClient()->GetDialogHostView(parent)
|
||||
- : gfx::NativeView());
|
||||
+ parent_view, parent_widget);
|
||||
auto dialog = views::BubbleDialogModelHost::CreateModal(
|
||||
std::move(dialog_model), ui::mojom::ModalType::kWindow,
|
||||
will_use_custom_frame);
|
||||
diff --git components/constrained_window/native_web_contents_modal_dialog_manager_views.cc components/constrained_window/native_web_contents_modal_dialog_manager_views.cc
|
||||
index 2b495a8ab092c..01a28aca853d0 100644
|
||||
--- components/constrained_window/native_web_contents_modal_dialog_manager_views.cc
|
||||
@@ -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 0fc878fd920e9..a7595a9b4af86 100644
|
||||
index 7b22be3acdb6c..5e8ac69f52691 100644
|
||||
--- ui/views/window/dialog_delegate.cc
|
||||
+++ ui/views/window/dialog_delegate.cc
|
||||
@@ -88,10 +88,12 @@ DialogDelegate::DialogDelegate() {
|
||||
@@ -89,10 +89,12 @@ DialogDelegate::DialogDelegate() {
|
||||
// static
|
||||
Widget* DialogDelegate::CreateDialogWidget(WidgetDelegate* delegate,
|
||||
gfx::NativeWindow context,
|
||||
@@ -228,7 +228,7 @@ index 0fc878fd920e9..a7595a9b4af86 100644
|
||||
widget->Init(std::move(params));
|
||||
return widget;
|
||||
}
|
||||
@@ -100,15 +102,17 @@ Widget* DialogDelegate::CreateDialogWidget(WidgetDelegate* delegate,
|
||||
@@ -101,15 +103,17 @@ Widget* DialogDelegate::CreateDialogWidget(WidgetDelegate* delegate,
|
||||
Widget* DialogDelegate::CreateDialogWidget(
|
||||
std::unique_ptr<WidgetDelegate> delegate,
|
||||
gfx::NativeWindow context,
|
||||
@@ -250,7 +250,7 @@ index 0fc878fd920e9..a7595a9b4af86 100644
|
||||
#else
|
||||
return true;
|
||||
#endif
|
||||
@@ -119,7 +123,8 @@ Widget::InitParams DialogDelegate::GetDialogWidgetInitParams(
|
||||
@@ -120,7 +124,8 @@ Widget::InitParams DialogDelegate::GetDialogWidgetInitParams(
|
||||
WidgetDelegate* delegate,
|
||||
gfx::NativeWindow context,
|
||||
gfx::NativeView parent,
|
||||
@@ -260,7 +260,7 @@ index 0fc878fd920e9..a7595a9b4af86 100644
|
||||
DialogDelegate* dialog = delegate->AsDialogDelegate();
|
||||
|
||||
views::Widget::InitParams params(
|
||||
@@ -129,7 +134,7 @@ Widget::InitParams DialogDelegate::GetDialogWidgetInitParams(
|
||||
@@ -130,7 +135,7 @@ Widget::InitParams DialogDelegate::GetDialogWidgetInitParams(
|
||||
params.bounds = bounds;
|
||||
|
||||
if (dialog) {
|
||||
@@ -269,7 +269,7 @@ index 0fc878fd920e9..a7595a9b4af86 100644
|
||||
}
|
||||
|
||||
if (!dialog || dialog->use_custom_frame()) {
|
||||
@@ -143,6 +148,7 @@ Widget::InitParams DialogDelegate::GetDialogWidgetInitParams(
|
||||
@@ -144,6 +149,7 @@ Widget::InitParams DialogDelegate::GetDialogWidgetInitParams(
|
||||
}
|
||||
params.context = context;
|
||||
params.parent = parent;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git chrome/browser/download/chrome_download_manager_delegate.cc chrome/browser/download/chrome_download_manager_delegate.cc
|
||||
index f960decad09fb..b1e88137ff284 100644
|
||||
index 2ca95e6bb673a..2207b0f637a91 100644
|
||||
--- chrome/browser/download/chrome_download_manager_delegate.cc
|
||||
+++ chrome/browser/download/chrome_download_manager_delegate.cc
|
||||
@@ -30,6 +30,7 @@
|
||||
@@ -10,7 +10,7 @@ index f960decad09fb..b1e88137ff284 100644
|
||||
#include "chrome/browser/browser_process.h"
|
||||
#include "chrome/browser/download/bubble/download_bubble_prefs.h"
|
||||
#include "chrome/browser/download/download_core_service.h"
|
||||
@@ -164,6 +165,10 @@
|
||||
@@ -166,6 +167,10 @@
|
||||
#endif // BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
#endif // BUILDFLAG(SAFE_BROWSING_DOWNLOAD_PROTECTION)
|
||||
|
||||
@@ -21,7 +21,7 @@ index f960decad09fb..b1e88137ff284 100644
|
||||
using content::BrowserThread;
|
||||
using content::DownloadManager;
|
||||
using download::DownloadItem;
|
||||
@@ -523,6 +528,11 @@ ChromeDownloadManagerDelegate::ChromeDownloadManagerDelegate(Profile* profile)
|
||||
@@ -531,6 +536,11 @@ ChromeDownloadManagerDelegate::ChromeDownloadManagerDelegate(Profile* profile)
|
||||
download_dialog_bridge_ = std::make_unique<DownloadDialogBridge>();
|
||||
download_message_bridge_ = std::make_unique<DownloadMessageBridge>();
|
||||
#endif
|
||||
@@ -33,7 +33,7 @@ index f960decad09fb..b1e88137ff284 100644
|
||||
}
|
||||
|
||||
ChromeDownloadManagerDelegate::~ChromeDownloadManagerDelegate() {
|
||||
@@ -586,6 +596,9 @@ void ChromeDownloadManagerDelegate::Shutdown() {
|
||||
@@ -594,6 +604,9 @@ void ChromeDownloadManagerDelegate::Shutdown() {
|
||||
download_manager_->RemoveObserver(this);
|
||||
download_manager_ = nullptr;
|
||||
}
|
||||
@@ -43,7 +43,7 @@ index f960decad09fb..b1e88137ff284 100644
|
||||
}
|
||||
|
||||
void ChromeDownloadManagerDelegate::OnDownloadCanceledAtShutdown(
|
||||
@@ -654,6 +667,12 @@ bool ChromeDownloadManagerDelegate::DetermineDownloadTarget(
|
||||
@@ -662,6 +675,12 @@ bool ChromeDownloadManagerDelegate::DetermineDownloadTarget(
|
||||
ReportPDFLoadStatus(PDFLoadStatus::kTriggeredNoGestureDriveByDownload);
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ index f960decad09fb..b1e88137ff284 100644
|
||||
DownloadTargetDeterminer::CompletionCallback target_determined_callback =
|
||||
base::BindOnce(&ChromeDownloadManagerDelegate::OnDownloadTargetDetermined,
|
||||
weak_ptr_factory_.GetWeakPtr(), download->GetId(),
|
||||
@@ -1142,8 +1161,13 @@ void ChromeDownloadManagerDelegate::OpenDownload(DownloadItem* download) {
|
||||
@@ -1167,8 +1186,13 @@ void ChromeDownloadManagerDelegate::OpenDownload(DownloadItem* download) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ index f960decad09fb..b1e88137ff284 100644
|
||||
net::FilePathToFileURL(download->GetTargetFilePath()),
|
||||
content::Referrer(), WindowOpenDisposition::NEW_FOREGROUND_TAB,
|
||||
diff --git chrome/browser/download/chrome_download_manager_delegate.h chrome/browser/download/chrome_download_manager_delegate.h
|
||||
index 41db535e5cf9c..015d84cc95b49 100644
|
||||
index b3a0d699d9d13..2f42dcf185264 100644
|
||||
--- chrome/browser/download/chrome_download_manager_delegate.h
|
||||
+++ chrome/browser/download/chrome_download_manager_delegate.h
|
||||
@@ -19,6 +19,7 @@
|
||||
@@ -96,7 +96,7 @@ index 41db535e5cf9c..015d84cc95b49 100644
|
||||
// This is the Chrome side helper for the download system.
|
||||
class ChromeDownloadManagerDelegate
|
||||
: public content::DownloadManagerDelegate,
|
||||
@@ -406,6 +413,10 @@ class ChromeDownloadManagerDelegate
|
||||
@@ -405,6 +412,10 @@ class ChromeDownloadManagerDelegate
|
||||
// Whether a file picker dialog is showing.
|
||||
bool is_file_picker_showing_;
|
||||
|
||||
|
@@ -1,17 +1,17 @@
|
||||
diff --git chrome/browser/extensions/api/chrome_extensions_api_client.cc chrome/browser/extensions/api/chrome_extensions_api_client.cc
|
||||
index 0ac0d2fae56a9..4c55cfe1a52d7 100644
|
||||
index acd5954b3423a..215edaa4badc5 100644
|
||||
--- chrome/browser/extensions/api/chrome_extensions_api_client.cc
|
||||
+++ chrome/browser/extensions/api/chrome_extensions_api_client.cc
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "base/strings/string_util.h"
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "base/task/single_thread_task_runner.h"
|
||||
#include "build/build_config.h"
|
||||
#include "build/chromeos_buildflags.h"
|
||||
+#include "cef/libcef/features/features.h"
|
||||
#include "chrome/browser/extensions/api/automation_internal/chrome_automation_internal_api_delegate.h"
|
||||
#include "chrome/browser/extensions/api/chrome_device_permissions_prompt.h"
|
||||
#include "chrome/browser/extensions/api/declarative_content/chrome_content_rules_registry.h"
|
||||
@@ -86,6 +87,10 @@
|
||||
#include "chrome/browser/extensions/clipboard_extension_helper_chromeos.h"
|
||||
@@ -90,6 +91,10 @@
|
||||
#include "chromeos/ash/components/settings/cros_settings.h"
|
||||
#endif
|
||||
|
||||
+#if BUILDFLAG(ENABLE_CEF)
|
||||
@@ -21,7 +21,7 @@ index 0ac0d2fae56a9..4c55cfe1a52d7 100644
|
||||
#if BUILDFLAG(ENABLE_PRINTING)
|
||||
#include "chrome/browser/printing/printing_init.h"
|
||||
#endif
|
||||
@@ -310,7 +315,11 @@ ChromeExtensionsAPIClient::CreateGuestViewManagerDelegate() const {
|
||||
@@ -317,7 +322,11 @@ ChromeExtensionsAPIClient::CreateGuestViewManagerDelegate() const {
|
||||
std::unique_ptr<MimeHandlerViewGuestDelegate>
|
||||
ChromeExtensionsAPIClient::CreateMimeHandlerViewGuestDelegate(
|
||||
MimeHandlerViewGuest* guest) const {
|
||||
@@ -32,12 +32,12 @@ index 0ac0d2fae56a9..4c55cfe1a52d7 100644
|
||||
+#endif
|
||||
}
|
||||
|
||||
WebViewGuestDelegate* ChromeExtensionsAPIClient::CreateWebViewGuestDelegate(
|
||||
std::unique_ptr<WebViewGuestDelegate>
|
||||
diff --git chrome/browser/extensions/api/tabs/tabs_api.cc chrome/browser/extensions/api/tabs/tabs_api.cc
|
||||
index dad67c2ce98a8..71b27628f7827 100644
|
||||
index 4ac2686025ef0..94aa0016881b6 100644
|
||||
--- chrome/browser/extensions/api/tabs/tabs_api.cc
|
||||
+++ chrome/browser/extensions/api/tabs/tabs_api.cc
|
||||
@@ -1687,7 +1687,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
|
||||
@@ -1714,7 +1714,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
|
||||
return RespondNow(Error(ExtensionTabUtil::kTabStripNotEditableError));
|
||||
}
|
||||
|
||||
@@ -46,16 +46,7 @@ index dad67c2ce98a8..71b27628f7827 100644
|
||||
tab_strip->ActivateTabAt(tab_index);
|
||||
DCHECK_EQ(contents, tab_strip->GetActiveWebContents());
|
||||
}
|
||||
@@ -1701,7 +1701,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
|
||||
}
|
||||
|
||||
bool highlighted = *params->update_properties.highlighted;
|
||||
- if (highlighted != tab_strip->IsTabSelected(tab_index)) {
|
||||
+ if (tab_strip && highlighted != tab_strip->IsTabSelected(tab_index)) {
|
||||
tab_strip->ToggleSelectionAt(tab_index);
|
||||
}
|
||||
}
|
||||
@@ -1713,7 +1713,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
|
||||
@@ -1741,7 +1741,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
|
||||
kCannotUpdateMuteCaptured, base::NumberToString(tab_id))));
|
||||
}
|
||||
|
||||
@@ -64,7 +55,7 @@ index dad67c2ce98a8..71b27628f7827 100644
|
||||
int opener_id = *params->update_properties.opener_tab_id;
|
||||
WebContents* opener_contents = nullptr;
|
||||
if (opener_id == tab_id) {
|
||||
@@ -1748,7 +1748,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
|
||||
@@ -1776,7 +1776,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
|
||||
->SetAutoDiscardable(state);
|
||||
}
|
||||
|
||||
@@ -73,7 +64,7 @@ index dad67c2ce98a8..71b27628f7827 100644
|
||||
// Bug fix for crbug.com/1197888. Don't let the extension update the tab if
|
||||
// the user is dragging tabs.
|
||||
if (!ExtensionTabUtil::IsTabStripEditable()) {
|
||||
@@ -1769,7 +1769,8 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
|
||||
@@ -1797,7 +1797,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 +74,7 @@ index dad67c2ce98a8..71b27628f7827 100644
|
||||
!IsURLAllowedInIncognito(GURL(updated_url))) {
|
||||
return RespondNow(Error(ErrorUtils::FormatErrorMessage(
|
||||
tabs_constants::kURLsNotAllowedInIncognitoError, updated_url)));
|
||||
@@ -1784,7 +1785,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
|
||||
@@ -1812,7 +1813,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
|
||||
return RespondNow(Error(std::move(error)));
|
||||
}
|
||||
|
||||
@@ -93,7 +84,7 @@ index dad67c2ce98a8..71b27628f7827 100644
|
||||
current_url, updated_url, js_callstack());
|
||||
}
|
||||
diff --git chrome/browser/extensions/extension_tab_util.cc chrome/browser/extensions/extension_tab_util.cc
|
||||
index 8a2e378aac255..456c542044eb3 100644
|
||||
index fc375bf87a2d1..5f32c45dc2fa6 100644
|
||||
--- chrome/browser/extensions/extension_tab_util.cc
|
||||
+++ chrome/browser/extensions/extension_tab_util.cc
|
||||
@@ -38,6 +38,7 @@
|
||||
@@ -104,7 +95,7 @@ index 8a2e378aac255..456c542044eb3 100644
|
||||
#include "chrome/browser/browser_process.h" // nogncheck
|
||||
#include "chrome/browser/extensions/browser_extension_window_controller.h"
|
||||
#include "chrome/browser/extensions/chrome_extension_function_details.h"
|
||||
@@ -84,6 +85,10 @@
|
||||
@@ -87,6 +88,10 @@
|
||||
#include "url/url_constants.h"
|
||||
#endif
|
||||
|
||||
@@ -115,7 +106,7 @@ index 8a2e378aac255..456c542044eb3 100644
|
||||
using content::NavigationEntry;
|
||||
using content::WebContents;
|
||||
using extensions::mojom::APIPermissionID;
|
||||
@@ -735,6 +740,14 @@ bool ExtensionTabUtil::GetTabById(int tab_id,
|
||||
@@ -738,6 +743,14 @@ bool ExtensionTabUtil::GetTabById(int tab_id,
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git chrome/browser/ui/views/frame/browser_frame_mac.h chrome/browser/ui/views/frame/browser_frame_mac.h
|
||||
index 2245c931fbe4f..761ea6b3a6afb 100644
|
||||
index bda8a68545a80..275a75f841422 100644
|
||||
--- chrome/browser/ui/views/frame/browser_frame_mac.h
|
||||
+++ chrome/browser/ui/views/frame/browser_frame_mac.h
|
||||
@@ -11,6 +11,7 @@
|
||||
@@ -10,7 +10,7 @@ index 2245c931fbe4f..761ea6b3a6afb 100644
|
||||
class BrowserFrame;
|
||||
class BrowserView;
|
||||
@class BrowserWindowTouchBarController;
|
||||
@@ -54,6 +55,21 @@ class BrowserFrameMac : public views::NativeWidgetMac,
|
||||
@@ -55,6 +56,21 @@ class BrowserFrameMac : public views::NativeWidgetMac,
|
||||
bool ShouldUseInitialVisibleOnAllWorkspaces() const override;
|
||||
void AnnounceTextInInProcessWindow(const std::u16string& text) override;
|
||||
|
||||
@@ -33,7 +33,7 @@ index 2245c931fbe4f..761ea6b3a6afb 100644
|
||||
~BrowserFrameMac() override;
|
||||
|
||||
diff --git chrome/browser/ui/views/frame/browser_frame_mac.mm chrome/browser/ui/views/frame/browser_frame_mac.mm
|
||||
index 29ba0f48f559a..07887ae9ec11c 100644
|
||||
index 9f478e1478d41..fadc6f000b87e 100644
|
||||
--- chrome/browser/ui/views/frame/browser_frame_mac.mm
|
||||
+++ chrome/browser/ui/views/frame/browser_frame_mac.mm
|
||||
@@ -185,7 +185,14 @@ void BrowserFrameMac::OnWindowFullscreenTransitionComplete() {
|
||||
|
@@ -17,10 +17,10 @@ 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 f6c0b656e5d67..caac970a78928 100644
|
||||
index b939a33a372d9..11483872d8782 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(
|
||||
@@ -223,11 +223,28 @@ std::unique_ptr<permissions::PermissionPrompt> CreateQuietPrompt(
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -253,7 +253,7 @@ index 910f29ac13deb..680507379632e 100644
|
||||
base::ThreadPool::CreateSequencedTaskRunner(
|
||||
{base::MayBlock(), base::TaskPriority::BEST_EFFORT}),
|
||||
diff --git chrome/browser/policy/chrome_browser_policy_connector.h chrome/browser/policy/chrome_browser_policy_connector.h
|
||||
index dc552834ff821..6b290da791ccd 100644
|
||||
index fbc5a3f9fab7b..747c44589eaf7 100644
|
||||
--- chrome/browser/policy/chrome_browser_policy_connector.h
|
||||
+++ chrome/browser/policy/chrome_browser_policy_connector.h
|
||||
@@ -22,6 +22,10 @@
|
||||
|
@@ -44,7 +44,7 @@ index 1cf20c6206d60..9140d51cb79bd 100644
|
||||
avatar_toolbar_button, GetBrowser().profile(), type);
|
||||
DCHECK_EQ(nullptr, bubble_tracker_.view());
|
||||
diff --git chrome/browser/ui/views/profiles/incognito_menu_view.cc chrome/browser/ui/views/profiles/incognito_menu_view.cc
|
||||
index 50a88f2c7bb82..bf6a3edd4e7bd 100644
|
||||
index affba30438a4a..bdf433d20b97c 100644
|
||||
--- chrome/browser/ui/views/profiles/incognito_menu_view.cc
|
||||
+++ chrome/browser/ui/views/profiles/incognito_menu_view.cc
|
||||
@@ -30,7 +30,9 @@
|
||||
@@ -59,10 +59,10 @@ index 50a88f2c7bb82..bf6a3edd4e7bd 100644
|
||||
ax::mojom::NameFrom::kAttribute);
|
||||
|
||||
diff --git chrome/browser/ui/views/profiles/profile_menu_coordinator.cc chrome/browser/ui/views/profiles/profile_menu_coordinator.cc
|
||||
index 6ba5eb8b97e90..fbe8d899878fe 100644
|
||||
index 133b80d279bf6..be46fc65f890d 100644
|
||||
--- chrome/browser/ui/views/profiles/profile_menu_coordinator.cc
|
||||
+++ chrome/browser/ui/views/profiles/profile_menu_coordinator.cc
|
||||
@@ -58,7 +58,9 @@ void ProfileMenuCoordinator::Show(bool is_source_accelerator) {
|
||||
@@ -60,7 +60,9 @@ void ProfileMenuCoordinator::Show(
|
||||
|
||||
std::unique_ptr<ProfileMenuViewBase> bubble;
|
||||
bool is_incognito = browser.profile()->IsIncognitoProfile();
|
||||
|
@@ -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 3357c7926a48f..77c27c7883f27 100644
|
||||
index f2719532b3517..573cd8ec4b8ce 100644
|
||||
--- chrome/browser/profiles/off_the_record_profile_impl.cc
|
||||
+++ chrome/browser/profiles/off_the_record_profile_impl.cc
|
||||
@@ -655,7 +655,9 @@ std::unique_ptr<Profile> Profile::CreateOffTheRecordProfile(
|
||||
@@ -659,7 +659,9 @@ std::unique_ptr<Profile> Profile::CreateOffTheRecordProfile(
|
||||
#endif
|
||||
if (!profile)
|
||||
profile = std::make_unique<OffTheRecordProfileImpl>(parent, otr_profile_id);
|
||||
@@ -14,7 +14,7 @@ index 3357c7926a48f..77c27c7883f27 100644
|
||||
}
|
||||
|
||||
diff --git chrome/browser/profiles/profile.cc chrome/browser/profiles/profile.cc
|
||||
index a490fefce8c79..2a066c47ef96d 100644
|
||||
index 363a7c4ac583f..1c263547c8f54 100644
|
||||
--- chrome/browser/profiles/profile.cc
|
||||
+++ chrome/browser/profiles/profile.cc
|
||||
@@ -84,6 +84,7 @@ base::LazyInstance<std::set<content::BrowserContext*>>::Leaky
|
||||
@@ -85,7 +85,7 @@ index c8d72ed59252f..d785187710a79 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 a27c5368517b0..54f2f1572b7ad 100644
|
||||
index 22445800c6ac8..bd17582782117 100644
|
||||
--- chrome/browser/profiles/profile_impl.cc
|
||||
+++ chrome/browser/profiles/profile_impl.cc
|
||||
@@ -1023,7 +1023,9 @@ Profile* ProfileImpl::GetOffTheRecordProfile(const OTRProfileID& otr_profile_id,
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git chrome/browser/safe_browsing/BUILD.gn chrome/browser/safe_browsing/BUILD.gn
|
||||
index 50c6735fe6074..749fb1ff46146 100644
|
||||
index 4e2ad1d175829..ba6a3262dade2 100644
|
||||
--- chrome/browser/safe_browsing/BUILD.gn
|
||||
+++ chrome/browser/safe_browsing/BUILD.gn
|
||||
@@ -37,6 +37,7 @@ static_library("safe_browsing") {
|
||||
|
@@ -69,18 +69,18 @@ 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 184e3a58c47ac..7152bd618f351 100644
|
||||
index cbcdde4afa71b..3507ff26fa3a0 100644
|
||||
--- chrome/browser/ui/webui/chrome_web_ui_configs.cc
|
||||
+++ chrome/browser/ui/webui/chrome_web_ui_configs.cc
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "chrome/browser/ui/webui/chrome_web_ui_configs.h"
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#include "build/android_buildflags.h"
|
||||
#include "build/build_config.h"
|
||||
+#include "cef/libcef/features/features.h"
|
||||
#include "chrome/browser/optimization_guide/optimization_guide_internals_ui.h"
|
||||
#include "chrome/browser/ui/webui/about/about_ui.h"
|
||||
#include "chrome/browser/ui/webui/accessibility/accessibility_ui.h"
|
||||
@@ -211,6 +212,9 @@ void RegisterChromeWebUIConfigs() {
|
||||
@@ -214,6 +215,9 @@ void RegisterChromeWebUIConfigs() {
|
||||
map.AddWebUIConfig(std::make_unique<BluetoothInternalsUIConfig>());
|
||||
map.AddWebUIConfig(std::make_unique<BrowsingTopicsInternalsUIConfig>());
|
||||
map.AddWebUIConfig(std::make_unique<chromeos::DeviceLogUIConfig>());
|
||||
@@ -91,10 +91,10 @@ index 184e3a58c47ac..7152bd618f351 100644
|
||||
map.AddWebUIConfig(std::make_unique<CrashesUIConfig>());
|
||||
map.AddWebUIConfig(std::make_unique<commerce::CommerceInternalsUIConfig>());
|
||||
diff --git chrome/common/webui_url_constants.cc chrome/common/webui_url_constants.cc
|
||||
index d94ad4f02b11d..c1100feeff7c6 100644
|
||||
index e5e724a22d015..fcb15d234483f 100644
|
||||
--- chrome/common/webui_url_constants.cc
|
||||
+++ chrome/common/webui_url_constants.cc
|
||||
@@ -95,6 +95,9 @@ base::span<const base::cstring_view> ChromeURLHosts() {
|
||||
@@ -96,6 +96,9 @@ base::span<const base::cstring_view> ChromeURLHosts() {
|
||||
kChromeUIHistoryHost,
|
||||
history_clusters_internals::kChromeUIHistoryClustersInternalsHost,
|
||||
kChromeUIInterstitialHost,
|
||||
@@ -105,18 +105,18 @@ index d94ad4f02b11d..c1100feeff7c6 100644
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
kChromeUIManagementHost,
|
||||
diff --git chrome/common/webui_url_constants.h chrome/common/webui_url_constants.h
|
||||
index aa2c595dabdd1..94938716ccd4a 100644
|
||||
index d2e895dbc4a16..abe7ba3d26f50 100644
|
||||
--- chrome/common/webui_url_constants.h
|
||||
+++ chrome/common/webui_url_constants.h
|
||||
@@ -17,6 +17,7 @@
|
||||
#include "base/strings/cstring_view.h"
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "build/android_buildflags.h"
|
||||
#include "build/branding_buildflags.h"
|
||||
#include "build/build_config.h"
|
||||
+#include "cef/libcef/features/features.h"
|
||||
#include "chrome/common/buildflags.h"
|
||||
#include "components/signin/public/base/signin_buildflags.h"
|
||||
#include "content/public/common/url_constants.h"
|
||||
@@ -146,6 +147,10 @@ inline constexpr char kChromeUIInterstitialHost[] = "interstitials";
|
||||
@@ -147,6 +148,10 @@ inline constexpr char kChromeUIInterstitialHost[] = "interstitials";
|
||||
inline constexpr char kChromeUIInterstitialURL[] = "chrome://interstitials/";
|
||||
inline constexpr char kChromeUIKillHost[] = "kill";
|
||||
inline constexpr char kChromeUILauncherInternalsHost[] = "launcher-internals";
|
||||
|
@@ -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 c021991c04f77..aa6ad561dfd80 100644
|
||||
index f9c2e60204369..98026fd57457f 100644
|
||||
--- chrome/browser/ui/webui/version/version_ui.cc
|
||||
+++ chrome/browser/ui/webui/version/version_ui.cc
|
||||
@@ -16,6 +16,7 @@
|
||||
@@ -158,9 +158,9 @@ index c021991c04f77..aa6ad561dfd80 100644
|
||||
{version_ui::kVariationsCmdName, IDS_VERSION_UI_VARIATIONS_CMD},
|
||||
{version_ui::kCopyVariationsLabel, IDS_VERSION_UI_COPY_VARIATIONS_LABEL},
|
||||
@@ -114,6 +123,10 @@ void CreateAndAddVersionUIDataSource(Profile* profile) {
|
||||
html_source->AddResourcePath("images/product_logo_white.png",
|
||||
IDR_PRODUCT_LOGO_WHITE);
|
||||
#endif // BUILDFLAG(IS_ANDROID)
|
||||
html_source->SetDefaultResource(IDR_VERSION_UI_ABOUT_VERSION_HTML);
|
||||
+
|
||||
+#if BUILDFLAG(ENABLE_CEF)
|
||||
+ html_source->AddString(version_ui::kCefVersion, CEF_VERSION);
|
||||
@@ -233,10 +233,10 @@ 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 40c7cc51fc863..b3ee7e7978e93 100644
|
||||
index bd2914d8bc19a..f3176886fd96b 100644
|
||||
--- components/webui/version/resources/about_version.html
|
||||
+++ components/webui/version/resources/about_version.html
|
||||
@@ -48,9 +48,21 @@ about:version template page
|
||||
@@ -49,9 +49,21 @@ about:version template page
|
||||
</picture>
|
||||
</if>
|
||||
<div id="company">$i18n{company}</div>
|
||||
@@ -259,7 +259,7 @@ index 40c7cc51fc863..b3ee7e7978e93 100644
|
||||
<tr><td class="label">$i18n{application_label}</td>
|
||||
<td class="version" id="version">
|
||||
<span id="copy-content">
|
||||
@@ -158,7 +170,15 @@ about:version template page
|
||||
@@ -159,7 +171,15 @@ about:version template page
|
||||
<tr><td class="label">$i18n{executable_path_name}</td>
|
||||
<td class="version" id="executable_path">$i18n{executable_path}</td>
|
||||
</tr>
|
||||
@@ -276,7 +276,7 @@ index 40c7cc51fc863..b3ee7e7978e93 100644
|
||||
<td class="version" id="profile_path">$i18n{profile_path}</td>
|
||||
</tr>
|
||||
</if>
|
||||
@@ -191,6 +211,17 @@ about:version template page
|
||||
@@ -192,6 +212,17 @@ about:version template page
|
||||
<td class="version" id="sanitizer">$i18n{sanitizer}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git chrome/app/chrome_main_delegate.cc chrome/app/chrome_main_delegate.cc
|
||||
index 345d2729f1802..10d3294221f3b 100644
|
||||
index 7cc74f595ff57..4e0e494678d75 100644
|
||||
--- chrome/app/chrome_main_delegate.cc
|
||||
+++ chrome/app/chrome_main_delegate.cc
|
||||
@@ -43,6 +43,7 @@
|
||||
@@ -18,7 +18,7 @@ index 345d2729f1802..10d3294221f3b 100644
|
||||
// Initializes the user data dir. Must be called before InitializeLocalState().
|
||||
void InitializeUserDataDir(base::CommandLine* command_line) {
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
@@ -622,6 +624,7 @@ void InitializeUserDataDir(base::CommandLine* command_line) {
|
||||
@@ -624,6 +626,7 @@ void InitializeUserDataDir(base::CommandLine* command_line) {
|
||||
command_line->AppendSwitchPath(switches::kUserDataDir, user_data_dir);
|
||||
#endif // BUILDFLAG(IS_WIN)
|
||||
}
|
||||
@@ -26,7 +26,7 @@ index 345d2729f1802..10d3294221f3b 100644
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
void InitLogging(const std::string& process_type) {
|
||||
@@ -741,6 +744,10 @@ ChromeMainDelegate::~ChromeMainDelegate() {
|
||||
@@ -743,6 +746,10 @@ ChromeMainDelegate::~ChromeMainDelegate() {
|
||||
ChromeMainDelegate::~ChromeMainDelegate() = default;
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
|
||||
@@ -37,7 +37,7 @@ index 345d2729f1802..10d3294221f3b 100644
|
||||
std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
|
||||
InvokedIn invoked_in) {
|
||||
DUMP_WILL_BE_CHECK(base::ThreadPoolInstance::Get());
|
||||
@@ -766,7 +773,7 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
|
||||
@@ -768,7 +775,7 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
|
||||
// future session's metrics.
|
||||
DeferBrowserMetrics(user_data_dir);
|
||||
|
||||
@@ -46,7 +46,7 @@ index 345d2729f1802..10d3294221f3b 100644
|
||||
// In the case the process is not the singleton process, the uninstall tasks
|
||||
// need to be executed here. A window will be displayed asking to close all
|
||||
// running instances.
|
||||
@@ -851,7 +858,8 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
|
||||
@@ -853,7 +860,8 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
|
||||
|
||||
// Initializes the resource bundle and determines the locale.
|
||||
std::string actual_locale = LoadLocalState(
|
||||
@@ -56,18 +56,18 @@ index 345d2729f1802..10d3294221f3b 100644
|
||||
chrome_feature_list_creator->SetApplicationLocale(actual_locale);
|
||||
chrome_feature_list_creator->OverrideCachedUIStrings();
|
||||
|
||||
@@ -866,6 +874,8 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
|
||||
@@ -868,6 +876,8 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
|
||||
new net::NetworkChangeNotifierFactoryAndroid());
|
||||
#endif
|
||||
|
||||
+#if !BUILDFLAG(ENABLE_CEF)
|
||||
+ // Avoid CEF crash with multi-threaded-message-loop.
|
||||
if (base::FeatureList::IsEnabled(
|
||||
features::kWriteBasicSystemProfileToPersistentHistogramsFile)) {
|
||||
bool record = true;
|
||||
bool record = true;
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
record =
|
||||
@@ -876,6 +886,7 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
|
||||
if (record)
|
||||
chrome_content_browser_client_->startup_data()->RecordCoreSystemProfile();
|
||||
if (record) {
|
||||
chrome_content_browser_client_->startup_data()->RecordCoreSystemProfile();
|
||||
}
|
||||
+#endif // !BUILDFLAG(ENABLE_CEF)
|
||||
|
||||
@@ -232,10 +232,10 @@ index 72eb096075a05..d3866aae87c60 100644
|
||||
|
||||
base::PathService::OverrideAndCreateIfNeeded(
|
||||
diff --git chrome/browser/chrome_browser_main.cc chrome/browser/chrome_browser_main.cc
|
||||
index 61da14e26c4db..2334d0fab04b5 100644
|
||||
index 681fd3282078c..8bca99c60d66d 100644
|
||||
--- chrome/browser/chrome_browser_main.cc
|
||||
+++ chrome/browser/chrome_browser_main.cc
|
||||
@@ -27,6 +27,7 @@
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "base/trace_event/trace_event.h"
|
||||
#include "base/values.h"
|
||||
#include "build/build_config.h"
|
||||
@@ -243,7 +243,7 @@ index 61da14e26c4db..2334d0fab04b5 100644
|
||||
#include "chrome/browser/active_use_util.h"
|
||||
#include "chrome/browser/after_startup_task_utils.h"
|
||||
#include "chrome/browser/browser_features.h"
|
||||
@@ -432,7 +433,7 @@ void ProcessSingletonNotificationCallbackImpl(
|
||||
@@ -433,7 +434,7 @@ void ProcessSingletonNotificationCallbackImpl(
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -252,7 +252,7 @@ index 61da14e26c4db..2334d0fab04b5 100644
|
||||
// The uninstall command-line switch is handled by the origin process; see
|
||||
// ChromeMainDelegate::PostEarlyInitialization(...). The other process won't
|
||||
// be able to become the singleton process and will display a window asking
|
||||
@@ -741,7 +742,7 @@ int ChromeBrowserMainParts::PreEarlyInitialization() {
|
||||
@@ -749,7 +750,7 @@ int ChromeBrowserMainParts::PreEarlyInitialization() {
|
||||
return content::RESULT_CODE_NORMAL_EXIT;
|
||||
}
|
||||
|
||||
@@ -261,7 +261,7 @@ index 61da14e26c4db..2334d0fab04b5 100644
|
||||
// If we are running stale binaries then relaunch and exit immediately.
|
||||
if (upgrade_util::IsRunningOldChrome()) {
|
||||
if (!upgrade_util::RelaunchChromeBrowser(
|
||||
@@ -859,7 +860,7 @@ int ChromeBrowserMainParts::OnLocalStateLoaded(
|
||||
@@ -867,7 +868,7 @@ int ChromeBrowserMainParts::OnLocalStateLoaded(
|
||||
browser_process_->local_state());
|
||||
platform_management_service->RefreshCache(base::NullCallback());
|
||||
|
||||
@@ -270,7 +270,7 @@ index 61da14e26c4db..2334d0fab04b5 100644
|
||||
if (first_run::IsChromeFirstRun()) {
|
||||
bool stats_default;
|
||||
if (GoogleUpdateSettings::GetCollectStatsConsentDefault(&stats_default)) {
|
||||
@@ -905,6 +906,7 @@ int ChromeBrowserMainParts::ApplyFirstRunPrefs() {
|
||||
@@ -910,6 +911,7 @@ int ChromeBrowserMainParts::ApplyFirstRunPrefs() {
|
||||
#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS)
|
||||
master_prefs_ = std::make_unique<first_run::MasterPrefs>();
|
||||
|
||||
@@ -278,7 +278,7 @@ index 61da14e26c4db..2334d0fab04b5 100644
|
||||
std::unique_ptr<installer::InitialPreferences> installer_initial_prefs =
|
||||
startup_data_->chrome_feature_list_creator()->TakeInitialPrefs();
|
||||
if (!installer_initial_prefs)
|
||||
@@ -938,6 +940,7 @@ int ChromeBrowserMainParts::ApplyFirstRunPrefs() {
|
||||
@@ -943,6 +945,7 @@ int ChromeBrowserMainParts::ApplyFirstRunPrefs() {
|
||||
master_prefs_->confirm_to_quit);
|
||||
}
|
||||
#endif
|
||||
@@ -286,7 +286,7 @@ index 61da14e26c4db..2334d0fab04b5 100644
|
||||
#endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS)
|
||||
return content::RESULT_CODE_NORMAL_EXIT;
|
||||
}
|
||||
@@ -1007,6 +1010,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
|
||||
@@ -1012,6 +1015,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
|
||||
|
||||
browser_process_->browser_policy_connector()->OnResourceBundleCreated();
|
||||
|
||||
@@ -294,7 +294,7 @@ index 61da14e26c4db..2334d0fab04b5 100644
|
||||
// Android does first run in Java instead of native.
|
||||
// Chrome OS has its own out-of-box-experience code.
|
||||
#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS)
|
||||
@@ -1028,6 +1032,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
|
||||
@@ -1033,6 +1037,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
|
||||
#endif
|
||||
}
|
||||
#endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS)
|
||||
@@ -302,7 +302,7 @@ index 61da14e26c4db..2334d0fab04b5 100644
|
||||
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
#if defined(ARCH_CPU_X86_64)
|
||||
@@ -1395,6 +1400,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
@@ -1400,6 +1405,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
browser_process_->PreMainMessageLoopRun();
|
||||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
@@ -310,7 +310,7 @@ index 61da14e26c4db..2334d0fab04b5 100644
|
||||
// If the command line specifies 'uninstall' then we need to work here
|
||||
// unless we detect another chrome browser running.
|
||||
if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kUninstall)) {
|
||||
@@ -1406,6 +1412,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
@@ -1411,6 +1417,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
return ChromeBrowserMainPartsWin::HandleIconsCommands(
|
||||
*base::CommandLine::ForCurrentProcess());
|
||||
}
|
||||
@@ -318,7 +318,7 @@ index 61da14e26c4db..2334d0fab04b5 100644
|
||||
|
||||
ui::SelectFileDialog::SetFactory(
|
||||
std::make_unique<ChromeSelectFileDialogFactory>());
|
||||
@@ -1428,6 +1435,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
@@ -1433,6 +1440,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -326,7 +326,7 @@ index 61da14e26c4db..2334d0fab04b5 100644
|
||||
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
|
||||
switches::kMakeDefaultBrowser)) {
|
||||
bool is_managed = g_browser_process->local_state()->IsManagedPreference(
|
||||
@@ -1441,13 +1449,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
@@ -1446,13 +1454,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
? static_cast<int>(content::RESULT_CODE_NORMAL_EXIT)
|
||||
: static_cast<int>(CHROME_RESULT_CODE_SHELL_INTEGRATION_FAILED);
|
||||
}
|
||||
@@ -342,7 +342,7 @@ index 61da14e26c4db..2334d0fab04b5 100644
|
||||
// We must call DoUpgradeTasks now that we own the browser singleton to
|
||||
// finish upgrade tasks (swap) and relaunch if necessary.
|
||||
if (upgrade_util::DoUpgradeTasks(*base::CommandLine::ForCurrentProcess()))
|
||||
@@ -1491,7 +1500,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
@@ -1496,7 +1505,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -351,7 +351,7 @@ index 61da14e26c4db..2334d0fab04b5 100644
|
||||
// Check if there is any machine level Chrome installed on the current
|
||||
// machine. If yes and the current Chrome process is user level, we do not
|
||||
// allow the user level Chrome to run. So we notify the user and uninstall
|
||||
@@ -1573,7 +1582,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
@@ -1578,7 +1587,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
// Call `PostProfileInit()`and set it up for profiles created later.
|
||||
profile_init_manager_ = std::make_unique<ProfileInitManager>(this, profile);
|
||||
|
||||
@@ -360,7 +360,7 @@ index 61da14e26c4db..2334d0fab04b5 100644
|
||||
// Execute first run specific code after the PrefService has been initialized
|
||||
// and preferences have been registered since some of the import code depends
|
||||
// on preferences.
|
||||
@@ -1594,7 +1603,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
@@ -1599,7 +1608,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -369,7 +369,7 @@ index 61da14e26c4db..2334d0fab04b5 100644
|
||||
// Registers Chrome with the Windows Restart Manager, which will restore the
|
||||
// Chrome session when the computer is restarted after a system update.
|
||||
// This could be run as late as WM_QUERYENDSESSION for system update reboots,
|
||||
@@ -1697,6 +1706,11 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
@@ -1702,6 +1711,11 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
g_browser_process->profile_manager()->GetLastOpenedProfiles();
|
||||
}
|
||||
#endif
|
||||
@@ -381,7 +381,7 @@ index 61da14e26c4db..2334d0fab04b5 100644
|
||||
// This step is costly.
|
||||
if (browser_creator_->Start(*base::CommandLine::ForCurrentProcess(),
|
||||
base::FilePath(), profile_info,
|
||||
@@ -1724,11 +1738,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
@@ -1729,11 +1743,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
|
||||
// Create the RunLoop for MainMessageLoopRun() to use and transfer
|
||||
// ownership of the browser's lifetime to the BrowserProcess.
|
||||
@@ -433,7 +433,7 @@ index e26e3625c99c8..c0d4a95607e37 100644
|
||||
+#endif
|
||||
}
|
||||
diff --git chrome/browser/chrome_content_browser_client.cc chrome/browser/chrome_content_browser_client.cc
|
||||
index 5b8b1bf1bc86e..8d2274c606ef4 100644
|
||||
index 3ebb85bbe3c48..896b131108218 100644
|
||||
--- chrome/browser/chrome_content_browser_client.cc
|
||||
+++ chrome/browser/chrome_content_browser_client.cc
|
||||
@@ -48,6 +48,7 @@
|
||||
@@ -444,7 +444,7 @@ index 5b8b1bf1bc86e..8d2274c606ef4 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"
|
||||
@@ -1494,6 +1495,8 @@ ChromeContentBrowserClient::GetPopupNavigationDelegateFactoryForTesting() {
|
||||
@@ -1504,6 +1505,8 @@ ChromeContentBrowserClient::GetPopupNavigationDelegateFactoryForTesting() {
|
||||
}
|
||||
|
||||
ChromeContentBrowserClient::ChromeContentBrowserClient() {
|
||||
@@ -453,7 +453,7 @@ index 5b8b1bf1bc86e..8d2274c606ef4 100644
|
||||
#if BUILDFLAG(ENABLE_PLUGINS)
|
||||
extra_parts_.push_back(
|
||||
std::make_unique<ChromeContentBrowserClientPluginsPart>());
|
||||
@@ -1531,6 +1534,11 @@ ChromeContentBrowserClient::~ChromeContentBrowserClient() {
|
||||
@@ -1541,6 +1544,11 @@ ChromeContentBrowserClient::~ChromeContentBrowserClient() {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -465,7 +465,7 @@ index 5b8b1bf1bc86e..8d2274c606ef4 100644
|
||||
// static
|
||||
void ChromeContentBrowserClient::RegisterLocalStatePrefs(
|
||||
PrefRegistrySimple* registry) {
|
||||
@@ -4792,9 +4800,11 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated(
|
||||
@@ -4837,9 +4845,11 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated(
|
||||
&search::HandleNewTabURLReverseRewrite);
|
||||
#endif // BUILDFLAG(IS_ANDROID)
|
||||
|
||||
@@ -477,7 +477,7 @@ index 5b8b1bf1bc86e..8d2274c606ef4 100644
|
||||
}
|
||||
|
||||
base::FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() {
|
||||
@@ -6876,7 +6886,7 @@ void ChromeContentBrowserClient::OnNetworkServiceCreated(
|
||||
@@ -6926,7 +6936,7 @@ void ChromeContentBrowserClient::OnNetworkServiceCreated(
|
||||
}
|
||||
}
|
||||
|
||||
@@ -486,7 +486,7 @@ index 5b8b1bf1bc86e..8d2274c606ef4 100644
|
||||
content::BrowserContext* context,
|
||||
bool in_memory,
|
||||
const base::FilePath& relative_partition_path,
|
||||
@@ -6894,6 +6904,8 @@ void ChromeContentBrowserClient::ConfigureNetworkContextParams(
|
||||
@@ -6944,6 +6954,8 @@ void ChromeContentBrowserClient::ConfigureNetworkContextParams(
|
||||
network_context_params->user_agent = GetUserAgentBasedOnPolicy(context);
|
||||
network_context_params->accept_language = GetApplicationLocale();
|
||||
}
|
||||
@@ -495,7 +495,7 @@ index 5b8b1bf1bc86e..8d2274c606ef4 100644
|
||||
}
|
||||
|
||||
std::vector<base::FilePath>
|
||||
@@ -8032,11 +8044,11 @@ void ChromeContentBrowserClient::OnKeepaliveRequestStarted(
|
||||
@@ -8084,11 +8096,11 @@ void ChromeContentBrowserClient::OnKeepaliveRequestStarted(
|
||||
const auto now = base::TimeTicks::Now();
|
||||
const auto timeout = GetKeepaliveTimerTimeout(context);
|
||||
keepalive_deadline_ = std::max(keepalive_deadline_, now + timeout);
|
||||
@@ -509,7 +509,7 @@ index 5b8b1bf1bc86e..8d2274c606ef4 100644
|
||||
FROM_HERE, keepalive_deadline_ - now,
|
||||
base::BindOnce(
|
||||
&ChromeContentBrowserClient::OnKeepaliveTimerFired,
|
||||
@@ -8058,7 +8070,8 @@ void ChromeContentBrowserClient::OnKeepaliveRequestFinished() {
|
||||
@@ -8110,7 +8122,8 @@ void ChromeContentBrowserClient::OnKeepaliveRequestFinished() {
|
||||
--num_keepalive_requests_;
|
||||
if (num_keepalive_requests_ == 0) {
|
||||
DVLOG(1) << "Stopping the keepalive timer";
|
||||
@@ -519,7 +519,7 @@ index 5b8b1bf1bc86e..8d2274c606ef4 100644
|
||||
// This deletes the keep alive handle attached to the timer function and
|
||||
// unblock the shutdown sequence.
|
||||
}
|
||||
@@ -8236,7 +8249,7 @@ void ChromeContentBrowserClient::OnKeepaliveTimerFired(
|
||||
@@ -8288,7 +8301,7 @@ void ChromeContentBrowserClient::OnKeepaliveTimerFired(
|
||||
const auto now = base::TimeTicks::Now();
|
||||
const auto then = keepalive_deadline_;
|
||||
if (now < then) {
|
||||
@@ -529,7 +529,7 @@ index 5b8b1bf1bc86e..8d2274c606ef4 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 3542dd8ea5593..dfd89fec1e4a6 100644
|
||||
index c944bdaf9bbbe..a9e7bd1139c07 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 3542dd8ea5593..dfd89fec1e4a6 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.
|
||||
@@ -730,7 +732,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
|
||||
@@ -733,7 +735,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
|
||||
override;
|
||||
void OnNetworkServiceCreated(
|
||||
network::mojom::NetworkService* network_service) override;
|
||||
@@ -550,7 +550,7 @@ index 3542dd8ea5593..dfd89fec1e4a6 100644
|
||||
content::BrowserContext* context,
|
||||
bool in_memory,
|
||||
const base::FilePath& relative_partition_path,
|
||||
@@ -1358,7 +1360,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
|
||||
@@ -1370,7 +1372,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
uint64_t num_keepalive_requests_ = 0;
|
||||
@@ -560,7 +560,7 @@ index 3542dd8ea5593..dfd89fec1e4a6 100644
|
||||
#endif
|
||||
|
||||
diff --git chrome/browser/prefs/browser_prefs.cc chrome/browser/prefs/browser_prefs.cc
|
||||
index 7393b3400afe4..e19f464f67640 100644
|
||||
index 9a00400829ae1..b0007362043bc 100644
|
||||
--- chrome/browser/prefs/browser_prefs.cc
|
||||
+++ chrome/browser/prefs/browser_prefs.cc
|
||||
@@ -15,6 +15,7 @@
|
||||
@@ -571,7 +571,7 @@ index 7393b3400afe4..e19f464f67640 100644
|
||||
#include "chrome/browser/about_flags.h"
|
||||
#include "chrome/browser/accessibility/accessibility_labels_service.h"
|
||||
#include "chrome/browser/accessibility/invert_bubble_prefs.h"
|
||||
@@ -208,6 +209,10 @@
|
||||
@@ -217,6 +218,10 @@
|
||||
#include "extensions/browser/pref_names.h"
|
||||
#endif // BUILDFLAG(ENABLE_EXTENSIONS_CORE)
|
||||
|
||||
@@ -582,7 +582,7 @@ index 7393b3400afe4..e19f464f67640 100644
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
#include "chrome/browser/accessibility/animation_policy_prefs.h"
|
||||
#include "chrome/browser/apps/platform_apps/shortcut_manager.h"
|
||||
@@ -1830,6 +1835,11 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
|
||||
@@ -1856,6 +1861,11 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
|
||||
|
||||
// This is intentionally last.
|
||||
RegisterLocalStatePrefsForMigration(registry);
|
||||
@@ -594,7 +594,7 @@ index 7393b3400afe4..e19f464f67640 100644
|
||||
}
|
||||
|
||||
// Register prefs applicable to all profiles.
|
||||
@@ -2271,6 +2281,10 @@ void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
|
||||
@@ -2305,6 +2315,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 99056d7aff8c7..2741155416953 100644
|
||||
index 6f2feda3e7920..83650e01ce8a2 100644
|
||||
--- chrome/browser/ui/browser_command_controller.cc
|
||||
+++ chrome/browser/ui/browser_command_controller.cc
|
||||
@@ -441,6 +441,7 @@ bool BrowserCommandController::ExecuteCommandWithDisposition(
|
||||
@@ -458,6 +458,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 99056d7aff8c7..2741155416953 100644
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -458,6 +459,13 @@ bool BrowserCommandController::ExecuteCommandWithDisposition(
|
||||
@@ -475,6 +476,13 @@ bool BrowserCommandController::ExecuteCommandWithDisposition(
|
||||
DCHECK(command_updater_.IsCommandEnabled(id))
|
||||
<< "Invalid/disabled command " << id;
|
||||
|
||||
@@ -24,7 +24,7 @@ index 99056d7aff8c7..2741155416953 100644
|
||||
// The order of commands in this switch statement must match the function
|
||||
// declaration order in browser.h!
|
||||
switch (id) {
|
||||
@@ -1271,11 +1279,13 @@ void BrowserCommandController::TabRestoreServiceLoaded(
|
||||
@@ -1313,11 +1321,13 @@ void BrowserCommandController::TabRestoreServiceLoaded(
|
||||
// BrowserCommandController, private:
|
||||
|
||||
bool BrowserCommandController::IsShowingMainUI() {
|
||||
@@ -40,27 +40,11 @@ index 99056d7aff8c7..2741155416953 100644
|
||||
}
|
||||
|
||||
void BrowserCommandController::InitCommandState() {
|
||||
@@ -1523,11 +1533,12 @@ void BrowserCommandController::InitCommandState() {
|
||||
#if BUILDFLAG(ENABLE_GLIC)
|
||||
// Glic commands.
|
||||
command_updater_.UpdateCommandEnabled(
|
||||
- IDC_GLIC_TOGGLE_PIN, glic::GlicEnabling::IsProfileEligible(profile()));
|
||||
+ IDC_GLIC_TOGGLE_PIN, glic::GlicEnabling::IsEnabledForProfile(profile()));
|
||||
command_updater_.UpdateCommandEnabled(
|
||||
- IDC_OPEN_GLIC, glic::GlicEnabling::IsProfileEligible(profile()));
|
||||
+ IDC_OPEN_GLIC, glic::GlicEnabling::IsEnabledForProfile(profile()));
|
||||
command_updater_.UpdateCommandEnabled(
|
||||
- IDC_GLIC_TOGGLE_FOCUS, glic::GlicEnabling::IsProfileEligible(profile()));
|
||||
+ IDC_GLIC_TOGGLE_FOCUS,
|
||||
+ glic::GlicEnabling::IsEnabledForProfile(profile()));
|
||||
#endif
|
||||
|
||||
// Initialize other commands whose state changes based on various conditions.
|
||||
diff --git chrome/browser/ui/toolbar/app_menu_model.cc chrome/browser/ui/toolbar/app_menu_model.cc
|
||||
index 3dc212eb62ae8..4191ffa5f52a8 100644
|
||||
index 0ac99f7c90ac8..41edc0a895a44 100644
|
||||
--- chrome/browser/ui/toolbar/app_menu_model.cc
|
||||
+++ chrome/browser/ui/toolbar/app_menu_model.cc
|
||||
@@ -736,10 +736,12 @@ FindAndEditSubMenuModel::FindAndEditSubMenuModel(
|
||||
@@ -722,10 +722,12 @@ FindAndEditSubMenuModel::FindAndEditSubMenuModel(
|
||||
ui::SimpleMenuModel::Delegate* delegate)
|
||||
: SimpleMenuModel(delegate) {
|
||||
AddItemWithStringIdAndVectorIcon(this, IDC_FIND, IDS_FIND, kSearchMenuIcon);
|
||||
@@ -73,7 +57,7 @@ index 3dc212eb62ae8..4191ffa5f52a8 100644
|
||||
}
|
||||
|
||||
class SaveAndShareSubMenuModel : public ui::SimpleMenuModel {
|
||||
@@ -804,6 +806,57 @@ SaveAndShareSubMenuModel::SaveAndShareSubMenuModel(
|
||||
@@ -790,6 +792,57 @@ SaveAndShareSubMenuModel::SaveAndShareSubMenuModel(
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,7 +115,7 @@ index 3dc212eb62ae8..4191ffa5f52a8 100644
|
||||
} // namespace
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -1748,7 +1801,7 @@ bool AppMenuModel::IsCommandIdChecked(int command_id) const {
|
||||
@@ -1735,7 +1788,7 @@ bool AppMenuModel::IsCommandIdChecked(int command_id) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -140,7 +124,7 @@ index 3dc212eb62ae8..4191ffa5f52a8 100644
|
||||
GlobalError* error =
|
||||
GlobalErrorServiceFactory::GetForProfile(browser_->profile())
|
||||
->GetGlobalErrorByMenuItemCommandID(command_id);
|
||||
@@ -1764,6 +1817,30 @@ bool AppMenuModel::IsCommandIdEnabled(int command_id) const {
|
||||
@@ -1751,6 +1804,30 @@ bool AppMenuModel::IsCommandIdEnabled(int command_id) const {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -171,7 +155,7 @@ index 3dc212eb62ae8..4191ffa5f52a8 100644
|
||||
bool AppMenuModel::IsCommandIdAlerted(int command_id) const {
|
||||
if (command_id == IDC_VIEW_PASSWORDS ||
|
||||
command_id == IDC_SHOW_PASSWORD_MANAGER) {
|
||||
@@ -1919,8 +1996,10 @@ void AppMenuModel::Build() {
|
||||
@@ -1914,8 +1991,10 @@ void AppMenuModel::Build() {
|
||||
IDS_CLEAR_BROWSING_DATA,
|
||||
kTrashCanRefreshIcon);
|
||||
|
||||
@@ -182,7 +166,7 @@ index 3dc212eb62ae8..4191ffa5f52a8 100644
|
||||
AddSeparator(ui::NORMAL_SEPARATOR);
|
||||
|
||||
AddItemWithStringIdAndVectorIcon(this, IDC_PRINT, IDS_PRINT, kPrintMenuIcon);
|
||||
@@ -2028,6 +2107,11 @@ void AppMenuModel::Build() {
|
||||
@@ -2026,6 +2105,11 @@ void AppMenuModel::Build() {
|
||||
}
|
||||
#endif // !BUILDFLAG(IS_CHROMEOS)
|
||||
|
||||
@@ -195,10 +179,10 @@ index 3dc212eb62ae8..4191ffa5f52a8 100644
|
||||
}
|
||||
|
||||
diff --git chrome/browser/ui/toolbar/app_menu_model.h chrome/browser/ui/toolbar/app_menu_model.h
|
||||
index e65c121f225d5..5dddcf5d63555 100644
|
||||
index ec1f1a15c682e..23163078693fb 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,
|
||||
@@ -233,6 +233,7 @@ class AppMenuModel : public ui::SimpleMenuModel,
|
||||
void ExecuteCommand(int command_id, int event_flags) override;
|
||||
bool IsCommandIdChecked(int command_id) const override;
|
||||
bool IsCommandIdEnabled(int command_id) const override;
|
||||
@@ -206,7 +190,7 @@ index e65c121f225d5..5dddcf5d63555 100644
|
||||
bool IsCommandIdAlerted(int command_id) const override;
|
||||
bool IsElementIdAlerted(ui::ElementIdentifier element_id) const override;
|
||||
bool GetAcceleratorForCommandId(int command_id,
|
||||
@@ -272,6 +273,8 @@ class AppMenuModel : public ui::SimpleMenuModel,
|
||||
@@ -273,6 +274,8 @@ class AppMenuModel : public ui::SimpleMenuModel,
|
||||
void LogSafetyHubInteractionMetrics(safety_hub::SafetyHubModuleType sh_module,
|
||||
int event_flags);
|
||||
|
||||
@@ -235,7 +219,7 @@ index 603a95238c562..dd397451bed5a 100644
|
||||
return gfx::Rect();
|
||||
}
|
||||
diff --git chrome/browser/ui/views/frame/browser_frame.cc chrome/browser/ui/views/frame/browser_frame.cc
|
||||
index 55788d3552a4a..09e526e8e7cda 100644
|
||||
index 1556caf117746..aa859c8ec0c22 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(
|
||||
@@ -266,7 +250,7 @@ index 55788d3552a4a..09e526e8e7cda 100644
|
||||
}
|
||||
|
||||
BrowserFrame::~BrowserFrame() = default;
|
||||
@@ -228,10 +238,20 @@ void BrowserFrame::LayoutWebAppWindowTitle(
|
||||
@@ -229,10 +239,20 @@ void BrowserFrame::LayoutWebAppWindowTitle(
|
||||
}
|
||||
|
||||
int BrowserFrame::GetTopInset() const {
|
||||
@@ -287,7 +271,7 @@ index 55788d3552a4a..09e526e8e7cda 100644
|
||||
browser_frame_view_->UpdateThrobber(running);
|
||||
}
|
||||
|
||||
@@ -240,6 +260,8 @@ BrowserNonClientFrameView* BrowserFrame::GetFrameView() const {
|
||||
@@ -241,6 +261,8 @@ BrowserNonClientFrameView* BrowserFrame::GetFrameView() const {
|
||||
}
|
||||
|
||||
bool BrowserFrame::UseCustomFrame() const {
|
||||
@@ -296,7 +280,7 @@ index 55788d3552a4a..09e526e8e7cda 100644
|
||||
return native_browser_frame_->UseCustomFrame();
|
||||
}
|
||||
|
||||
@@ -254,20 +276,30 @@ bool BrowserFrame::ShouldDrawFrameHeader() const {
|
||||
@@ -255,20 +277,30 @@ bool BrowserFrame::ShouldDrawFrameHeader() const {
|
||||
void BrowserFrame::GetWindowPlacement(
|
||||
gfx::Rect* bounds,
|
||||
ui::mojom::WindowShowState* show_state) const {
|
||||
@@ -327,7 +311,7 @@ index 55788d3552a4a..09e526e8e7cda 100644
|
||||
browser_frame_view_->OnBrowserViewInitViewsComplete();
|
||||
}
|
||||
|
||||
@@ -367,6 +399,8 @@ ui::ColorProviderKey::ThemeInitializerSupplier* BrowserFrame::GetCustomTheme()
|
||||
@@ -368,6 +400,8 @@ ui::ColorProviderKey::ThemeInitializerSupplier* BrowserFrame::GetCustomTheme()
|
||||
}
|
||||
|
||||
void BrowserFrame::OnNativeWidgetWorkspaceChanged() {
|
||||
@@ -336,7 +320,7 @@ index 55788d3552a4a..09e526e8e7cda 100644
|
||||
chrome::SaveWindowWorkspace(browser_view_->browser(), GetWorkspace());
|
||||
chrome::SaveWindowVisibleOnAllWorkspaces(browser_view_->browser(),
|
||||
IsVisibleOnAllWorkspaces());
|
||||
@@ -577,6 +611,13 @@ void BrowserFrame::SelectNativeTheme() {
|
||||
@@ -578,6 +612,13 @@ void BrowserFrame::SelectNativeTheme() {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -350,7 +334,7 @@ index 55788d3552a4a..09e526e8e7cda 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:
|
||||
@@ -642,5 +683,8 @@ bool BrowserFrame::RegenerateFrameOnThemeChange(
|
||||
@@ -643,5 +684,8 @@ bool BrowserFrame::RegenerateFrameOnThemeChange(
|
||||
}
|
||||
|
||||
bool BrowserFrame::IsIncognitoBrowser() const {
|
||||
@@ -413,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 ac0264a452780..1cb030a738ca8 100644
|
||||
index 3c0e53b5ade77..d7ca16e2c41cc 100644
|
||||
--- chrome/browser/ui/views/frame/browser_view.cc
|
||||
+++ chrome/browser/ui/views/frame/browser_view.cc
|
||||
@@ -363,10 +363,6 @@ using web_modal::WebContentsModalDialogHost;
|
||||
@@ -368,10 +368,6 @@ using web_modal::WebContentsModalDialogHost;
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -427,7 +411,7 @@ index ac0264a452780..1cb030a738ca8 100644
|
||||
// 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 {
|
||||
@@ -813,6 +809,14 @@ class BrowserViewLayoutDelegateImpl : public BrowserViewLayoutDelegate {
|
||||
return browser_view_->frame()->GetTopInset() - browser_view_->y();
|
||||
}
|
||||
|
||||
@@ -442,7 +426,7 @@ index ac0264a452780..1cb030a738ca8 100644
|
||||
bool IsToolbarVisible() const override {
|
||||
return browser_view_->IsToolbarVisible();
|
||||
}
|
||||
@@ -940,11 +944,21 @@ class BrowserView::AccessibilityModeObserver : public ui::AXModeObserver {
|
||||
@@ -937,11 +941,21 @@ class BrowserView::AccessibilityModeObserver : public ui::AXModeObserver {
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// BrowserView, public:
|
||||
|
||||
@@ -465,8 +449,8 @@ index ac0264a452780..1cb030a738ca8 100644
|
||||
SetShowIcon(::ShouldShowWindowIcon(
|
||||
browser_.get(), AppUsesWindowControlsOverlay(), AppUsesTabbed()));
|
||||
|
||||
@@ -1097,8 +1111,15 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
|
||||
contents_scrim_view_, nullptr, watermark_view_));
|
||||
@@ -1091,8 +1105,15 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
|
||||
lens_overlay_view_, contents_scrim_view_, nullptr, watermark_view_));
|
||||
#endif
|
||||
|
||||
- toolbar_ = top_container_->AddChildView(
|
||||
@@ -483,7 +467,7 @@ index ac0264a452780..1cb030a738ca8 100644
|
||||
|
||||
contents_separator_ =
|
||||
top_container_->AddChildView(std::make_unique<ContentsSeparator>());
|
||||
@@ -1164,18 +1185,22 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
|
||||
@@ -1158,18 +1179,22 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
|
||||
}
|
||||
|
||||
BrowserView::~BrowserView() {
|
||||
@@ -506,7 +490,7 @@ index ac0264a452780..1cb030a738ca8 100644
|
||||
|
||||
tab_search_bubble_host_.reset();
|
||||
|
||||
@@ -1183,9 +1208,11 @@ BrowserView::~BrowserView() {
|
||||
@@ -1177,9 +1202,11 @@ BrowserView::~BrowserView() {
|
||||
// tabstrip model and the browser frame.
|
||||
top_controls_slide_controller_.reset();
|
||||
|
||||
@@ -518,7 +502,7 @@ index ac0264a452780..1cb030a738ca8 100644
|
||||
|
||||
// Stop the animation timer explicitly here to avoid running it in a nested
|
||||
// message loop, which may run by Browser destructor.
|
||||
@@ -1194,17 +1221,18 @@ BrowserView::~BrowserView() {
|
||||
@@ -1188,17 +1215,18 @@ BrowserView::~BrowserView() {
|
||||
// Immersive mode may need to reparent views before they are removed/deleted.
|
||||
immersive_mode_controller_.reset();
|
||||
|
||||
@@ -541,7 +525,7 @@ index ac0264a452780..1cb030a738ca8 100644
|
||||
|
||||
// These are raw pointers to child views, so they need to be set to null
|
||||
// before `RemoveAllChildViews()` is called to avoid dangling.
|
||||
@@ -1865,6 +1893,28 @@ gfx::Point BrowserView::GetThemeOffsetFromBrowserView() const {
|
||||
@@ -1899,6 +1927,28 @@ gfx::Point BrowserView::GetThemeOffsetFromBrowserView() const {
|
||||
ThemeProperties::kFrameHeightAboveTabs - browser_view_origin.y());
|
||||
}
|
||||
|
||||
@@ -570,7 +554,7 @@ index ac0264a452780..1cb030a738ca8 100644
|
||||
// static:
|
||||
BrowserView::DevToolsDockedPlacement BrowserView::GetDevToolsDockedPlacement(
|
||||
const gfx::Rect& contents_webview_bounds,
|
||||
@@ -2300,7 +2350,13 @@ void BrowserView::OnExclusiveAccessUserInput() {
|
||||
@@ -2345,7 +2395,13 @@ void BrowserView::OnExclusiveAccessUserInput() {
|
||||
|
||||
bool BrowserView::ShouldHideUIForFullscreen() const {
|
||||
// Immersive mode needs UI for the slide-down top panel.
|
||||
@@ -585,7 +569,7 @@ index ac0264a452780..1cb030a738ca8 100644
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -3527,6 +3583,9 @@ views::View* BrowserView::GetLensOverlayView() {
|
||||
@@ -3576,6 +3632,9 @@ views::View* BrowserView::GetLensOverlayView() {
|
||||
}
|
||||
|
||||
DownloadBubbleUIController* BrowserView::GetDownloadBubbleUIController() {
|
||||
@@ -595,7 +579,7 @@ index ac0264a452780..1cb030a738ca8 100644
|
||||
if (auto* download_controller =
|
||||
browser_->GetFeatures().download_toolbar_ui_controller()) {
|
||||
return download_controller->bubble_controller();
|
||||
@@ -4216,7 +4275,9 @@ void BrowserView::ReparentTopContainerForEndOfImmersive() {
|
||||
@@ -4341,7 +4400,9 @@ void BrowserView::ReparentTopContainerForEndOfImmersive() {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -605,7 +589,7 @@ index ac0264a452780..1cb030a738ca8 100644
|
||||
top_container()->DestroyLayer();
|
||||
AddChildViewAt(top_container(), 0);
|
||||
EnsureFocusOrder();
|
||||
@@ -4754,11 +4815,38 @@ void BrowserView::GetAccessiblePanes(std::vector<views::View*>* panes) {
|
||||
@@ -4882,11 +4943,38 @@ void BrowserView::GetAccessiblePanes(std::vector<views::View*>* panes) {
|
||||
bool BrowserView::ShouldDescendIntoChildForEventHandling(
|
||||
gfx::NativeView child,
|
||||
const gfx::Point& location) {
|
||||
@@ -646,7 +630,7 @@ index ac0264a452780..1cb030a738ca8 100644
|
||||
// Draggable regions are defined relative to the web contents.
|
||||
gfx::Point point_in_contents_web_view_coords(location);
|
||||
views::View::ConvertPointToTarget(GetWidget()->GetRootView(),
|
||||
@@ -4767,7 +4855,7 @@ bool BrowserView::ShouldDescendIntoChildForEventHandling(
|
||||
@@ -4895,7 +4983,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.
|
||||
@@ -655,7 +639,7 @@ index ac0264a452780..1cb030a738ca8 100644
|
||||
point_in_contents_web_view_coords.x(),
|
||||
point_in_contents_web_view_coords.y()) ||
|
||||
WidgetOwnedByAnchorContainsPoint(point_in_contents_web_view_coords);
|
||||
@@ -4999,8 +5087,11 @@ void BrowserView::Layout(PassKey) {
|
||||
@@ -5127,8 +5215,11 @@ void BrowserView::Layout(PassKey) {
|
||||
|
||||
// TODO(jamescook): Why was this in the middle of layout code?
|
||||
toolbar_->location_bar()->omnibox_view()->SetFocusBehavior(
|
||||
@@ -668,7 +652,7 @@ index ac0264a452780..1cb030a738ca8 100644
|
||||
|
||||
// Some of the situations when the BrowserView is laid out are:
|
||||
// - Enter/exit immersive fullscreen mode.
|
||||
@@ -5067,6 +5158,12 @@ void BrowserView::AddedToWidget() {
|
||||
@@ -5195,6 +5286,12 @@ void BrowserView::AddedToWidget() {
|
||||
SetThemeProfileForWindow(GetNativeWindow(), browser_->profile());
|
||||
#endif
|
||||
|
||||
@@ -681,7 +665,7 @@ index ac0264a452780..1cb030a738ca8 100644
|
||||
toolbar_->Init();
|
||||
|
||||
if (GetIsNormalType()) {
|
||||
@@ -5123,12 +5220,6 @@ void BrowserView::AddedToWidget() {
|
||||
@@ -5254,12 +5351,6 @@ void BrowserView::AddedToWidget() {
|
||||
|
||||
EnsureFocusOrder();
|
||||
|
||||
@@ -694,7 +678,7 @@ index ac0264a452780..1cb030a738ca8 100644
|
||||
if (download::IsDownloadBubbleEnabled()) {
|
||||
browser_->GetFeatures().download_toolbar_ui_controller()->Init();
|
||||
}
|
||||
@@ -5139,7 +5230,9 @@ void BrowserView::AddedToWidget() {
|
||||
@@ -5270,7 +5361,9 @@ void BrowserView::AddedToWidget() {
|
||||
}
|
||||
|
||||
frame_->OnBrowserViewInitViewsComplete();
|
||||
@@ -704,7 +688,7 @@ index ac0264a452780..1cb030a738ca8 100644
|
||||
using_native_frame_ = frame_->ShouldUseNativeFrame();
|
||||
|
||||
MaybeInitializeWebUITabStrip();
|
||||
@@ -5556,7 +5649,9 @@ void BrowserView::ProcessFullscreen(bool fullscreen, const int64_t display_id) {
|
||||
@@ -5692,7 +5785,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);
|
||||
@@ -714,7 +698,7 @@ index ac0264a452780..1cb030a738ca8 100644
|
||||
}
|
||||
|
||||
void BrowserView::RequestFullscreen(bool fullscreen, int64_t display_id) {
|
||||
@@ -6060,7 +6155,9 @@ Profile* BrowserView::GetProfile() {
|
||||
@@ -6204,7 +6299,9 @@ Profile* BrowserView::GetProfile() {
|
||||
}
|
||||
|
||||
void BrowserView::UpdateUIForTabFullscreen() {
|
||||
@@ -724,7 +708,7 @@ index ac0264a452780..1cb030a738ca8 100644
|
||||
}
|
||||
|
||||
WebContents* BrowserView::GetWebContentsForExclusiveAccess() {
|
||||
@@ -6089,6 +6186,9 @@ bool BrowserView::CanUserEnterFullscreen() const {
|
||||
@@ -6233,6 +6330,9 @@ bool BrowserView::CanUserEnterFullscreen() const {
|
||||
}
|
||||
|
||||
bool BrowserView::CanUserExitFullscreen() const {
|
||||
@@ -735,10 +719,10 @@ index ac0264a452780..1cb030a738ca8 100644
|
||||
}
|
||||
|
||||
diff --git chrome/browser/ui/views/frame/browser_view.h chrome/browser/ui/views/frame/browser_view.h
|
||||
index 7a2f7b5d43762..ef55ed7e6cd43 100644
|
||||
index 8a06d49d2abe1..7874429a9a090 100644
|
||||
--- chrome/browser/ui/views/frame/browser_view.h
|
||||
+++ chrome/browser/ui/views/frame/browser_view.h
|
||||
@@ -144,11 +144,16 @@ class BrowserView : public BrowserWindow,
|
||||
@@ -148,11 +148,16 @@ class BrowserView : public BrowserWindow,
|
||||
METADATA_HEADER(BrowserView, views::ClientView)
|
||||
|
||||
public:
|
||||
@@ -755,7 +739,7 @@ index 7a2f7b5d43762..ef55ed7e6cd43 100644
|
||||
void set_frame(BrowserFrame* frame) {
|
||||
frame_ = frame;
|
||||
paint_as_active_subscription_ =
|
||||
@@ -911,6 +916,10 @@ class BrowserView : public BrowserWindow,
|
||||
@@ -938,6 +943,10 @@ class BrowserView : public BrowserWindow,
|
||||
void Copy();
|
||||
void Paste();
|
||||
|
||||
@@ -766,7 +750,7 @@ index 7a2f7b5d43762..ef55ed7e6cd43 100644
|
||||
protected:
|
||||
// Enumerates where the devtools are docked relative to the browser's main
|
||||
// web contents.
|
||||
@@ -934,6 +943,8 @@ class BrowserView : public BrowserWindow,
|
||||
@@ -961,6 +970,8 @@ class BrowserView : public BrowserWindow,
|
||||
const gfx::Rect& contents_webview_bounds,
|
||||
const gfx::Rect& local_webview_container_bounds);
|
||||
|
||||
@@ -776,7 +760,7 @@ index 7a2f7b5d43762..ef55ed7e6cd43 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 7cfadb577326f..5d97370b499c7 100644
|
||||
index 39fc0f21ff96c..4b575fd3877d5 100644
|
||||
--- chrome/browser/ui/views/frame/browser_view_layout.cc
|
||||
+++ chrome/browser/ui/views/frame/browser_view_layout.cc
|
||||
@@ -53,6 +53,10 @@
|
||||
@@ -833,7 +817,7 @@ index 7cfadb577326f..5d97370b499c7 100644
|
||||
// Add/remove observer.
|
||||
void AddObserver(ModalDialogHostObserver* observer) override {
|
||||
observer_list_.AddObserver(observer);
|
||||
@@ -362,6 +377,8 @@ void BrowserViewLayout::Layout(views::View* browser_view) {
|
||||
@@ -361,6 +376,8 @@ void BrowserViewLayout::Layout(views::View* browser_view) {
|
||||
exclusive_access_bubble->RepositionIfVisible();
|
||||
}
|
||||
|
||||
@@ -842,7 +826,7 @@ index 7cfadb577326f..5d97370b499c7 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());
|
||||
@@ -375,6 +392,7 @@ void BrowserViewLayout::Layout(views::View* browser_view) {
|
||||
@@ -374,6 +391,7 @@ void BrowserViewLayout::Layout(views::View* browser_view) {
|
||||
latest_dialog_bounds_in_screen_ = dialog_bounds_in_screen;
|
||||
dialog_host_->NotifyPositionRequiresUpdate();
|
||||
}
|
||||
@@ -850,7 +834,7 @@ index 7cfadb577326f..5d97370b499c7 100644
|
||||
}
|
||||
|
||||
gfx::Size BrowserViewLayout::GetPreferredSize(
|
||||
@@ -511,6 +529,13 @@ int BrowserViewLayout::LayoutWebUITabStrip(int top) {
|
||||
@@ -510,6 +528,13 @@ int BrowserViewLayout::LayoutWebUITabStrip(int top) {
|
||||
|
||||
int BrowserViewLayout::LayoutToolbar(int top) {
|
||||
TRACE_EVENT0("ui", "BrowserViewLayout::LayoutToolbar");
|
||||
@@ -865,19 +849,19 @@ index 7cfadb577326f..5d97370b499c7 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 bab68486e2005..5e988918b9553 100644
|
||||
index a4602bd1f5d01..1c0435c03d323 100644
|
||||
--- chrome/browser/ui/views/frame/browser_view_layout.h
|
||||
+++ chrome/browser/ui/views/frame/browser_view_layout.h
|
||||
@@ -86,6 +86,8 @@ class BrowserViewLayout : public views::LayoutManager {
|
||||
contents_border_widget_ = contents_border_widget;
|
||||
@@ -87,6 +87,8 @@ class BrowserViewLayout : public views::LayoutManager {
|
||||
}
|
||||
views::Widget* contents_border_widget() { return contents_border_widget_; }
|
||||
|
||||
+ void reset_toolbar() { toolbar_ = nullptr; }
|
||||
+
|
||||
views::Widget* contents_border_widget() { return contents_border_widget_; }
|
||||
void SetUseBrowserContentMinimumSize(bool use_browser_content_minimum_size);
|
||||
|
||||
// Sets the bounds for the contents border.
|
||||
@@ -176,7 +178,7 @@ class BrowserViewLayout : public views::LayoutManager {
|
||||
@@ -174,7 +176,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_;
|
||||
@@ -887,7 +871,7 @@ index bab68486e2005..5e988918b9553 100644
|
||||
const raw_ptr<views::View> contents_container_;
|
||||
const raw_ptr<views::View> left_aligned_side_panel_separator_;
|
||||
diff --git chrome/browser/ui/views/frame/browser_view_layout_delegate.h chrome/browser/ui/views/frame/browser_view_layout_delegate.h
|
||||
index 451c5ad63337b..66f946c95b9b4 100644
|
||||
index 9f393a42d1655..8597a655c4fac 100644
|
||||
--- chrome/browser/ui/views/frame/browser_view_layout_delegate.h
|
||||
+++ chrome/browser/ui/views/frame/browser_view_layout_delegate.h
|
||||
@@ -28,6 +28,7 @@ class BrowserViewLayoutDelegate {
|
||||
@@ -899,10 +883,10 @@ 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 09de746cc67e4..6ddb95a4de303 100644
|
||||
index d80ac44127421..f09f382e24344 100644
|
||||
--- chrome/browser/ui/views/frame/contents_web_view.cc
|
||||
+++ chrome/browser/ui/views/frame/contents_web_view.cc
|
||||
@@ -33,6 +33,12 @@ ContentsWebView::ContentsWebView(content::BrowserContext* browser_context)
|
||||
@@ -35,6 +35,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);
|
||||
@@ -916,13 +900,13 @@ index 09de746cc67e4..6ddb95a4de303 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 aacb186656d41..6987958bb6674 100644
|
||||
index 919f2496b089d..f541e3836f4fd 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
|
||||
@@ -650,6 +650,11 @@ PictureInPictureBrowserFrameView::PictureInPictureBrowserFrameView(
|
||||
frame_background_ = std::make_unique<views::FrameBackground>();
|
||||
@@ -605,6 +605,11 @@ PictureInPictureBrowserFrameView::PictureInPictureBrowserFrameView(
|
||||
auto_pip_setting_overlay_ =
|
||||
AddChildView(std::move(auto_pip_setting_overlay));
|
||||
}
|
||||
#endif
|
||||
+
|
||||
+ if (!browser_view->browser()->SupportsWindowFeature(
|
||||
+ Browser::FEATURE_TITLEBAR)) {
|
||||
@@ -931,7 +915,7 @@ index aacb186656d41..6987958bb6674 100644
|
||||
}
|
||||
|
||||
PictureInPictureBrowserFrameView::~PictureInPictureBrowserFrameView() {
|
||||
@@ -783,18 +788,42 @@ gfx::Rect PictureInPictureBrowserFrameView::GetWindowBoundsForClientBounds(
|
||||
@@ -738,18 +743,42 @@ gfx::Rect PictureInPictureBrowserFrameView::GetWindowBoundsForClientBounds(
|
||||
|
||||
int PictureInPictureBrowserFrameView::NonClientHitTest(
|
||||
const gfx::Point& point) {
|
||||
@@ -982,7 +966,7 @@ index aacb186656d41..6987958bb6674 100644
|
||||
|
||||
// Allow dragging and resizing the window.
|
||||
int window_component = GetHTComponentForFrame(
|
||||
@@ -868,7 +897,8 @@ void PictureInPictureBrowserFrameView::Layout(PassKey) {
|
||||
@@ -813,7 +842,8 @@ void PictureInPictureBrowserFrameView::Layout(PassKey) {
|
||||
gfx::Rect content_area = GetLocalBounds();
|
||||
content_area.Inset(FrameBorderInsets());
|
||||
gfx::Rect top_bar = content_area;
|
||||
@@ -992,7 +976,7 @@ index aacb186656d41..6987958bb6674 100644
|
||||
top_bar_container_view_->SetBoundsRect(top_bar);
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
if (auto_pip_setting_overlay_) {
|
||||
@@ -1418,7 +1448,8 @@ gfx::Insets PictureInPictureBrowserFrameView::ResizeBorderInsets() const {
|
||||
@@ -1280,7 +1310,8 @@ gfx::Insets PictureInPictureBrowserFrameView::FrameBorderInsets() const {
|
||||
}
|
||||
|
||||
int PictureInPictureBrowserFrameView::GetTopAreaHeight() const {
|
||||
@@ -1017,7 +1001,7 @@ 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 c0d519f033713..6df5e004f43d2 100644
|
||||
index 20c0861c46610..8cd44c0d95a17 100644
|
||||
--- chrome/browser/ui/views/page_action/page_action_icon_controller.cc
|
||||
+++ chrome/browser/ui/views/page_action/page_action_icon_controller.cc
|
||||
@@ -109,6 +109,14 @@ void PageActionIconController::Init(const PageActionIconParams& params,
|
||||
@@ -1036,10 +1020,10 @@ index c0d519f033713..6df5e004f43d2 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 9454a78b72cc3..e3aab475b2465 100644
|
||||
index 6083cd2c41420..1da3e7881016d 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(
|
||||
@@ -720,29 +720,41 @@ gfx::Range BrowserTabStripController::ListTabsInGroup(
|
||||
}
|
||||
|
||||
bool BrowserTabStripController::IsFrameCondensed() const {
|
||||
@@ -1082,10 +1066,10 @@ index 9454a78b72cc3..e3aab475b2465 100644
|
||||
}
|
||||
|
||||
diff --git chrome/browser/ui/views/toolbar/toolbar_view.cc chrome/browser/ui/views/toolbar/toolbar_view.cc
|
||||
index af3d65c89950b..f04c923a37be9 100644
|
||||
index ab1b0d88b5a37..4e776a93ee8e2 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 {
|
||||
@@ -187,7 +187,7 @@ class TabstripLikeBackground : public views::Background {
|
||||
void Paint(gfx::Canvas* canvas, views::View* view) const override {
|
||||
bool painted = TopContainerBackground::PaintThemeCustomImage(canvas, view,
|
||||
browser_view_);
|
||||
@@ -1094,7 +1078,7 @@ index af3d65c89950b..f04c923a37be9 100644
|
||||
SkColor frame_color =
|
||||
browser_view_->frame()->GetFrameView()->GetFrameColor(
|
||||
BrowserFrameActiveState::kUseCurrent);
|
||||
@@ -219,12 +219,13 @@ END_METADATA
|
||||
@@ -221,12 +221,13 @@ END_METADATA
|
||||
DEFINE_CLASS_ELEMENT_IDENTIFIER_VALUE(ToolbarView, kToolbarElementId);
|
||||
DEFINE_CLASS_ELEMENT_IDENTIFIER_VALUE(ToolbarView, kToolbarContainerElementId);
|
||||
|
||||
@@ -1110,7 +1094,7 @@ index af3d65c89950b..f04c923a37be9 100644
|
||||
SetID(VIEW_ID_TOOLBAR);
|
||||
SetProperty(views::kElementIdentifierKey, kToolbarElementId);
|
||||
|
||||
@@ -256,9 +257,24 @@ ToolbarView::~ToolbarView() {
|
||||
@@ -258,9 +259,24 @@ ToolbarView::~ToolbarView() {
|
||||
for (const auto& view_and_command : GetViewCommandMap()) {
|
||||
chrome::RemoveCommandObserver(browser_, view_and_command.second, this);
|
||||
}
|
||||
@@ -1135,7 +1119,7 @@ index af3d65c89950b..f04c923a37be9 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,7 +297,7 @@ void ToolbarView::Init() {
|
||||
@@ -283,7 +299,7 @@ void ToolbarView::Init() {
|
||||
|
||||
auto location_bar = std::make_unique<LocationBarView>(
|
||||
browser_, browser_->profile(), browser_->command_controller(), this,
|
||||
@@ -1144,7 +1128,7 @@ index af3d65c89950b..f04c923a37be9 100644
|
||||
// Make sure the toolbar shows by default.
|
||||
size_animation_.Reset(1);
|
||||
|
||||
@@ -350,7 +366,8 @@ void ToolbarView::Init() {
|
||||
@@ -356,7 +372,8 @@ void ToolbarView::Init() {
|
||||
}
|
||||
std::unique_ptr<media_router::CastToolbarButton> cast;
|
||||
if (!base::FeatureList::IsEnabled(features::kPinnedCastButton)) {
|
||||
@@ -1154,7 +1138,7 @@ index af3d65c89950b..f04c923a37be9 100644
|
||||
cast = media_router::CastToolbarButton::Create(browser_);
|
||||
}
|
||||
}
|
||||
@@ -814,7 +831,8 @@ void ToolbarView::Layout(PassKey) {
|
||||
@@ -821,7 +838,8 @@ void ToolbarView::Layout(PassKey) {
|
||||
|
||||
if (display_mode_ == DisplayMode::NORMAL) {
|
||||
LayoutCommon();
|
||||
@@ -1165,7 +1149,7 @@ index af3d65c89950b..f04c923a37be9 100644
|
||||
|
||||
if (toolbar_controller_) {
|
||||
diff --git chrome/browser/ui/views/toolbar/toolbar_view.h chrome/browser/ui/views/toolbar/toolbar_view.h
|
||||
index ed47967198d0a..681d20ade8433 100644
|
||||
index b34fdea7f98b4..58e65bb7aff07 100644
|
||||
--- chrome/browser/ui/views/toolbar/toolbar_view.h
|
||||
+++ chrome/browser/ui/views/toolbar/toolbar_view.h
|
||||
@@ -97,7 +97,8 @@ class ToolbarView : public views::AccessiblePaneView,
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git chrome/browser/ui/views/sad_tab_view.cc chrome/browser/ui/views/sad_tab_view.cc
|
||||
index 845dc1067447c..7927dd29fac6f 100644
|
||||
index 944ce2e3bfaea..6db63a7858b0e 100644
|
||||
--- chrome/browser/ui/views/sad_tab_view.cc
|
||||
+++ chrome/browser/ui/views/sad_tab_view.cc
|
||||
@@ -707,6 +707,11 @@ void SadTabView::OnBoundsChanged(const gfx::Rect& previous_bounds) {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git content/browser/devtools/devtools_instrumentation.h content/browser/devtools/devtools_instrumentation.h
|
||||
index a10ce7680779f..df174ce52288b 100644
|
||||
index dbd35f1300604..1c890c637d852 100644
|
||||
--- content/browser/devtools/devtools_instrumentation.h
|
||||
+++ content/browser/devtools/devtools_instrumentation.h
|
||||
@@ -116,7 +116,7 @@ bool ApplyUserAgentMetadataOverrides(
|
||||
|
@@ -12,7 +12,7 @@ index a28237bf93ef4..9a01b185e76f4 100644
|
||||
version.Set("V8-Version", V8_VERSION_STRING);
|
||||
std::string host = info.GetHeaderValue("host");
|
||||
diff --git content/browser/loader/navigation_url_loader_impl.cc content/browser/loader/navigation_url_loader_impl.cc
|
||||
index 085e9a60031ea..15e8ba49573e9 100644
|
||||
index 1a800194b97da..b92a789494fea 100644
|
||||
--- content/browser/loader/navigation_url_loader_impl.cc
|
||||
+++ content/browser/loader/navigation_url_loader_impl.cc
|
||||
@@ -978,7 +978,7 @@ NavigationURLLoaderImpl::CreateNonNetworkLoaderFactory(
|
||||
@@ -47,10 +47,10 @@ index 085e9a60031ea..15e8ba49573e9 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 47750f538148c..3260524e74306 100644
|
||||
index 9c36ad70531bd..3546f7f9faf4e 100644
|
||||
--- content/public/browser/content_browser_client.cc
|
||||
+++ content/public/browser/content_browser_client.cc
|
||||
@@ -1181,7 +1181,7 @@ ContentBrowserClient::CreateURLLoaderHandlerForServiceWorkerNavigationPreload(
|
||||
@@ -1180,7 +1180,7 @@ ContentBrowserClient::CreateURLLoaderHandlerForServiceWorkerNavigationPreload(
|
||||
void ContentBrowserClient::OnNetworkServiceCreated(
|
||||
network::mojom::NetworkService* network_service) {}
|
||||
|
||||
@@ -59,7 +59,7 @@ index 47750f538148c..3260524e74306 100644
|
||||
BrowserContext* context,
|
||||
bool in_memory,
|
||||
const base::FilePath& relative_partition_path,
|
||||
@@ -1190,6 +1190,7 @@ void ContentBrowserClient::ConfigureNetworkContextParams(
|
||||
@@ -1189,6 +1189,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 47750f538148c..3260524e74306 100644
|
||||
|
||||
std::vector<base::FilePath>
|
||||
diff --git content/public/browser/content_browser_client.h content/public/browser/content_browser_client.h
|
||||
index b7864a93b53a3..5b6174340e2cc 100644
|
||||
index f1fee091b84ae..8c9feee790c91 100644
|
||||
--- content/public/browser/content_browser_client.h
|
||||
+++ content/public/browser/content_browser_client.h
|
||||
@@ -1379,6 +1379,12 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
@@ -1381,6 +1381,12 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
bool opener_suppressed,
|
||||
bool* no_javascript_access);
|
||||
|
||||
@@ -84,7 +84,7 @@ index b7864a93b53a3..5b6174340e2cc 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*
|
||||
@@ -2230,7 +2236,7 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
@@ -2226,7 +2232,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 b7864a93b53a3..5b6174340e2cc 100644
|
||||
BrowserContext* context,
|
||||
bool in_memory,
|
||||
const base::FilePath& relative_partition_path,
|
||||
@@ -2472,6 +2478,22 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
@@ -2468,6 +2474,22 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
const net::IsolationInfo& isolation_info,
|
||||
mojo::PendingRemote<network::mojom::URLLoaderFactory>* out_factory);
|
||||
|
||||
@@ -116,7 +116,7 @@ index b7864a93b53a3..5b6174340e2cc 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.
|
||||
@@ -2537,6 +2559,10 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
@@ -2533,6 +2555,10 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
// Used as part of the user agent string.
|
||||
virtual std::string GetProduct();
|
||||
|
||||
@@ -166,10 +166,10 @@ index 0a5556cb6eac8..cecc0ae19bc62 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 c1d1c8a094a91..0978d3dba378f 100644
|
||||
index 5747f94527887..d54aeac829007 100644
|
||||
--- content/renderer/renderer_blink_platform_impl.cc
|
||||
+++ content/renderer/renderer_blink_platform_impl.cc
|
||||
@@ -1051,6 +1051,15 @@ SkBitmap* RendererBlinkPlatformImpl::GetSadPageBitmap() {
|
||||
@@ -1049,6 +1049,15 @@ SkBitmap* RendererBlinkPlatformImpl::GetSadPageBitmap() {
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@@ -186,10 +186,10 @@ index c1d1c8a094a91..0978d3dba378f 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 ce5aee7746ba0..082fdfaab60de 100644
|
||||
index 206b8df48273a..e10852779c209 100644
|
||||
--- content/renderer/renderer_blink_platform_impl.h
|
||||
+++ content/renderer/renderer_blink_platform_impl.h
|
||||
@@ -251,6 +251,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
|
||||
@@ -250,6 +250,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
|
||||
InertAndMinimumIntervalOfUserLevelMemoryPressureSignal() override;
|
||||
#endif // BUILDFLAG(IS_ANDROID)
|
||||
|
||||
@@ -200,10 +200,10 @@ index ce5aee7746ba0..082fdfaab60de 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 0ac15538441aa..cc0f42fc3ebbd 100644
|
||||
index 3993da6d53843..78784b4dd8842 100644
|
||||
--- content/shell/browser/shell_content_browser_client.cc
|
||||
+++ content/shell/browser/shell_content_browser_client.cc
|
||||
@@ -816,7 +816,7 @@ void ShellContentBrowserClient::OnNetworkServiceCreated(
|
||||
@@ -820,7 +820,7 @@ void ShellContentBrowserClient::OnNetworkServiceCreated(
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -212,7 +212,7 @@ index 0ac15538441aa..cc0f42fc3ebbd 100644
|
||||
BrowserContext* context,
|
||||
bool in_memory,
|
||||
const base::FilePath& relative_partition_path,
|
||||
@@ -825,6 +825,7 @@ void ShellContentBrowserClient::ConfigureNetworkContextParams(
|
||||
@@ -829,6 +829,7 @@ void ShellContentBrowserClient::ConfigureNetworkContextParams(
|
||||
cert_verifier_creation_params) {
|
||||
ConfigureNetworkContextParamsForShell(context, network_context_params,
|
||||
cert_verifier_creation_params);
|
||||
@@ -221,10 +221,10 @@ index 0ac15538441aa..cc0f42fc3ebbd 100644
|
||||
|
||||
std::vector<base::FilePath>
|
||||
diff --git content/shell/browser/shell_content_browser_client.h content/shell/browser/shell_content_browser_client.h
|
||||
index 0a99e5b919cd0..4d6f04fbbfd6e 100644
|
||||
index 29f0d888bcc9a..d870ed9844bb7 100644
|
||||
--- content/shell/browser/shell_content_browser_client.h
|
||||
+++ content/shell/browser/shell_content_browser_client.h
|
||||
@@ -160,7 +160,7 @@ class ShellContentBrowserClient : public ContentBrowserClient {
|
||||
@@ -161,7 +161,7 @@ class ShellContentBrowserClient : public ContentBrowserClient {
|
||||
GetGeolocationSystemPermissionManager() override;
|
||||
void OnNetworkServiceCreated(
|
||||
network::mojom::NetworkService* network_service) override;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git content/browser/renderer_host/navigation_policy_container_builder.cc content/browser/renderer_host/navigation_policy_container_builder.cc
|
||||
index 4ec9c72f01480..7b033e2f9db11 100644
|
||||
index 100eea6a4d7f3..fecc3a95130d7 100644
|
||||
--- content/browser/renderer_host/navigation_policy_container_builder.cc
|
||||
+++ content/browser/renderer_host/navigation_policy_container_builder.cc
|
||||
@@ -45,7 +45,6 @@ std::unique_ptr<PolicyContainerPolicies> GetInitiatorPolicies(
|
||||
|
@@ -108,7 +108,7 @@ index ffc5c37742800..82e1c22b0f073 100644
|
||||
}
|
||||
|
||||
diff --git content/app/content_main_runner_impl.cc content/app/content_main_runner_impl.cc
|
||||
index e81e89be0e190..a369b2086fa22 100644
|
||||
index 24f6f89cfa430..da28867d34ef5 100644
|
||||
--- content/app/content_main_runner_impl.cc
|
||||
+++ content/app/content_main_runner_impl.cc
|
||||
@@ -50,6 +50,7 @@
|
||||
@@ -119,7 +119,7 @@ index e81e89be0e190..a369b2086fa22 100644
|
||||
#include "base/time/time.h"
|
||||
#include "base/trace_event/trace_event.h"
|
||||
#include "build/branding_buildflags.h"
|
||||
@@ -1338,6 +1339,11 @@ void ContentMainRunnerImpl::Shutdown() {
|
||||
@@ -1340,6 +1341,11 @@ void ContentMainRunnerImpl::Shutdown() {
|
||||
is_shutdown_ = true;
|
||||
}
|
||||
|
||||
|
@@ -398,10 +398,10 @@ index 42fe73aefe44f..9f150e30336ef 100644
|
||||
handler_path, *database_path, metrics_path, url,
|
||||
GetProcessSimpleAnnotations(), arguments, true, false);
|
||||
diff --git components/crash/core/app/crashpad_win.cc components/crash/core/app/crashpad_win.cc
|
||||
index 0e00d26f79231..fdd2b4bc73f8e 100644
|
||||
index 5b811cbbc5154..e35f8f663b92e 100644
|
||||
--- components/crash/core/app/crashpad_win.cc
|
||||
+++ components/crash/core/app/crashpad_win.cc
|
||||
@@ -37,8 +37,8 @@ void GetPlatformCrashpadAnnotations(
|
||||
@@ -38,8 +38,8 @@ void GetPlatformCrashpadAnnotations(
|
||||
std::wstring product_name, version, special_build, channel_name;
|
||||
crash_reporter_client->GetProductNameAndVersion(
|
||||
exe_file, &product_name, &version, &special_build, &channel_name);
|
||||
@@ -412,7 +412,7 @@ index 0e00d26f79231..fdd2b4bc73f8e 100644
|
||||
#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
|
||||
// Empty means stable.
|
||||
const bool allow_empty_channel = true;
|
||||
@@ -55,9 +55,11 @@ void GetPlatformCrashpadAnnotations(
|
||||
@@ -56,9 +56,11 @@ void GetPlatformCrashpadAnnotations(
|
||||
if (!special_build.empty())
|
||||
(*annotations)["special"] = base::WideToUTF8(special_build);
|
||||
#if defined(ARCH_CPU_X86)
|
||||
@@ -426,29 +426,7 @@ index 0e00d26f79231..fdd2b4bc73f8e 100644
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -72,7 +74,9 @@ bool PlatformCrashpadInitialization(
|
||||
base::FilePath metrics_path; // Only valid in the browser process.
|
||||
|
||||
const char kPipeNameVar[] = "CHROME_CRASHPAD_PIPE_NAME";
|
||||
+#if defined(GOOGLE_CHROME_BUILD)
|
||||
const char kServerUrlVar[] = "CHROME_CRASHPAD_SERVER_URL";
|
||||
+#endif
|
||||
std::unique_ptr<base::Environment> env(base::Environment::Create());
|
||||
|
||||
CrashReporterClient* crash_reporter_client = GetCrashReporterClient();
|
||||
@@ -95,9 +99,11 @@ bool PlatformCrashpadInitialization(
|
||||
|
||||
std::string url = crash_reporter_client->GetUploadUrl();
|
||||
|
||||
+#if defined(GOOGLE_CHROME_BUILD)
|
||||
// Allow the crash server to be overridden for testing. If the variable
|
||||
// isn't present in the environment then the default URL will remain.
|
||||
env->GetVar(kServerUrlVar, &url);
|
||||
+#endif
|
||||
|
||||
base::FilePath exe_file(exe_path);
|
||||
if (exe_file.empty()) {
|
||||
@@ -108,13 +114,14 @@ bool PlatformCrashpadInitialization(
|
||||
@@ -112,13 +114,14 @@ bool PlatformCrashpadInitialization(
|
||||
exe_file = base::FilePath(exe_file_path);
|
||||
}
|
||||
|
||||
@@ -468,7 +446,7 @@ index 0e00d26f79231..fdd2b4bc73f8e 100644
|
||||
if (!user_data_dir.empty()) {
|
||||
start_arguments.push_back(std::string("--user-data-dir=") +
|
||||
user_data_dir);
|
||||
@@ -124,9 +131,12 @@ bool PlatformCrashpadInitialization(
|
||||
@@ -128,9 +131,12 @@ bool PlatformCrashpadInitialization(
|
||||
app_launch_prefetch::SubprocessType::kCrashpad)));
|
||||
} else {
|
||||
base::FilePath exe_dir = exe_file.DirName();
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git components/embedder_support/user_agent_utils.cc components/embedder_support/user_agent_utils.cc
|
||||
index 941788ea3ea81..c98e054107123 100644
|
||||
index 47abbd2835a36..4eb995232a7d8 100644
|
||||
--- components/embedder_support/user_agent_utils.cc
|
||||
+++ components/embedder_support/user_agent_utils.cc
|
||||
@@ -28,6 +28,7 @@
|
||||
|
@@ -1,18 +1,18 @@
|
||||
diff --git .gn .gn
|
||||
index 54d2631ec2032..b5bc7d4e97a91 100644
|
||||
index ae58a0b0a64ae..35e01ee64e5d7 100644
|
||||
--- .gn
|
||||
+++ .gn
|
||||
@@ -159,6 +159,8 @@ exec_script_allowlist =
|
||||
"//chrome/android/webapk/shell_apk/prepare_upload_dir/BUILD.gn",
|
||||
"//chrome/version.gni",
|
||||
@@ -156,6 +156,8 @@ exec_script_allowlist =
|
||||
# in the Chromium repo outside of //build.
|
||||
"//build_overrides/build.gni",
|
||||
|
||||
+ "//cef/BUILD.gn",
|
||||
+
|
||||
# TODO(dgn): Layer violation but breaks the build otherwise, see
|
||||
# https://crbug.com/474506.
|
||||
"//clank/java/BUILD.gn",
|
||||
"//chrome/version.gni",
|
||||
|
||||
"//google_apis/BUILD.gn",
|
||||
diff --git BUILD.gn BUILD.gn
|
||||
index f7307e92c4e94..8d4a80cef7997 100644
|
||||
index c0a9639d27232..e1cfab3d24c4f 100644
|
||||
--- BUILD.gn
|
||||
+++ BUILD.gn
|
||||
@@ -19,6 +19,7 @@ import("//build/config/ui.gni")
|
||||
@@ -78,7 +78,7 @@ 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 f9741697fdc82..f956cc3421255 100644
|
||||
index 845b473d56165..d1ffe4a9e54b1 100644
|
||||
--- chrome/chrome_paks.gni
|
||||
+++ chrome/chrome_paks.gni
|
||||
@@ -5,6 +5,7 @@
|
||||
@@ -89,7 +89,7 @@ index f9741697fdc82..f956cc3421255 100644
|
||||
import("//chrome/browser/buildflags.gni")
|
||||
import("//chrome/common/features.gni")
|
||||
import("//components/compose/features.gni")
|
||||
@@ -478,6 +479,11 @@ template("chrome_extra_paks") {
|
||||
@@ -479,6 +480,11 @@ template("chrome_extra_paks") {
|
||||
deps += [ "//components/headless/command_handler" ]
|
||||
}
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git tools/gritsettings/resource_ids.spec tools/gritsettings/resource_ids.spec
|
||||
index 2f5be98233528..283bf667b3fa9 100644
|
||||
index 342b54311138a..037a8da0884ec 100644
|
||||
--- tools/gritsettings/resource_ids.spec
|
||||
+++ tools/gritsettings/resource_ids.spec
|
||||
@@ -1504,11 +1504,18 @@
|
||||
@@ -1508,11 +1508,18 @@
|
||||
"<(SHARED_INTERMEDIATE_DIR)/third_party/blink/public/strings/permission_element_generated_strings.grd": {
|
||||
"META": {"sizes": {"messages": [2000],}},
|
||||
"messages": [10080],
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git third_party/libxml/BUILD.gn third_party/libxml/BUILD.gn
|
||||
index 73c974cc34aba..2249501a1e0ad 100644
|
||||
index ca67bf2efd14f..762013992a988 100644
|
||||
--- third_party/libxml/BUILD.gn
|
||||
+++ third_party/libxml/BUILD.gn
|
||||
@@ -140,6 +140,7 @@ static_library("libxml") {
|
||||
@@ -142,6 +142,7 @@ static_library("libxml") {
|
||||
":libxml_utils",
|
||||
":xml_reader",
|
||||
":xml_writer",
|
||||
|
@@ -32,10 +32,10 @@ index daecebb507070..aed51c2e6b06e 100644
|
||||
return (dark_mode_support.allow_dark_mode_for_app ||
|
||||
dark_mode_support.set_preferred_app_mode) &&
|
||||
diff --git chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc
|
||||
index 963360a3247e1..18e6a1db9a73e 100644
|
||||
index 8eca0f15ad724..214eb82df050d 100644
|
||||
--- chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc
|
||||
+++ chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc
|
||||
@@ -56,7 +56,10 @@ void ChromeBrowserMainExtraPartsViewsLinux::ToolkitInitialized() {
|
||||
@@ -58,7 +58,10 @@ void ChromeBrowserMainExtraPartsViewsLinux::ToolkitInitialized() {
|
||||
ui::CursorFactory::GetInstance()->ObserveThemeChanges();
|
||||
}
|
||||
#if BUILDFLAG(USE_DBUS)
|
||||
@@ -129,10 +129,10 @@ index e41728dd81663..a6396a778cae6 100644
|
||||
theme->NotifyOnNativeThemeUpdated();
|
||||
}];
|
||||
diff --git ui/native_theme/native_theme_win.cc ui/native_theme/native_theme_win.cc
|
||||
index dcf2d14d92f8b..ec99022b1f2ae 100644
|
||||
index 0c6d689295a03..dd63350a153c5 100644
|
||||
--- ui/native_theme/native_theme_win.cc
|
||||
+++ ui/native_theme/native_theme_win.cc
|
||||
@@ -693,7 +693,10 @@ bool NativeThemeWin::ShouldUseDarkColors() const {
|
||||
@@ -694,7 +694,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 dcf2d14d92f8b..ec99022b1f2ae 100644
|
||||
return false;
|
||||
}
|
||||
return NativeTheme::ShouldUseDarkColors();
|
||||
@@ -701,7 +704,7 @@ bool NativeThemeWin::ShouldUseDarkColors() const {
|
||||
@@ -702,7 +705,7 @@ bool NativeThemeWin::ShouldUseDarkColors() const {
|
||||
|
||||
NativeTheme::PreferredColorScheme
|
||||
NativeThemeWin::CalculatePreferredColorScheme() const {
|
||||
@@ -153,7 +153,7 @@ index dcf2d14d92f8b..ec99022b1f2ae 100644
|
||||
return NativeTheme::CalculatePreferredColorScheme();
|
||||
}
|
||||
|
||||
@@ -1687,9 +1690,10 @@ void NativeThemeWin::RegisterColorFilteringRegkeyObserver() {
|
||||
@@ -1688,9 +1691,10 @@ void NativeThemeWin::RegisterColorFilteringRegkeyObserver() {
|
||||
}
|
||||
|
||||
void NativeThemeWin::UpdateDarkModeStatus() {
|
||||
|
@@ -12,10 +12,10 @@ index add20a2f81d66..97071092ff768 100644
|
||||
base::File file(exe_dir.Append(path),
|
||||
base::File::FLAG_OPEN | base::File::FLAG_READ);
|
||||
diff --git sandbox/linux/suid/client/setuid_sandbox_host.cc sandbox/linux/suid/client/setuid_sandbox_host.cc
|
||||
index cdabcf3e5b2c7..2a12480efb68c 100644
|
||||
index f3a6d25be41ed..c826aa9e9ab6c 100644
|
||||
--- sandbox/linux/suid/client/setuid_sandbox_host.cc
|
||||
+++ sandbox/linux/suid/client/setuid_sandbox_host.cc
|
||||
@@ -125,7 +125,7 @@ bool SetuidSandboxHost::IsDisabledViaEnvironment() {
|
||||
@@ -131,7 +131,7 @@ bool SetuidSandboxHost::IsDisabledViaEnvironment() {
|
||||
base::FilePath SetuidSandboxHost::GetSandboxBinaryPath() {
|
||||
base::FilePath sandbox_binary;
|
||||
base::FilePath exe_dir;
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git ui/accessibility/platform/BUILD.gn ui/accessibility/platform/BUILD.gn
|
||||
index 6207f4941839f..11d359dcab78c 100644
|
||||
index 30440d1b5ba07..c16bda68afbd2 100644
|
||||
--- ui/accessibility/platform/BUILD.gn
|
||||
+++ ui/accessibility/platform/BUILD.gn
|
||||
@@ -354,6 +354,10 @@ component("platform") {
|
||||
@@ -355,6 +355,10 @@ component("platform") {
|
||||
if (use_gio) {
|
||||
configs += [ "//build/linux:gio_config" ]
|
||||
}
|
||||
@@ -14,10 +14,10 @@ index 6207f4941839f..11d359dcab78c 100644
|
||||
}
|
||||
}
|
||||
diff --git ui/gtk/BUILD.gn ui/gtk/BUILD.gn
|
||||
index 80e8ba9452862..77272e01247a8 100644
|
||||
index 539cc383b43be..574a7a48787fe 100644
|
||||
--- ui/gtk/BUILD.gn
|
||||
+++ ui/gtk/BUILD.gn
|
||||
@@ -174,4 +174,8 @@ component("gtk") {
|
||||
@@ -173,4 +173,8 @@ component("gtk") {
|
||||
|
||||
# TODO: This should be removed.
|
||||
deps += [ "//ui/ozone" ]
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git ui/gtk/gtk_ui.cc ui/gtk/gtk_ui.cc
|
||||
index aba9091667b74..6921c64b60cad 100644
|
||||
index 95bdbe6ae04af..913719635a342 100644
|
||||
--- ui/gtk/gtk_ui.cc
|
||||
+++ ui/gtk/gtk_ui.cc
|
||||
@@ -31,6 +31,7 @@
|
||||
@@ -27,10 +27,10 @@ index aba9091667b74..6921c64b60cad 100644
|
||||
&GtkUi::OnCursorThemeNameChanged);
|
||||
connect(settings, "notify::gtk-cursor-theme-size",
|
||||
diff --git ui/ozone/platform/x11/ozone_platform_x11.cc ui/ozone/platform/x11/ozone_platform_x11.cc
|
||||
index 35023e37a34bb..c466ba7f3c251 100644
|
||||
index 14a38b11d595c..84174ea74f7d2 100644
|
||||
--- ui/ozone/platform/x11/ozone_platform_x11.cc
|
||||
+++ ui/ozone/platform/x11/ozone_platform_x11.cc
|
||||
@@ -65,6 +65,8 @@ namespace ui {
|
||||
@@ -64,6 +64,8 @@ namespace ui {
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -39,7 +39,7 @@ index 35023e37a34bb..c466ba7f3c251 100644
|
||||
// Singleton OzonePlatform implementation for X11 platform.
|
||||
class OzonePlatformX11 : public OzonePlatform,
|
||||
public OSExchangeDataProviderFactoryOzone {
|
||||
@@ -266,7 +268,15 @@ class OzonePlatformX11 : public OzonePlatform,
|
||||
@@ -265,7 +267,15 @@ class OzonePlatformX11 : public OzonePlatform,
|
||||
TouchFactory::SetTouchDeviceListFromCommandLine();
|
||||
|
||||
#if BUILDFLAG(USE_GTK)
|
||||
@@ -56,7 +56,7 @@ index 35023e37a34bb..c466ba7f3c251 100644
|
||||
#endif
|
||||
|
||||
menu_utils_ = std::make_unique<X11MenuUtils>();
|
||||
@@ -361,4 +371,8 @@ OzonePlatform* CreateOzonePlatformX11() {
|
||||
@@ -364,4 +374,8 @@ OzonePlatform* CreateOzonePlatformX11() {
|
||||
return new OzonePlatformX11;
|
||||
}
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git printing/printing_context_linux.cc printing/printing_context_linux.cc
|
||||
index fa55d2a1c5f42..9eaf306672220 100644
|
||||
index 1bf52330b555e..5659403e4d4f5 100644
|
||||
--- printing/printing_context_linux.cc
|
||||
+++ printing/printing_context_linux.cc
|
||||
@@ -67,11 +67,11 @@ mojom::ResultCode PrintingContextLinux::UseDefaultSettings() {
|
||||
@@ -70,11 +70,11 @@ mojom::ResultCode PrintingContextLinux::UseDefaultSettings() {
|
||||
ResetSettings();
|
||||
|
||||
#if BUILDFLAG(IS_LINUX)
|
||||
@@ -16,7 +16,7 @@ index fa55d2a1c5f42..9eaf306672220 100644
|
||||
|
||||
if (print_dialog_) {
|
||||
print_dialog_->UseDefaultSettings();
|
||||
@@ -83,8 +83,8 @@ mojom::ResultCode PrintingContextLinux::UseDefaultSettings() {
|
||||
@@ -86,8 +86,8 @@ mojom::ResultCode PrintingContextLinux::UseDefaultSettings() {
|
||||
|
||||
gfx::Size PrintingContextLinux::GetPdfPaperSizeDeviceUnits() {
|
||||
#if BUILDFLAG(IS_LINUX)
|
||||
@@ -27,7 +27,7 @@ index fa55d2a1c5f42..9eaf306672220 100644
|
||||
#endif
|
||||
|
||||
return gfx::Size();
|
||||
@@ -96,11 +96,11 @@ mojom::ResultCode PrintingContextLinux::UpdatePrinterSettings(
|
||||
@@ -99,11 +99,11 @@ mojom::ResultCode PrintingContextLinux::UpdatePrinterSettings(
|
||||
DCHECK(!in_print_job_);
|
||||
|
||||
#if BUILDFLAG(IS_LINUX)
|
||||
@@ -100,7 +100,7 @@ index 3ab395e3b0b45..c012641a5dc7e 100644
|
||||
}
|
||||
|
||||
diff --git ui/linux/linux_ui.h ui/linux/linux_ui.h
|
||||
index 15db1bd5271cd..cb2d4090c7655 100644
|
||||
index 4ce8218e5d809..908397b968415 100644
|
||||
--- ui/linux/linux_ui.h
|
||||
+++ ui/linux/linux_ui.h
|
||||
@@ -20,6 +20,10 @@
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git chrome/browser/ui/views/profiles/profile_menu_view_base.cc chrome/browser/ui/views/profiles/profile_menu_view_base.cc
|
||||
index 541f4be99633e..bbfda1b3d9b59 100644
|
||||
index 83d21fd2cf3ab..00dc68165c4ee 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 {
|
||||
@@ -745,8 +745,8 @@ int ProfileMenuViewBase::GetMaxHeight() const {
|
||||
->GetDisplayNearestPoint(anchor_rect.CenterPoint())
|
||||
.work_area();
|
||||
int available_space = screen_space.bottom() - anchor_rect.bottom();
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
|
||||
index 22ee05153569d..e957efa72066d 100644
|
||||
index 1b458cd3bfc44..4a82829c4d0dd 100644
|
||||
--- content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
|
||||
+++ content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
|
||||
@@ -172,6 +172,13 @@ void ExtractUnderlines(NSAttributedString* string,
|
||||
@@ -16,7 +16,7 @@ index 22ee05153569d..e957efa72066d 100644
|
||||
// Private methods:
|
||||
@interface RenderWidgetHostViewCocoa ()
|
||||
|
||||
@@ -774,6 +781,15 @@ void ExtractUnderlines(NSAttributedString* string,
|
||||
@@ -783,6 +790,15 @@ void ExtractUnderlines(NSAttributedString* string,
|
||||
}
|
||||
|
||||
- (BOOL)acceptsFirstMouse:(NSEvent*)theEvent {
|
||||
|
@@ -30,7 +30,7 @@ index 1a263dc22f472..09fa613e35649 100644
|
||||
}
|
||||
if (has_msg) {
|
||||
diff --git base/task/current_thread.cc base/task/current_thread.cc
|
||||
index 024422b65775b..773d856dff353 100644
|
||||
index 53a6213a76b92..2177265e9b1b2 100644
|
||||
--- base/task/current_thread.cc
|
||||
+++ base/task/current_thread.cc
|
||||
@@ -51,6 +51,8 @@ void CurrentThread::AddDestructionObserver(
|
||||
@@ -43,7 +43,7 @@ index 024422b65775b..773d856dff353 100644
|
||||
current_->RemoveDestructionObserver(destruction_observer);
|
||||
}
|
||||
diff --git base/task/current_thread.h base/task/current_thread.h
|
||||
index c44d2c1417f8d..6d4c218185c65 100644
|
||||
index b6e265e2d7628..d072fae0fd588 100644
|
||||
--- base/task/current_thread.h
|
||||
+++ base/task/current_thread.h
|
||||
@@ -165,6 +165,12 @@ class BASE_EXPORT CurrentThread {
|
||||
|
@@ -101,7 +101,7 @@ index 332ab5c181ec5..d4ccf2e023cd3 100644
|
||||
bool enforce_errors_from_incoming_receiver_ = true;
|
||||
|
||||
diff --git mojo/public/cpp/bindings/interface_endpoint_client.h mojo/public/cpp/bindings/interface_endpoint_client.h
|
||||
index 2d796cec6e42e..dc2c0667afec9 100644
|
||||
index f683feadb176d..e67b8b41d4efe 100644
|
||||
--- mojo/public/cpp/bindings/interface_endpoint_client.h
|
||||
+++ mojo/public/cpp/bindings/interface_endpoint_client.h
|
||||
@@ -77,6 +77,7 @@ class COMPONENT_EXPORT(MOJO_CPP_BINDINGS) InterfaceEndpointClient
|
||||
@@ -128,7 +128,7 @@ index 2d796cec6e42e..dc2c0667afec9 100644
|
||||
}
|
||||
|
||||
// Returns true if an error was encountered.
|
||||
@@ -155,7 +165,8 @@ class COMPONENT_EXPORT(MOJO_CPP_BINDINGS) InterfaceEndpointClient
|
||||
@@ -156,7 +166,8 @@ class COMPONENT_EXPORT(MOJO_CPP_BINDINGS) InterfaceEndpointClient
|
||||
|
||||
// NOTE: |message| must have passed message header validation.
|
||||
bool HandleIncomingMessage(Message* message);
|
||||
@@ -138,7 +138,7 @@ index 2d796cec6e42e..dc2c0667afec9 100644
|
||||
|
||||
// The following methods send interface control messages.
|
||||
// They must only be called when the handle is not in pending association
|
||||
@@ -345,6 +356,8 @@ class COMPONENT_EXPORT(MOJO_CPP_BINDINGS) InterfaceEndpointClient
|
||||
@@ -346,6 +357,8 @@ class COMPONENT_EXPORT(MOJO_CPP_BINDINGS) InterfaceEndpointClient
|
||||
|
||||
base::OnceClosure error_handler_;
|
||||
ConnectionErrorWithReasonCallback error_with_reason_handler_;
|
||||
@@ -148,10 +148,10 @@ index 2d796cec6e42e..dc2c0667afec9 100644
|
||||
|
||||
const scoped_refptr<base::SequencedTaskRunner> task_runner_;
|
||||
diff --git mojo/public/cpp/bindings/lib/associated_receiver.cc mojo/public/cpp/bindings/lib/associated_receiver.cc
|
||||
index 4a0fbb27c1163..75a5c5fe70423 100644
|
||||
index 7134c119865e9..a53beb998abc2 100644
|
||||
--- mojo/public/cpp/bindings/lib/associated_receiver.cc
|
||||
+++ mojo/public/cpp/bindings/lib/associated_receiver.cc
|
||||
@@ -49,6 +49,13 @@ void AssociatedReceiverBase::set_disconnect_with_reason_handler(
|
||||
@@ -55,6 +55,13 @@ void AssociatedReceiverBase::set_disconnect_with_reason_handler(
|
||||
std::move(error_handler));
|
||||
}
|
||||
|
||||
@@ -166,10 +166,10 @@ index 4a0fbb27c1163..75a5c5fe70423 100644
|
||||
DCHECK(is_bound());
|
||||
set_disconnect_handler(
|
||||
diff --git mojo/public/cpp/bindings/lib/binding_state.h mojo/public/cpp/bindings/lib/binding_state.h
|
||||
index 3de514b2696ba..ac057000ea20b 100644
|
||||
index 60544ea4c9fbb..83da55f4c50b9 100644
|
||||
--- mojo/public/cpp/bindings/lib/binding_state.h
|
||||
+++ mojo/public/cpp/bindings/lib/binding_state.h
|
||||
@@ -70,6 +70,13 @@ class COMPONENT_EXPORT(MOJO_CPP_BINDINGS) BindingStateBase {
|
||||
@@ -65,6 +65,13 @@ class COMPONENT_EXPORT(MOJO_CPP_BINDINGS) BindingStateBase {
|
||||
std::move(error_handler));
|
||||
}
|
||||
|
||||
@@ -184,10 +184,10 @@ index 3de514b2696ba..ac057000ea20b 100644
|
||||
|
||||
MessagePipeHandle handle() const {
|
||||
diff --git mojo/public/cpp/bindings/lib/connector.cc mojo/public/cpp/bindings/lib/connector.cc
|
||||
index 6127288d3fbbc..9713b21569bf3 100644
|
||||
index d2606acaabd0a..8bf169d246b6b 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,
|
||||
@@ -436,6 +436,8 @@ void Connector::OnSyncHandleWatcherHandleReady(const char* interface_name,
|
||||
void Connector::OnHandleReadyInternal(MojoResult result) {
|
||||
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
|
||||
@@ -197,10 +197,10 @@ index 6127288d3fbbc..9713b21569bf3 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 9615abc747135..face0222f6023 100644
|
||||
index 0ecfee48e474e..6d2309659c9e0 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) {
|
||||
@@ -738,7 +738,8 @@ bool InterfaceEndpointClient::HandleIncomingMessage(Message* message) {
|
||||
}
|
||||
|
||||
void InterfaceEndpointClient::NotifyError(
|
||||
@@ -210,7 +210,7 @@ index 9615abc747135..face0222f6023 100644
|
||||
TRACE_EVENT("toplevel", "Closed mojo endpoint",
|
||||
[&](perfetto::EventContext& ctx) {
|
||||
auto* info = ctx.event()->set_chrome_mojo_event_info();
|
||||
@@ -767,6 +768,14 @@ void InterfaceEndpointClient::NotifyError(
|
||||
@@ -774,6 +775,14 @@ void InterfaceEndpointClient::NotifyError(
|
||||
} else {
|
||||
std::move(error_with_reason_handler_).Run(0, std::string());
|
||||
}
|
||||
@@ -225,7 +225,7 @@ index 9615abc747135..face0222f6023 100644
|
||||
}
|
||||
}
|
||||
|
||||
@@ -905,7 +914,8 @@ void InterfaceEndpointClient::OnAssociationEvent(
|
||||
@@ -912,7 +921,8 @@ void InterfaceEndpointClient::OnAssociationEvent(
|
||||
task_runner_->PostTask(FROM_HERE,
|
||||
base::BindOnce(&InterfaceEndpointClient::NotifyError,
|
||||
weak_ptr_factory_.GetWeakPtr(),
|
||||
@@ -236,10 +236,10 @@ index 9615abc747135..face0222f6023 100644
|
||||
}
|
||||
|
||||
diff --git mojo/public/cpp/bindings/lib/interface_ptr_state.h mojo/public/cpp/bindings/lib/interface_ptr_state.h
|
||||
index b6b88ee9651ba..6d75cb0cbd531 100644
|
||||
index 0cff2435770ed..648678e152338 100644
|
||||
--- mojo/public/cpp/bindings/lib/interface_ptr_state.h
|
||||
+++ mojo/public/cpp/bindings/lib/interface_ptr_state.h
|
||||
@@ -224,6 +224,15 @@ class InterfacePtrState : public InterfacePtrStateBase {
|
||||
@@ -225,6 +225,15 @@ class InterfacePtrState : public InterfacePtrStateBase {
|
||||
std::move(error_handler));
|
||||
}
|
||||
|
||||
@@ -256,10 +256,10 @@ index b6b88ee9651ba..6d75cb0cbd531 100644
|
||||
base::RepeatingClosure handler) {
|
||||
ConfigureProxyIfNecessary();
|
||||
diff --git mojo/public/cpp/bindings/lib/multiplex_router.cc mojo/public/cpp/bindings/lib/multiplex_router.cc
|
||||
index c7d6a0e7b5e96..399016fbd5e71 100644
|
||||
index 09ca485ab9ec2..9ec966e561a6a 100644
|
||||
--- mojo/public/cpp/bindings/lib/multiplex_router.cc
|
||||
+++ mojo/public/cpp/bindings/lib/multiplex_router.cc
|
||||
@@ -90,6 +90,12 @@ class MultiplexRouter::InterfaceEndpoint
|
||||
@@ -89,6 +89,12 @@ class MultiplexRouter::InterfaceEndpoint
|
||||
disconnect_reason_ = disconnect_reason;
|
||||
}
|
||||
|
||||
@@ -272,7 +272,7 @@ index c7d6a0e7b5e96..399016fbd5e71 100644
|
||||
base::SequencedTaskRunner* task_runner() const { return task_runner_.get(); }
|
||||
|
||||
InterfaceEndpointClient* client() const { return client_; }
|
||||
@@ -245,6 +251,7 @@ class MultiplexRouter::InterfaceEndpoint
|
||||
@@ -244,6 +250,7 @@ class MultiplexRouter::InterfaceEndpoint
|
||||
bool handle_created_;
|
||||
|
||||
std::optional<DisconnectReason> disconnect_reason_;
|
||||
@@ -280,7 +280,7 @@ index c7d6a0e7b5e96..399016fbd5e71 100644
|
||||
|
||||
// The task runner on which |client_|'s methods can be called.
|
||||
scoped_refptr<base::SequencedTaskRunner> task_runner_;
|
||||
@@ -842,6 +849,8 @@ void MultiplexRouter::OnPipeConnectionError(bool force_async_dispatch) {
|
||||
@@ -841,6 +848,8 @@ void MultiplexRouter::OnPipeConnectionError(bool force_async_dispatch) {
|
||||
for (uint64_t request_id : request_ids)
|
||||
endpoint->client()->ForgetAsyncRequest(request_id);
|
||||
|
||||
@@ -289,7 +289,7 @@ index c7d6a0e7b5e96..399016fbd5e71 100644
|
||||
tasks_.push_back(Task::CreateNotifyErrorTask(endpoint.get()));
|
||||
}
|
||||
|
||||
@@ -1032,7 +1041,7 @@ bool MultiplexRouter::ProcessNotifyErrorTask(
|
||||
@@ -1031,7 +1040,7 @@ bool MultiplexRouter::ProcessNotifyErrorTask(
|
||||
// It is safe to call into |client| without the lock. Because |client| is
|
||||
// always accessed on the same sequence, including DetachEndpointClient().
|
||||
MayAutoUnlock unlocker(&lock_);
|
||||
@@ -376,7 +376,7 @@ index ede8e5973b576..6f22981831ede 100644
|
||||
|
||||
} // namespace mojo
|
||||
diff --git mojo/public/cpp/bindings/receiver_set.h mojo/public/cpp/bindings/receiver_set.h
|
||||
index 41b31247e9e50..ecd699772381b 100644
|
||||
index 8d3062f40b887..d1364cbf14323 100644
|
||||
--- mojo/public/cpp/bindings/receiver_set.h
|
||||
+++ mojo/public/cpp/bindings/receiver_set.h
|
||||
@@ -72,7 +72,8 @@ class COMPONENT_EXPORT(MOJO_CPP_BINDINGS) ReceiverSetState {
|
||||
@@ -424,7 +424,7 @@ index 41b31247e9e50..ecd699772381b 100644
|
||||
ReceiverId next_receiver_id_ = 0;
|
||||
EntryMap entries_;
|
||||
raw_ptr<void, DanglingUntriaged> current_context_ = nullptr;
|
||||
@@ -489,11 +496,12 @@ class ReceiverSetBase {
|
||||
@@ -507,11 +514,12 @@ class ReceiverSetBase {
|
||||
const void* GetContext() const override { return &context_; }
|
||||
void* GetContext() override { return &context_; }
|
||||
|
||||
|
@@ -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 271c601381a0d..0e22f8ea606e7 100644
|
||||
index 1824c17bc464a..e80d50b7b6952 100644
|
||||
--- net/url_request/url_request_http_job.cc
|
||||
+++ net/url_request/url_request_http_job.cc
|
||||
@@ -2106,7 +2106,8 @@ bool URLRequestHttpJob::ShouldAddCookieHeader() const {
|
||||
@@ -2139,7 +2139,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 271c601381a0d..0e22f8ea606e7 100644
|
||||
|
||||
bool URLRequestHttpJob::ShouldRecordPartitionedCookieUsage() const {
|
||||
diff --git services/network/public/cpp/resource_request.cc services/network/public/cpp/resource_request.cc
|
||||
index 7d97d0fd5481b..307e5f2beb370 100644
|
||||
index 28355f4c6c3cb..f36b0b658aef5 100644
|
||||
--- services/network/public/cpp/resource_request.cc
|
||||
+++ services/network/public/cpp/resource_request.cc
|
||||
@@ -356,7 +356,8 @@ bool ResourceRequest::EqualsForTesting(const ResourceRequest& request) const {
|
||||
@@ -353,7 +353,8 @@ bool ResourceRequest::EqualsForTesting(const ResourceRequest& request) const {
|
||||
}
|
||||
|
||||
bool ResourceRequest::SendsCookies() const {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user