mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-02-24 07:58:11 +01:00
Update to Chromium version 125.0.6422.0 (#1287751)
This commit is contained in:
parent
4fe529e2dc
commit
b67cbc47e3
@ -7,5 +7,5 @@
|
||||
# https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
|
||||
|
||||
{
|
||||
'chromium_checkout': 'refs/tags/124.0.6367.0'
|
||||
'chromium_checkout': 'refs/tags/125.0.6422.0'
|
||||
}
|
||||
|
@ -42,13 +42,13 @@
|
||||
// way that may cause binary incompatibility with other builds. The universal
|
||||
// hash value will change if any platform is affected whereas the platform hash
|
||||
// values will change only if that particular platform is affected.
|
||||
#define CEF_API_HASH_UNIVERSAL "984fcdc779268524c848d94232e2d045d9a42852"
|
||||
#define CEF_API_HASH_UNIVERSAL "faa8a52df058a26e1228da66052a9900a7120de4"
|
||||
#if defined(OS_WIN)
|
||||
#define CEF_API_HASH_PLATFORM "3975a9042b7124d15f39044972f879066f61e9dd"
|
||||
#define CEF_API_HASH_PLATFORM "41a15a683e4a2b927f043c22d8a9f07671168170"
|
||||
#elif defined(OS_MAC)
|
||||
#define CEF_API_HASH_PLATFORM "ffdd4259a0790d813627975952d0e714818c24b2"
|
||||
#define CEF_API_HASH_PLATFORM "6933ff4566b919c045ff0743682889d45ffcba28"
|
||||
#elif defined(OS_LINUX)
|
||||
#define CEF_API_HASH_PLATFORM "f0dff25daca39032db1f882545b3ad880e731060"
|
||||
#define CEF_API_HASH_PLATFORM "b12778ab8fd0974e45a246484a31d12f097c7936"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -380,6 +380,13 @@ 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.
|
||||
CEF_CONTENT_SETTING_TOP_LEVEL_TPCD_ORIGIN_TRIAL,
|
||||
|
||||
/// Content setting used to indicate whether entering picture-in-picture
|
||||
/// automatically should be enabled.
|
||||
CEF_CONTENT_SETTING_TYPE_AUTO_PICTURE_IN_PICTURE,
|
||||
@ -428,6 +435,15 @@ typedef enum {
|
||||
/// Pointer Lock API allows a site to hide the cursor and have exclusive
|
||||
/// access to mouse inputs.
|
||||
CEF_CONTENT_SETTING_TYPE_POINTER_LOCK,
|
||||
|
||||
/// Website setting which is used for UnusedSitePermissionsService to store
|
||||
/// auto-revoked notification permissions from abusive sites.
|
||||
REVOKED_ABUSIVE_NOTIFICATION_PERMISSIONS,
|
||||
|
||||
/// Content setting that controls tracking protection status per site.
|
||||
/// BLOCK: Protections enabled. This is the default state.
|
||||
/// ALLOW: Protections disabled.
|
||||
TRACKING_PROTECTION,
|
||||
} cef_content_setting_types_t;
|
||||
|
||||
///
|
||||
|
@ -452,6 +452,12 @@ void AlloyBrowserContext::RebuildTable(
|
||||
enumerator->OnComplete(true);
|
||||
}
|
||||
|
||||
void AlloyBrowserContext::BuildVisitedLinkTable(
|
||||
const scoped_refptr<VisitedLinkEnumerator>& enumerator) {
|
||||
// Called when visited links will not or cannot be loaded from disk.
|
||||
enumerator->OnVisitedLinkComplete(true);
|
||||
}
|
||||
|
||||
DownloadPrefs* AlloyBrowserContext::GetDownloadPrefs() {
|
||||
CEF_REQUIRE_UIT();
|
||||
if (!download_prefs_) {
|
||||
|
@ -110,6 +110,8 @@ class AlloyBrowserContext : public ChromeProfileAlloy,
|
||||
|
||||
// visitedlink::VisitedLinkDelegate methods.
|
||||
void RebuildTable(const scoped_refptr<URLEnumerator>& enumerator) override;
|
||||
void BuildVisitedLinkTable(
|
||||
const scoped_refptr<VisitedLinkEnumerator>& enumerator) override;
|
||||
|
||||
// Manages extensions.
|
||||
extensions::CefExtensionSystem* extension_system() const {
|
||||
|
@ -618,7 +618,7 @@ bool AlloyBrowserHostImpl::MaybeAllowNavigation(
|
||||
CEF_POST_TASK(CEF_UIT,
|
||||
base::BindOnce(
|
||||
base::IgnoreResult(&AlloyBrowserHostImpl::OpenURLFromTab),
|
||||
this, nullptr, params));
|
||||
this, nullptr, params, base::NullCallback()));
|
||||
|
||||
return false;
|
||||
}
|
||||
@ -926,8 +926,11 @@ bool AlloyBrowserHostImpl::IsAudioMuted() {
|
||||
|
||||
content::WebContents* AlloyBrowserHostImpl::OpenURLFromTab(
|
||||
content::WebContents* source,
|
||||
const content::OpenURLParams& params) {
|
||||
auto target_contents = contents_delegate_->OpenURLFromTab(source, params);
|
||||
const content::OpenURLParams& params,
|
||||
base::OnceCallback<void(content::NavigationHandle&)>
|
||||
navigation_handle_callback) {
|
||||
auto target_contents = contents_delegate_->OpenURLFromTabEx(
|
||||
source, params, navigation_handle_callback);
|
||||
if (target_contents) {
|
||||
// Start a navigation in the current browser that will result in the
|
||||
// creation of a new render process.
|
||||
@ -1282,6 +1285,12 @@ content::PreloadingEligibility AlloyBrowserHostImpl::IsPrerender2Supported(
|
||||
return content::PreloadingEligibility::kEligible;
|
||||
}
|
||||
|
||||
void AlloyBrowserHostImpl::DraggableRegionsChanged(
|
||||
const std::vector<blink::mojom::DraggableRegionPtr>& regions,
|
||||
content::WebContents* contents) {
|
||||
contents_delegate_->DraggableRegionsChanged(regions, contents);
|
||||
}
|
||||
|
||||
// content::WebContentsObserver methods.
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
@ -184,7 +184,9 @@ class AlloyBrowserHostImpl : public CefBrowserHostBase,
|
||||
// content::WebContentsDelegate methods.
|
||||
content::WebContents* OpenURLFromTab(
|
||||
content::WebContents* source,
|
||||
const content::OpenURLParams& params) override;
|
||||
const content::OpenURLParams& params,
|
||||
base::OnceCallback<void(content::NavigationHandle&)>
|
||||
navigation_handle_callback) override;
|
||||
bool ShouldAllowRendererInitiatedCrossProcessNavigation(
|
||||
bool is_main_frame_navigation) override;
|
||||
void AddNewContents(content::WebContents* source,
|
||||
@ -279,6 +281,9 @@ class AlloyBrowserHostImpl : public CefBrowserHostBase,
|
||||
bool IsBackForwardCacheSupported() override;
|
||||
content::PreloadingEligibility IsPrerender2Supported(
|
||||
content::WebContents& web_contents) override;
|
||||
void DraggableRegionsChanged(
|
||||
const std::vector<blink::mojom::DraggableRegionPtr>& regions,
|
||||
content::WebContents* contents) override;
|
||||
|
||||
// content::WebContentsObserver methods.
|
||||
using content::WebContentsObserver::BeforeUnloadFired;
|
||||
|
@ -6,10 +6,11 @@
|
||||
#define CEF_LIBCEF_BROWSER_ALLOY_ALLOY_BROWSER_MAIN_H_
|
||||
#pragma once
|
||||
|
||||
#include <string_view>
|
||||
|
||||
#include "libcef/browser/request_context_impl.h"
|
||||
|
||||
#include "base/command_line.h"
|
||||
#include "base/strings/string_piece.h"
|
||||
#include "build/build_config.h"
|
||||
#include "components/prefs/pref_service.h"
|
||||
#include "content/public/browser/browser_main_parts.h"
|
||||
|
@ -92,6 +92,7 @@
|
||||
#include "components/pdf/browser/pdf_navigation_throttle.h"
|
||||
#include "components/pdf/browser/pdf_url_loader_request_interceptor.h"
|
||||
#include "components/pdf/common/constants.h"
|
||||
#include "components/pdf/common/pdf_util.h"
|
||||
#include "components/policy/core/common/policy_pref_names.h"
|
||||
#include "components/spellcheck/common/spellcheck.mojom.h"
|
||||
#include "components/version_info/version_info.h"
|
||||
@ -449,7 +450,7 @@ bool AlloyContentBrowserClient::DoesSiteRequireDedicatedProcess(
|
||||
}
|
||||
|
||||
bool AlloyContentBrowserClient::ShouldTreatURLSchemeAsFirstPartyWhenTopLevel(
|
||||
base::StringPiece scheme,
|
||||
std::string_view scheme,
|
||||
bool is_embedded_origin_secure) {
|
||||
// This is needed to bypass the normal SameSite rules for any chrome:// page
|
||||
// embedding a secure origin, regardless of the registrable domains of any
|
||||
@ -470,7 +471,7 @@ bool AlloyContentBrowserClient::ShouldTreatURLSchemeAsFirstPartyWhenTopLevel(
|
||||
|
||||
bool AlloyContentBrowserClient::
|
||||
ShouldIgnoreSameSiteCookieRestrictionsWhenTopLevel(
|
||||
base::StringPiece scheme,
|
||||
std::string_view scheme,
|
||||
bool is_embedded_origin_secure) {
|
||||
return is_embedded_origin_secure && scheme == content::kChromeUIScheme;
|
||||
}
|
||||
@ -913,10 +914,10 @@ void AlloyContentBrowserClient::
|
||||
},
|
||||
&render_frame_host));
|
||||
|
||||
associated_registry.AddInterface<pdf::mojom::PdfService>(base::BindRepeating(
|
||||
associated_registry.AddInterface<pdf::mojom::PdfHost>(base::BindRepeating(
|
||||
[](content::RenderFrameHost* render_frame_host,
|
||||
mojo::PendingAssociatedReceiver<pdf::mojom::PdfService> receiver) {
|
||||
pdf::PDFDocumentHelper::BindPdfService(
|
||||
mojo::PendingAssociatedReceiver<pdf::mojom::PdfHost> receiver) {
|
||||
pdf::PDFDocumentHelper::BindPdfHost(
|
||||
std::move(receiver), render_frame_host,
|
||||
std::make_unique<ChromePDFDocumentHelperClient>());
|
||||
},
|
||||
@ -1179,6 +1180,7 @@ void AlloyContentBrowserClient::WillCreateURLLoaderFactory(
|
||||
int render_process_id,
|
||||
URLLoaderFactoryType type,
|
||||
const url::Origin& request_initiator,
|
||||
const net::IsolationInfo& isolation_info,
|
||||
std::optional<int64_t> navigation_id,
|
||||
ukm::SourceIdObj ukm_source_id,
|
||||
network::URLLoaderFactoryBuilder& factory_builder,
|
||||
|
@ -45,10 +45,10 @@ class AlloyContentBrowserClient : public content::ContentBrowserClient {
|
||||
bool DoesSiteRequireDedicatedProcess(content::BrowserContext* browser_context,
|
||||
const GURL& effective_site_url) override;
|
||||
bool ShouldTreatURLSchemeAsFirstPartyWhenTopLevel(
|
||||
base::StringPiece scheme,
|
||||
std::string_view scheme,
|
||||
bool is_embedded_origin_secure) override;
|
||||
bool ShouldIgnoreSameSiteCookieRestrictionsWhenTopLevel(
|
||||
base::StringPiece scheme,
|
||||
std::string_view scheme,
|
||||
bool is_embedded_origin_secure) override;
|
||||
void OverrideURLLoaderFactoryParams(
|
||||
content::BrowserContext* browser_context,
|
||||
@ -186,6 +186,7 @@ class AlloyContentBrowserClient : public content::ContentBrowserClient {
|
||||
int render_process_id,
|
||||
URLLoaderFactoryType type,
|
||||
const url::Origin& request_initiator,
|
||||
const net::IsolationInfo& isolation_info,
|
||||
std::optional<int64_t> navigation_id,
|
||||
ukm::SourceIdObj ukm_source_id,
|
||||
network::URLLoaderFactoryBuilder& factory_builder,
|
||||
|
@ -370,6 +370,12 @@ ChromeBrowserProcessAlloy::subresource_filter_ruleset_service() {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
subresource_filter::RulesetService*
|
||||
ChromeBrowserProcessAlloy::fingerprinting_protection_ruleset_service() {
|
||||
DCHECK(false);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
StartupData* ChromeBrowserProcessAlloy::startup_data() {
|
||||
DCHECK(false);
|
||||
return nullptr;
|
||||
|
@ -92,6 +92,8 @@ class ChromeBrowserProcessAlloy : public BrowserProcess {
|
||||
safe_browsing::SafeBrowsingService* safe_browsing_service() override;
|
||||
subresource_filter::RulesetService* subresource_filter_ruleset_service()
|
||||
override;
|
||||
subresource_filter::RulesetService*
|
||||
fingerprinting_protection_ruleset_service() override;
|
||||
StartupData* startup_data() override;
|
||||
|
||||
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
|
||||
|
@ -35,7 +35,7 @@ void WriteToFile(const base::FilePath& path, const std::string& content) {
|
||||
|
||||
void AppendToFile(const base::FilePath& path, const std::string& content) {
|
||||
DCHECK(!path.empty());
|
||||
base::AppendToFile(path, base::StringPiece(content));
|
||||
base::AppendToFile(path, std::string_view(content));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
@ -166,7 +166,7 @@ void LogProtocolMessage(const base::FilePath& log_file,
|
||||
WriteTimestamp(stream);
|
||||
stream << ": " << type_label << ": " << to_log << "\n";
|
||||
const std::string& str = stream.str();
|
||||
if (!base::AppendToFile(log_file, base::StringPiece(str))) {
|
||||
if (!base::AppendToFile(log_file, std::string_view(str))) {
|
||||
LOG(ERROR) << "Failed to write file " << log_file.value();
|
||||
log_error = true;
|
||||
}
|
||||
@ -200,7 +200,7 @@ class CefDevToolsFrontend::NetworkResourceLoader
|
||||
response_headers_ = response_head.headers;
|
||||
}
|
||||
|
||||
void OnDataReceived(base::StringPiece chunk,
|
||||
void OnDataReceived(std::string_view chunk,
|
||||
base::OnceClosure resume) override {
|
||||
base::Value chunkValue;
|
||||
|
||||
@ -577,8 +577,8 @@ void CefDevToolsFrontend::DispatchProtocolMessage(
|
||||
return;
|
||||
}
|
||||
|
||||
base::StringPiece str_message(reinterpret_cast<const char*>(message.data()),
|
||||
message.size());
|
||||
std::string_view str_message(reinterpret_cast<const char*>(message.data()),
|
||||
message.size());
|
||||
if (ProtocolLoggingEnabled()) {
|
||||
// Quick check to avoid parsing the JSON object. Events begin with a
|
||||
// "method" value whereas method results begin with an "id" value.
|
||||
@ -595,7 +595,7 @@ void CefDevToolsFrontend::DispatchProtocolMessage(
|
||||
size_t total_size = str_message.length();
|
||||
for (size_t pos = 0; pos < str_message.length();
|
||||
pos += kMaxMessageChunkSize) {
|
||||
base::StringPiece str_message_chunk =
|
||||
std::string_view str_message_chunk =
|
||||
str_message.substr(pos, kMaxMessageChunkSize);
|
||||
|
||||
CallClientFunction(
|
||||
@ -643,7 +643,7 @@ bool CefDevToolsFrontend::ProtocolLoggingEnabled() const {
|
||||
}
|
||||
|
||||
void CefDevToolsFrontend::LogProtocolMessage(ProtocolMessageType type,
|
||||
const base::StringPiece& message) {
|
||||
const std::string_view& message) {
|
||||
DCHECK(ProtocolLoggingEnabled());
|
||||
|
||||
std::string to_log(message.substr(0, kMaxLogLineLength));
|
||||
|
@ -87,7 +87,7 @@ class CefDevToolsFrontend : public content::WebContentsObserver,
|
||||
|
||||
bool ProtocolLoggingEnabled() const;
|
||||
void LogProtocolMessage(ProtocolMessageType type,
|
||||
const base::StringPiece& message);
|
||||
const std::string_view& message);
|
||||
|
||||
PrefService* GetPrefs() const;
|
||||
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "services/network/public/mojom/url_response_head.mojom.h"
|
||||
#include "third_party/blink/public/mojom/favicon/favicon_url.mojom.h"
|
||||
#include "third_party/blink/public/mojom/input/focus_type.mojom-blink.h"
|
||||
#include "third_party/blink/public/mojom/page/draggable_region.mojom.h"
|
||||
#include "third_party/blink/public/mojom/widget/platform_widget.mojom-test-utils.h"
|
||||
|
||||
#if defined(OS_WIN)
|
||||
@ -112,9 +113,11 @@ void CefBrowserContentsDelegate::RemoveObserver(Observer* observer) {
|
||||
|
||||
// |source| may be NULL for navigations in the current tab, or if the
|
||||
// navigation originates from a guest view via MaybeAllowNavigation.
|
||||
content::WebContents* CefBrowserContentsDelegate::OpenURLFromTab(
|
||||
content::WebContents* CefBrowserContentsDelegate::OpenURLFromTabEx(
|
||||
content::WebContents* source,
|
||||
const content::OpenURLParams& params) {
|
||||
const content::OpenURLParams& params,
|
||||
base::OnceCallback<void(content::NavigationHandle&)>&
|
||||
navigation_handle_callback) {
|
||||
bool cancel = false;
|
||||
|
||||
if (auto c = client()) {
|
||||
@ -133,8 +136,13 @@ content::WebContents* CefBrowserContentsDelegate::OpenURLFromTab(
|
||||
}
|
||||
}
|
||||
|
||||
if (!cancel) {
|
||||
// TODO: Do something with |navigation_handle_callback|.
|
||||
return web_contents();
|
||||
}
|
||||
|
||||
// Returning nullptr will cancel the navigation.
|
||||
return cancel ? nullptr : web_contents();
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void CefBrowserContentsDelegate::LoadingStateChanged(
|
||||
@ -228,11 +236,9 @@ void CefBrowserContentsDelegate::CanDownload(
|
||||
base::OnceCallback<void(bool)> callback) {
|
||||
bool allow = true;
|
||||
|
||||
if (auto delegate = platform_delegate()) {
|
||||
if (auto c = client()) {
|
||||
if (auto handler = c->GetDownloadHandler()) {
|
||||
allow = handler->CanDownload(browser(), url.spec(), request_method);
|
||||
}
|
||||
if (auto c = client()) {
|
||||
if (auto handler = c->GetDownloadHandler()) {
|
||||
allow = handler->CanDownload(browser(), url.spec(), request_method);
|
||||
}
|
||||
}
|
||||
|
||||
@ -294,6 +300,23 @@ bool CefBrowserContentsDelegate::HandleKeyboardEvent(
|
||||
return false;
|
||||
}
|
||||
|
||||
void CefBrowserContentsDelegate::DraggableRegionsChanged(
|
||||
const std::vector<blink::mojom::DraggableRegionPtr>& regions,
|
||||
content::WebContents* contents) {
|
||||
// Already converted to window bounds in WebViewImpl::DraggableRegionsChanged.
|
||||
std::vector<cef::mojom::DraggableRegionEntryPtr> cef_regions;
|
||||
if (!regions.empty()) {
|
||||
cef_regions.reserve(regions.size());
|
||||
for (const auto& region : regions) {
|
||||
auto cef_region = cef::mojom::DraggableRegionEntry::New(
|
||||
region->bounds, region->draggable);
|
||||
cef_regions.emplace_back(std::move(cef_region));
|
||||
}
|
||||
}
|
||||
|
||||
browser_info_->GetMainFrame()->UpdateDraggableRegions(std::move(cef_regions));
|
||||
}
|
||||
|
||||
void CefBrowserContentsDelegate::RenderFrameCreated(
|
||||
content::RenderFrameHost* render_frame_host) {
|
||||
browser_info_->MaybeCreateFrame(render_frame_host, false /* is_guest_view */);
|
||||
|
@ -80,10 +80,15 @@ class CefBrowserContentsDelegate : public content::WebContentsDelegate,
|
||||
void AddObserver(Observer* observer);
|
||||
void RemoveObserver(Observer* observer);
|
||||
|
||||
// WebContentsDelegate methods:
|
||||
content::WebContents* OpenURLFromTab(
|
||||
// Same as OpenURLFromTab but only taking |navigation_handle_callback|
|
||||
// if the return value is non-nullptr.
|
||||
content::WebContents* OpenURLFromTabEx(
|
||||
content::WebContents* source,
|
||||
const content::OpenURLParams& params) override;
|
||||
const content::OpenURLParams& params,
|
||||
base::OnceCallback<void(content::NavigationHandle&)>&
|
||||
navigation_handle_callback);
|
||||
|
||||
// WebContentsDelegate methods:
|
||||
void LoadingStateChanged(content::WebContents* source,
|
||||
bool should_show_loading_ui) override;
|
||||
void UpdateTargetURL(content::WebContents* source, const GURL& url) override;
|
||||
@ -105,6 +110,9 @@ class CefBrowserContentsDelegate : public content::WebContentsDelegate,
|
||||
bool HandleKeyboardEvent(
|
||||
content::WebContents* source,
|
||||
const content::NativeWebKeyboardEvent& event) override;
|
||||
void DraggableRegionsChanged(
|
||||
const std::vector<blink::mojom::DraggableRegionPtr>& regions,
|
||||
content::WebContents* contents) override;
|
||||
|
||||
// WebContentsObserver methods:
|
||||
void RenderFrameCreated(content::RenderFrameHost* render_frame_host) override;
|
||||
|
@ -12,12 +12,17 @@
|
||||
#include "base/memory/scoped_refptr.h"
|
||||
#include "chrome/browser/ui/page_action/page_action_icon_type.h"
|
||||
#include "content/public/browser/web_contents_delegate.h"
|
||||
#include "third_party/blink/public/mojom/page/draggable_region.mojom-forward.h"
|
||||
#include "third_party/skia/include/core/SkRegion.h"
|
||||
#include "ui/base/window_open_disposition.h"
|
||||
|
||||
class Browser;
|
||||
class Profile;
|
||||
|
||||
namespace content {
|
||||
class NavigationHandle;
|
||||
}
|
||||
|
||||
namespace cef {
|
||||
|
||||
// Delegate for the chrome Browser object. Lifespan is controlled by the Browser
|
||||
@ -151,16 +156,22 @@ class BrowserDelegate : public content::WebContentsDelegate {
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
// Set the draggable region relative to web contents.
|
||||
// Called from DraggableRegionsHostImpl::UpdateDraggableRegions.
|
||||
virtual void UpdateDraggableRegion(const SkRegion& region) {}
|
||||
|
||||
// Called at the end of a fullscreen transition.
|
||||
virtual void WindowFullscreenStateChanged() {}
|
||||
|
||||
// Returns true if this browser has a Views-hosted opener. Only
|
||||
// applicable for Browsers of type picture_in_picture and devtools.
|
||||
virtual bool HasViewsHostedOpener() const { return false; }
|
||||
|
||||
// Same as OpenURLFromTab but only taking |navigation_handle_callback|
|
||||
// if the return value is non-nullptr.
|
||||
virtual content::WebContents* OpenURLFromTabEx(
|
||||
content::WebContents* source,
|
||||
const content::OpenURLParams& params,
|
||||
base::OnceCallback<void(content::NavigationHandle&)>&
|
||||
navigation_handle_callback) {
|
||||
return nullptr;
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace cef
|
||||
|
@ -2,10 +2,10 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "libcef/browser/chrome/chrome_browser_delegate.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "libcef/browser/browser_contents_delegate.h"
|
||||
#include "libcef/browser/browser_host_base.h"
|
||||
#include "libcef/browser/browser_info_manager.h"
|
||||
@ -22,12 +22,14 @@
|
||||
#include "libcef/browser/views/window_impl.h"
|
||||
#include "libcef/common/app_manager.h"
|
||||
#include "libcef/common/frame_util.h"
|
||||
#include "third_party/blink/public/mojom/page/draggable_region.mojom.h"
|
||||
|
||||
#include "chrome/browser/profiles/profile.h"
|
||||
#include "chrome/browser/ui/browser.h"
|
||||
#include "chrome/browser/ui/browser_tabstrip.h"
|
||||
#include "content/public/browser/global_routing_id.h"
|
||||
#include "content/public/browser/keyboard_event_processing_result.h"
|
||||
#include "content/public/browser/navigation_handle.h"
|
||||
#include "content/public/browser/render_widget_host.h"
|
||||
#include "content/public/browser/render_widget_host_view.h"
|
||||
#include "content/public/common/input/native_web_keyboard_event.h"
|
||||
@ -454,9 +456,23 @@ const std::optional<SkRegion> ChromeBrowserDelegate::GetDraggableRegion()
|
||||
return draggable_region_;
|
||||
}
|
||||
|
||||
void ChromeBrowserDelegate::UpdateDraggableRegion(const SkRegion& region) {
|
||||
DCHECK(SupportsDraggableRegion());
|
||||
draggable_region_ = region;
|
||||
void ChromeBrowserDelegate::DraggableRegionsChanged(
|
||||
const std::vector<blink::mojom::DraggableRegionPtr>& regions,
|
||||
content::WebContents* contents) {
|
||||
if (SupportsDraggableRegion()) {
|
||||
SkRegion sk_region;
|
||||
for (const auto& region : regions) {
|
||||
sk_region.op(
|
||||
SkIRect::MakeLTRB(region->bounds.x(), region->bounds.y(),
|
||||
region->bounds.x() + region->bounds.width(),
|
||||
region->bounds.y() + region->bounds.height()),
|
||||
region->draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op);
|
||||
}
|
||||
|
||||
draggable_region_ = sk_region;
|
||||
} else if (auto delegate = GetDelegateForWebContents(contents)) {
|
||||
delegate->DraggableRegionsChanged(regions, contents);
|
||||
}
|
||||
}
|
||||
|
||||
void ChromeBrowserDelegate::WindowFullscreenStateChanged() {
|
||||
@ -512,9 +528,11 @@ void ChromeBrowserDelegate::WebContentsCreated(
|
||||
/*is_devtools_popup=*/false, opener);
|
||||
}
|
||||
|
||||
content::WebContents* ChromeBrowserDelegate::OpenURLFromTab(
|
||||
content::WebContents* ChromeBrowserDelegate::OpenURLFromTabEx(
|
||||
content::WebContents* source,
|
||||
const content::OpenURLParams& params) {
|
||||
const content::OpenURLParams& params,
|
||||
base::OnceCallback<void(content::NavigationHandle&)>&
|
||||
navigation_handle_callback) {
|
||||
// |source| may be nullptr when opening a link from chrome UI such as the
|
||||
// Reading List sidebar. In that case we default to using the Browser's
|
||||
// currently active WebContents.
|
||||
@ -526,7 +544,8 @@ content::WebContents* ChromeBrowserDelegate::OpenURLFromTab(
|
||||
// Return nullptr to cancel the navigation. Otherwise, proceed with default
|
||||
// chrome handling.
|
||||
if (auto delegate = GetDelegateForWebContents(source)) {
|
||||
return delegate->OpenURLFromTab(source, params);
|
||||
return delegate->OpenURLFromTabEx(source, params,
|
||||
navigation_handle_callback);
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -87,9 +87,13 @@ class ChromeBrowserDelegate : public cef::BrowserDelegate {
|
||||
std::optional<bool> SupportsWindowFeature(int feature) const override;
|
||||
bool SupportsDraggableRegion() const override;
|
||||
const std::optional<SkRegion> GetDraggableRegion() const override;
|
||||
void UpdateDraggableRegion(const SkRegion& region) override;
|
||||
void WindowFullscreenStateChanged() override;
|
||||
bool HasViewsHostedOpener() const override;
|
||||
content::WebContents* OpenURLFromTabEx(
|
||||
content::WebContents* source,
|
||||
const content::OpenURLParams& params,
|
||||
base::OnceCallback<void(content::NavigationHandle&)>&
|
||||
navigation_handle_callback) override;
|
||||
|
||||
// WebContentsDelegate methods:
|
||||
void WebContentsCreated(content::WebContents* source_contents,
|
||||
@ -98,9 +102,6 @@ class ChromeBrowserDelegate : public cef::BrowserDelegate {
|
||||
const std::string& frame_name,
|
||||
const GURL& target_url,
|
||||
content::WebContents* new_contents) override;
|
||||
content::WebContents* OpenURLFromTab(
|
||||
content::WebContents* source,
|
||||
const content::OpenURLParams& params) override;
|
||||
void LoadingStateChanged(content::WebContents* source,
|
||||
bool should_show_loading_ui) override;
|
||||
void UpdateTargetURL(content::WebContents* source, const GURL& url) override;
|
||||
@ -122,6 +123,9 @@ class ChromeBrowserDelegate : public cef::BrowserDelegate {
|
||||
bool HandleKeyboardEvent(
|
||||
content::WebContents* source,
|
||||
const content::NativeWebKeyboardEvent& event) override;
|
||||
void DraggableRegionsChanged(
|
||||
const std::vector<blink::mojom::DraggableRegionPtr>& regions,
|
||||
content::WebContents* contents) override;
|
||||
|
||||
Browser* browser() const { return browser_; }
|
||||
|
||||
|
@ -146,7 +146,12 @@ void ChromeBrowserHostImpl::OnWebContentsDestroyed(
|
||||
// CefBrowserInfoManager::DestroyAllBrowsers().
|
||||
if (platform_delegate_) {
|
||||
platform_delegate_->WebContentsDestroyed(web_contents);
|
||||
DestroyBrowser();
|
||||
|
||||
// Destroy the browser asynchronously to allow the current call stack
|
||||
// to unwind (we may have been called via the TabStripModel owned by the
|
||||
// Browser).
|
||||
CEF_POST_TASK(CEF_UIT,
|
||||
base::BindOnce(&ChromeBrowserHostImpl::DestroyBrowser, this));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -236,6 +236,7 @@ void ChromeContentBrowserClientCef::WillCreateURLLoaderFactory(
|
||||
int render_process_id,
|
||||
URLLoaderFactoryType type,
|
||||
const url::Origin& request_initiator,
|
||||
const net::IsolationInfo& isolation_info,
|
||||
std::optional<int64_t> navigation_id,
|
||||
ukm::SourceIdObj ukm_source_id,
|
||||
network::URLLoaderFactoryBuilder& factory_builder,
|
||||
@ -252,9 +253,9 @@ void ChromeContentBrowserClientCef::WillCreateURLLoaderFactory(
|
||||
if (!CefBrowserContext::FromProfile(profile)) {
|
||||
ChromeContentBrowserClient::WillCreateURLLoaderFactory(
|
||||
browser_context, frame, render_process_id, type, request_initiator,
|
||||
navigation_id, ukm_source_id, factory_builder, header_client,
|
||||
bypass_redirect_checks, disable_secure_dns, factory_override,
|
||||
navigation_response_task_runner);
|
||||
isolation_info, navigation_id, ukm_source_id, factory_builder,
|
||||
header_client, bypass_redirect_checks, disable_secure_dns,
|
||||
factory_override, navigation_response_task_runner);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -283,7 +284,7 @@ void ChromeContentBrowserClientCef::WillCreateURLLoaderFactory(
|
||||
// TODO(chrome): Is it necessary to proxy |header_client| callbacks?
|
||||
ChromeContentBrowserClient::WillCreateURLLoaderFactory(
|
||||
browser_context, frame, render_process_id, type, request_initiator,
|
||||
navigation_id, ukm_source_id, factory_builder,
|
||||
isolation_info, navigation_id, ukm_source_id, factory_builder,
|
||||
/*header_client=*/nullptr, bypass_redirect_checks, disable_secure_dns,
|
||||
handler_override, navigation_response_task_runner);
|
||||
|
||||
|
@ -62,6 +62,7 @@ class ChromeContentBrowserClientCef : public ChromeContentBrowserClient {
|
||||
int render_process_id,
|
||||
URLLoaderFactoryType type,
|
||||
const url::Origin& request_initiator,
|
||||
const net::IsolationInfo& isolation_info,
|
||||
std::optional<int64_t> navigation_id,
|
||||
ukm::SourceIdObj ukm_source_id,
|
||||
network::URLLoaderFactoryBuilder& factory_builder,
|
||||
|
@ -29,7 +29,7 @@ CefDevToolsController::~CefDevToolsController() {
|
||||
}
|
||||
|
||||
bool CefDevToolsController::SendDevToolsMessage(
|
||||
const base::StringPiece& message) {
|
||||
const std::string_view& message) {
|
||||
CEF_REQUIRE_UIT();
|
||||
if (!EnsureAgentHost()) {
|
||||
return false;
|
||||
@ -100,8 +100,8 @@ void CefDevToolsController::DispatchProtocolMessage(
|
||||
return;
|
||||
}
|
||||
|
||||
base::StringPiece str_message(reinterpret_cast<const char*>(message.data()),
|
||||
message.size());
|
||||
std::string_view str_message(reinterpret_cast<const char*>(message.data()),
|
||||
message.size());
|
||||
if (!devtools_util::ProtocolParser::IsValidMessage(str_message)) {
|
||||
LOG(WARNING) << "Invalid message: " << str_message.substr(0, 100);
|
||||
return;
|
||||
|
@ -7,13 +7,12 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "content/public/browser/devtools_agent_host_client.h"
|
||||
|
||||
#include "base/containers/span.h"
|
||||
#include "base/memory/scoped_refptr.h"
|
||||
#include "base/memory/weak_ptr.h"
|
||||
#include "base/observer_list.h"
|
||||
#include "base/values.h"
|
||||
#include "content/public/browser/devtools_agent_host_client.h"
|
||||
|
||||
namespace content {
|
||||
class WebContents;
|
||||
@ -24,12 +23,12 @@ class CefDevToolsController : public content::DevToolsAgentHostClient {
|
||||
class Observer : public base::CheckedObserver {
|
||||
public:
|
||||
// See CefDevToolsMessageObserver documentation.
|
||||
virtual bool OnDevToolsMessage(const base::StringPiece& message) = 0;
|
||||
virtual bool OnDevToolsMessage(const std::string_view& message) = 0;
|
||||
virtual void OnDevToolsMethodResult(int message_id,
|
||||
bool success,
|
||||
const base::StringPiece& result) = 0;
|
||||
virtual void OnDevToolsEvent(const base::StringPiece& method,
|
||||
const base::StringPiece& params) = 0;
|
||||
const std::string_view& result) = 0;
|
||||
virtual void OnDevToolsEvent(const std::string_view& method,
|
||||
const std::string_view& params) = 0;
|
||||
virtual void OnDevToolsAgentAttached() = 0;
|
||||
virtual void OnDevToolsAgentDetached() = 0;
|
||||
|
||||
@ -48,7 +47,7 @@ class CefDevToolsController : public content::DevToolsAgentHostClient {
|
||||
~CefDevToolsController() override;
|
||||
|
||||
// See CefBrowserHost methods of the same name for documentation.
|
||||
bool SendDevToolsMessage(const base::StringPiece& message);
|
||||
bool SendDevToolsMessage(const std::string_view& message);
|
||||
int ExecuteDevToolsMethod(int message_id,
|
||||
const std::string& method,
|
||||
const base::Value::Dict* params);
|
||||
|
@ -50,7 +50,7 @@ class CefDevToolsRegistrationImpl : public CefRegistration,
|
||||
|
||||
private:
|
||||
// CefDevToolsController::Observer methods:
|
||||
bool OnDevToolsMessage(const base::StringPiece& message) override {
|
||||
bool OnDevToolsMessage(const std::string_view& message) override {
|
||||
CEF_REQUIRE_UIT();
|
||||
return observer_->OnDevToolsMessage(browser_, message.data(),
|
||||
message.size());
|
||||
@ -58,14 +58,14 @@ class CefDevToolsRegistrationImpl : public CefRegistration,
|
||||
|
||||
void OnDevToolsMethodResult(int message_id,
|
||||
bool success,
|
||||
const base::StringPiece& result) override {
|
||||
const std::string_view& result) override {
|
||||
CEF_REQUIRE_UIT();
|
||||
observer_->OnDevToolsMethodResult(browser_, message_id, success,
|
||||
result.data(), result.size());
|
||||
}
|
||||
|
||||
void OnDevToolsEvent(const base::StringPiece& method,
|
||||
const base::StringPiece& params) override {
|
||||
void OnDevToolsEvent(const std::string_view& method,
|
||||
const std::string_view& params) override {
|
||||
CEF_REQUIRE_UIT();
|
||||
observer_->OnDevToolsEvent(browser_, std::string(method), params.data(),
|
||||
params.size());
|
||||
@ -119,7 +119,7 @@ bool CefDevToolsProtocolManager::SendDevToolsMessage(const void* message,
|
||||
}
|
||||
|
||||
return devtools_controller_->SendDevToolsMessage(
|
||||
base::StringPiece(static_cast<const char*>(message), message_size));
|
||||
std::string_view(static_cast<const char*>(message), message_size));
|
||||
}
|
||||
|
||||
int CefDevToolsProtocolManager::ExecuteDevToolsMethod(
|
||||
|
@ -11,16 +11,16 @@ namespace devtools_util {
|
||||
|
||||
namespace {
|
||||
|
||||
bool IsValidDictionary(const base::StringPiece& str, bool allow_empty) {
|
||||
bool IsValidDictionary(const std::string_view& str, bool allow_empty) {
|
||||
return str.length() >= (allow_empty ? 2 : 3) && str[0] == '{' &&
|
||||
str[str.length() - 1] == '}';
|
||||
}
|
||||
|
||||
// Example:
|
||||
// {"method":"Target.targetDestroyed","params":{"targetId":"1234..."}}
|
||||
bool ParseEvent(const base::StringPiece& message,
|
||||
base::StringPiece& method,
|
||||
base::StringPiece& params) {
|
||||
bool ParseEvent(const std::string_view& message,
|
||||
std::string_view& method,
|
||||
std::string_view& params) {
|
||||
static const char kMethodStart[] = "{\"method\":\"";
|
||||
static const char kMethodEnd[] = "\"";
|
||||
static const char kParamsStart[] = ",\"params\":";
|
||||
@ -31,7 +31,7 @@ bool ParseEvent(const base::StringPiece& message,
|
||||
|
||||
const size_t method_start = sizeof(kMethodStart) - 1;
|
||||
const size_t method_end = message.find(kMethodEnd, method_start);
|
||||
if (method_end == base::StringPiece::npos) {
|
||||
if (method_end == std::string_view::npos) {
|
||||
return false;
|
||||
}
|
||||
method = message.substr(method_start, method_end - method_start);
|
||||
@ -42,9 +42,9 @@ bool ParseEvent(const base::StringPiece& message,
|
||||
size_t remainder_start = method_end + sizeof(kMethodEnd) - 1;
|
||||
if (remainder_start == message.size() - 1) {
|
||||
// No more contents.
|
||||
params = base::StringPiece();
|
||||
params = std::string_view();
|
||||
} else {
|
||||
const base::StringPiece& remainder = message.substr(remainder_start);
|
||||
const std::string_view& remainder = message.substr(remainder_start);
|
||||
if (base::StartsWith(remainder, kParamsStart)) {
|
||||
// Stop immediately before the message closing bracket.
|
||||
remainder_start += sizeof(kParamsStart) - 1;
|
||||
@ -67,10 +67,10 @@ bool ParseEvent(const base::StringPiece& message,
|
||||
// {"id":3,"result":{}}
|
||||
// {"id":4,"result":{"debuggerId":"-2193881606781505058.81393575456727957"}}
|
||||
// {"id":5,"error":{"code":-32000,"message":"Not supported"}}
|
||||
bool ParseResult(const base::StringPiece& message,
|
||||
bool ParseResult(const std::string_view& message,
|
||||
int& message_id,
|
||||
bool& success,
|
||||
base::StringPiece& result) {
|
||||
std::string_view& result) {
|
||||
static const char kIdStart[] = "{\"id\":";
|
||||
static const char kIdEnd[] = ",";
|
||||
static const char kResultStart[] = "\"result\":";
|
||||
@ -82,16 +82,16 @@ bool ParseResult(const base::StringPiece& message,
|
||||
|
||||
const size_t id_start = sizeof(kIdStart) - 1;
|
||||
const size_t id_end = message.find(kIdEnd, id_start);
|
||||
if (id_end == base::StringPiece::npos) {
|
||||
if (id_end == std::string_view::npos) {
|
||||
return false;
|
||||
}
|
||||
const base::StringPiece& id_str = message.substr(id_start, id_end - id_start);
|
||||
const std::string_view& id_str = message.substr(id_start, id_end - id_start);
|
||||
if (id_str.empty() || !base::StringToInt(id_str, &message_id)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
size_t remainder_start = id_end + sizeof(kIdEnd) - 1;
|
||||
const base::StringPiece& remainder = message.substr(remainder_start);
|
||||
const std::string_view& remainder = message.substr(remainder_start);
|
||||
if (base::StartsWith(remainder, kResultStart)) {
|
||||
// Stop immediately before the message closing bracket.
|
||||
remainder_start += sizeof(kResultStart) - 1;
|
||||
@ -119,11 +119,11 @@ bool ParseResult(const base::StringPiece& message,
|
||||
} // namespace
|
||||
|
||||
// static
|
||||
bool ProtocolParser::IsValidMessage(const base::StringPiece& message) {
|
||||
bool ProtocolParser::IsValidMessage(const std::string_view& message) {
|
||||
return IsValidDictionary(message, /*allow_empty=*/false);
|
||||
}
|
||||
|
||||
bool ProtocolParser::Initialize(const base::StringPiece& message) {
|
||||
bool ProtocolParser::Initialize(const std::string_view& message) {
|
||||
if (status_ != UNINITIALIZED) {
|
||||
return false;
|
||||
}
|
||||
|
@ -6,7 +6,7 @@
|
||||
#define CEF_LIBCEF_BROWSER_DEVTOOLS_DEVTOOLS_UTIL_H_
|
||||
#pragma once
|
||||
|
||||
#include "base/strings/string_piece.h"
|
||||
#include <string_view>
|
||||
|
||||
namespace devtools_util {
|
||||
|
||||
@ -31,10 +31,10 @@ struct ProtocolParser {
|
||||
ProtocolParser() = default;
|
||||
|
||||
// Checks for a non-empty JSON dictionary.
|
||||
static bool IsValidMessage(const base::StringPiece& message);
|
||||
static bool IsValidMessage(const std::string_view& message);
|
||||
|
||||
// Returns false if already initialized.
|
||||
bool Initialize(const base::StringPiece& message);
|
||||
bool Initialize(const std::string_view& message);
|
||||
|
||||
bool IsInitialized() const { return status_ != UNINITIALIZED; }
|
||||
bool IsEvent() const { return status_ == EVENT; }
|
||||
@ -45,7 +45,7 @@ struct ProtocolParser {
|
||||
|
||||
// For event messages:
|
||||
// "method" string:
|
||||
base::StringPiece method_;
|
||||
std::string_view method_;
|
||||
|
||||
// For result messages:
|
||||
// "id" int:
|
||||
@ -55,7 +55,7 @@ struct ProtocolParser {
|
||||
|
||||
// For both:
|
||||
// "params", "result" or "error" dictionary:
|
||||
base::StringPiece params_;
|
||||
std::string_view params_;
|
||||
|
||||
private:
|
||||
enum Status {
|
||||
@ -69,4 +69,4 @@ struct ProtocolParser {
|
||||
|
||||
} // namespace devtools_util
|
||||
|
||||
#endif // CEF_LIBCEF_BROWSER_DEVTOOLS_DEVTOOLS_UTIL_H_
|
||||
#endif // CEF_LIBCEF_BROWSER_DEVTOOLS_DEVTOOLS_UTIL_H_
|
||||
|
@ -59,7 +59,7 @@ namespace {
|
||||
|
||||
// Implementation based on ComponentLoader::ParseManifest.
|
||||
std::optional<base::Value::Dict> ParseManifest(
|
||||
base::StringPiece manifest_contents) {
|
||||
std::string_view manifest_contents) {
|
||||
JSONStringValueDeserializer deserializer(manifest_contents);
|
||||
std::unique_ptr<base::Value> manifest =
|
||||
deserializer.Deserialize(nullptr, nullptr);
|
||||
|
@ -39,7 +39,8 @@ class CefMediaStreamUI : public content::MediaStreamUI {
|
||||
void OnDeviceStoppedForSourceChange(
|
||||
const std::string& label,
|
||||
const content::DesktopMediaID& old_media_id,
|
||||
const content::DesktopMediaID& new_media_id) override {}
|
||||
const content::DesktopMediaID& new_media_id,
|
||||
bool captured_surface_control_active) override {}
|
||||
|
||||
void OnDeviceStopped(const std::string& label,
|
||||
const content::DesktopMediaID& media_id) override {}
|
||||
|
@ -500,7 +500,7 @@ class CefBrowserURLRequest::Context
|
||||
}
|
||||
|
||||
// SimpleURLLoaderStreamConsumer methods:
|
||||
void OnDataReceived(base::StringPiece string_piece,
|
||||
void OnDataReceived(std::string_view string_piece,
|
||||
base::OnceClosure resume) override {
|
||||
DCHECK(CalledOnValidThread());
|
||||
DCHECK_EQ(status_, UR_IO_PENDING);
|
||||
|
@ -253,7 +253,8 @@ void LoadCookies(const CefBrowserContext::Getter& browser_context_getter,
|
||||
!request.trusted_params->isolation_info.IsEmpty()) {
|
||||
partition_key_collection = net::CookiePartitionKeyCollection::FromOptional(
|
||||
net::CookiePartitionKey::FromNetworkIsolationKey(
|
||||
request.trusted_params->isolation_info.network_isolation_key()));
|
||||
request.trusted_params->isolation_info.network_isolation_key(),
|
||||
request.site_for_cookies, net::SchemefulSite(request.url)));
|
||||
}
|
||||
|
||||
CEF_POST_TASK(
|
||||
@ -286,7 +287,7 @@ void SaveCookies(const CefBrowserContext::Getter& browser_context_getter,
|
||||
response_date = base::Time();
|
||||
}
|
||||
|
||||
const base::StringPiece name(net_service::kHTTPSetCookieHeaderName);
|
||||
const std::string_view name(net_service::kHTTPSetCookieHeaderName);
|
||||
std::string cookie_string;
|
||||
size_t iter = 0;
|
||||
net::CookieList allowed_cookies;
|
||||
@ -300,7 +301,8 @@ void SaveCookies(const CefBrowserContext::Getter& browser_context_getter,
|
||||
request.url, cookie_string, base::Time::Now(),
|
||||
std::make_optional(response_date),
|
||||
/*cookie_partition_key=*/std::nullopt,
|
||||
/*block_truncated=*/true, &returned_status);
|
||||
/*block_truncated=*/true, net::CookieSourceType::kHTTP,
|
||||
&returned_status);
|
||||
if (!returned_status.IsInclude()) {
|
||||
continue;
|
||||
}
|
||||
|
@ -303,7 +303,7 @@ bool CefCookieManagerImpl::SetCookieInternal(
|
||||
/*creation_time=*/base::Time(), expiration_time,
|
||||
/*last_access_time=*/base::Time(), cookie.secure ? true : false,
|
||||
cookie.httponly ? true : false, same_site, priority,
|
||||
/*partition_key=*/std::nullopt);
|
||||
/*partition_key=*/std::nullopt, /*status=*/nullptr);
|
||||
|
||||
if (!canonical_cookie) {
|
||||
SetCookieCallbackImpl(
|
||||
|
@ -6,14 +6,14 @@
|
||||
#ifndef CEF_LIBCEF_BROWSER_NET_SERVICE_PROXY_URL_LOADER_FACTORY_H_
|
||||
#define CEF_LIBCEF_BROWSER_NET_SERVICE_PROXY_URL_LOADER_FACTORY_H_
|
||||
|
||||
#include "libcef/browser/net_service/stream_reader_url_loader.h"
|
||||
|
||||
#include <optional>
|
||||
#include <string_view>
|
||||
|
||||
#include "libcef/browser/net_service/stream_reader_url_loader.h"
|
||||
|
||||
#include "base/containers/unique_ptr_adapters.h"
|
||||
#include "base/functional/callback.h"
|
||||
#include "base/hash/hash.h"
|
||||
#include "base/strings/string_piece.h"
|
||||
#include "content/public/browser/content_browser_client.h"
|
||||
#include "content/public/browser/web_contents.h"
|
||||
#include "mojo/public/cpp/bindings/pending_receiver.h"
|
||||
|
@ -215,7 +215,7 @@ void ResponseFilterWrapper::Write(std::unique_ptr<std::string> data) {
|
||||
|
||||
write_pending_ = true;
|
||||
|
||||
base::StringPiece string_piece(*data);
|
||||
std::string_view string_piece(*data);
|
||||
forwarder_->Write(std::make_unique<mojo::StringDataSource>(
|
||||
string_piece, mojo::StringDataSource::AsyncWritingMode::
|
||||
STRING_STAYS_VALID_UNTIL_COMPLETION),
|
||||
|
@ -45,8 +45,8 @@ scoped_refptr<URLLoaderFactoryGetter> URLLoaderFactoryGetter::Create(
|
||||
// Allow DevTools to potentially inject itself into the proxy pipe.
|
||||
content::devtools_instrumentation::WillCreateURLLoaderFactoryParams::
|
||||
ForFrame(static_cast<content::RenderFrameHostImpl*>(render_frame_host))
|
||||
.Run(false /* is_navigation */, false /* is_download */,
|
||||
factory_builder, nullptr /* factory_override */);
|
||||
.Run(/*is_navigation=*/false, /*is_download=*/false,
|
||||
factory_builder, /*factory_override=*/nullptr);
|
||||
}
|
||||
|
||||
auto browser_client = CefAppManager::Get()->GetContentClient()->browser();
|
||||
@ -55,11 +55,11 @@ scoped_refptr<URLLoaderFactoryGetter> URLLoaderFactoryGetter::Create(
|
||||
browser_client->WillCreateURLLoaderFactory(
|
||||
browser_context, render_frame_host, render_process_id,
|
||||
content::ContentBrowserClient::URLLoaderFactoryType::kDocumentSubResource,
|
||||
url::Origin(), std::nullopt /* navigation_id */, ukm::SourceIdObj(),
|
||||
factory_builder, nullptr /* header_client */,
|
||||
nullptr /* bypass_redirect_checks */, nullptr /* disable_secure_dns */,
|
||||
nullptr /* factory_override */,
|
||||
nullptr /* navigation_response_task_runner */);
|
||||
url::Origin(), net::IsolationInfo(), /*navigation_id=*/std::nullopt,
|
||||
ukm::SourceIdObj(), factory_builder, /*header_client=*/nullptr,
|
||||
/*bypass_redirect_checks=*/nullptr, /*disable_secure_dns=*/nullptr,
|
||||
/*factory_override=*/nullptr,
|
||||
/*navigation_response_task_runner=*/nullptr);
|
||||
|
||||
return base::WrapRefCounted(new URLLoaderFactoryGetter(
|
||||
loader_factory->Clone(), std::move(factory_builder)));
|
||||
|
@ -328,17 +328,21 @@ void CefBrowserPlatformDelegateOsr::DragTargetDragEnter(
|
||||
gfx::PointF transformed_pt;
|
||||
|
||||
// Some random crashes occured when GetWeakPtr is called on a null pointer
|
||||
// that is the return of GetRenderWidgetHostAtPoint As the root cause is not
|
||||
// yet understood (no reproducible scenario yet), the current fix is only a
|
||||
// protection against null pointer dereferencing.
|
||||
content::RenderWidgetHostImpl* ptr_current_rwh_for_drag =
|
||||
web_contents->GetInputEventRouter()->GetRenderWidgetHostAtPoint(
|
||||
// that is the return of GetRenderWidgetHostViewInputAtPoint. As the root
|
||||
// cause is not yet understood (no reproducible scenario yet), the current fix
|
||||
// is only a protection against null pointer dereferencing.
|
||||
auto* view =
|
||||
web_contents->GetInputEventRouter()->GetRenderWidgetHostViewInputAtPoint(
|
||||
web_contents->GetRenderViewHost()->GetWidget()->GetView(),
|
||||
gfx::PointF(client_pt), &transformed_pt);
|
||||
if (!ptr_current_rwh_for_drag) {
|
||||
if (!view) {
|
||||
return;
|
||||
}
|
||||
current_rwh_for_drag_ = ptr_current_rwh_for_drag->GetWeakPtr();
|
||||
auto* target_rwh = content::RenderWidgetHostImpl::From(
|
||||
static_cast<content::RenderWidgetHostViewBase*>(view)
|
||||
->GetRenderWidgetHost());
|
||||
|
||||
current_rwh_for_drag_ = target_rwh->GetWeakPtr();
|
||||
|
||||
current_rvh_for_drag_ = web_contents->GetRenderViewHost();
|
||||
|
||||
@ -387,10 +391,13 @@ void CefBrowserPlatformDelegateOsr::DragTargetDragOver(
|
||||
GetScreenPoint(client_pt, /*want_dip_coords=*/false);
|
||||
|
||||
gfx::PointF transformed_pt;
|
||||
content::RenderWidgetHostImpl* target_rwh =
|
||||
web_contents->GetInputEventRouter()->GetRenderWidgetHostAtPoint(
|
||||
auto* view =
|
||||
web_contents->GetInputEventRouter()->GetRenderWidgetHostViewInputAtPoint(
|
||||
web_contents->GetRenderViewHost()->GetWidget()->GetView(),
|
||||
gfx::PointF(client_pt), &transformed_pt);
|
||||
auto* target_rwh = content::RenderWidgetHostImpl::From(
|
||||
static_cast<content::RenderWidgetHostViewBase*>(view)
|
||||
->GetRenderWidgetHost());
|
||||
|
||||
if (target_rwh != current_rwh_for_drag_.get()) {
|
||||
if (current_rwh_for_drag_) {
|
||||
@ -458,10 +465,13 @@ void CefBrowserPlatformDelegateOsr::DragTargetDrop(const CefMouseEvent& event) {
|
||||
GetScreenPoint(client_pt, /*want_dip_coords=*/false);
|
||||
|
||||
gfx::PointF transformed_pt;
|
||||
content::RenderWidgetHostImpl* target_rwh =
|
||||
web_contents->GetInputEventRouter()->GetRenderWidgetHostAtPoint(
|
||||
auto* view =
|
||||
web_contents->GetInputEventRouter()->GetRenderWidgetHostViewInputAtPoint(
|
||||
web_contents->GetRenderViewHost()->GetWidget()->GetView(),
|
||||
gfx::PointF(client_pt), &transformed_pt);
|
||||
auto* target_rwh = content::RenderWidgetHostImpl::From(
|
||||
static_cast<content::RenderWidgetHostViewBase*>(view)
|
||||
->GetRenderWidgetHost());
|
||||
|
||||
if (target_rwh != current_rwh_for_drag_.get()) {
|
||||
if (current_rwh_for_drag_) {
|
||||
|
@ -129,6 +129,10 @@ class CefPermissionPrompt : public permissions::PermissionPrompt {
|
||||
return std::nullopt;
|
||||
}
|
||||
bool ShouldFinalizeRequestAfterDecided() const override { return true; }
|
||||
std::vector<permissions::ElementAnchoredBubbleVariant> GetPromptVariants()
|
||||
const override {
|
||||
return {};
|
||||
}
|
||||
|
||||
private:
|
||||
// We don't expose AcceptThisTime() because it's a special case for
|
||||
|
@ -27,7 +27,9 @@
|
||||
#include "chrome/browser/preloading/preloading_prefs.h"
|
||||
#include "chrome/browser/printing/print_preview_sticky_settings.h"
|
||||
#include "chrome/browser/profiles/profile.h"
|
||||
#include "chrome/browser/profiles/profile_key.h"
|
||||
#include "chrome/browser/ssl/ssl_config_service_manager.h"
|
||||
#include "chrome/browser/supervised_user/supervised_user_settings_service_factory.h"
|
||||
#include "chrome/browser/themes/theme_service.h"
|
||||
#include "chrome/browser/ui/browser_view_prefs.h"
|
||||
#include "chrome/browser/ui/webui/accessibility/accessibility_ui.h"
|
||||
@ -61,7 +63,8 @@
|
||||
#include "components/safe_browsing/core/common/safe_browsing_prefs.h"
|
||||
#include "components/safe_search_api/safe_search_util.h"
|
||||
#include "components/spellcheck/browser/pref_names.h"
|
||||
#include "components/supervised_user/core/common/buildflags.h"
|
||||
#include "components/supervised_user/core/browser/supervised_user_pref_store.h"
|
||||
#include "components/supervised_user/core/browser/supervised_user_settings_service.h"
|
||||
#include "components/sync_preferences/pref_service_syncable.h"
|
||||
#include "components/sync_preferences/pref_service_syncable_factory.h"
|
||||
#include "components/unified_consent/unified_consent_service.h"
|
||||
@ -77,13 +80,6 @@
|
||||
#include "components/os_crypt/sync/os_crypt.h"
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
|
||||
#include "chrome/browser/profiles/profile_key.h"
|
||||
#include "chrome/browser/supervised_user/supervised_user_settings_service_factory.h"
|
||||
#include "components/supervised_user/core/browser/supervised_user_pref_store.h"
|
||||
#include "components/supervised_user/core/browser/supervised_user_settings_service.h"
|
||||
#endif
|
||||
|
||||
namespace browser_prefs {
|
||||
|
||||
namespace {
|
||||
@ -170,7 +166,6 @@ std::unique_ptr<PrefService> CreatePrefService(Profile* profile,
|
||||
factory.set_user_prefs(cef_pref_store.get());
|
||||
}
|
||||
|
||||
#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
|
||||
if (profile) {
|
||||
// Used to store supervised user preferences.
|
||||
auto* supervised_user_settings =
|
||||
@ -191,7 +186,6 @@ std::unique_ptr<PrefService> CreatePrefService(Profile* profile,
|
||||
DCHECK(supervised_user_prefs->IsInitializationComplete());
|
||||
factory.set_supervised_user_prefs(supervised_user_prefs);
|
||||
}
|
||||
#endif // BUILDFLAG(ENABLE_SUPERVISED_USERS)
|
||||
|
||||
// Registry that will be populated with all known preferences. Preferences
|
||||
// are registered with default values that may be changed via a *PrefStore.
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
CefPrefStore::CefPrefStore() = default;
|
||||
|
||||
bool CefPrefStore::GetValue(base::StringPiece key,
|
||||
bool CefPrefStore::GetValue(std::string_view key,
|
||||
const base::Value** value) const {
|
||||
return prefs_.GetValue(key, value);
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ class CefPrefStore : public PersistentPrefStore {
|
||||
CefPrefStore& operator=(const CefPrefStore&) = delete;
|
||||
|
||||
// Overriden from PrefStore.
|
||||
bool GetValue(base::StringPiece key,
|
||||
bool GetValue(std::string_view key,
|
||||
const base::Value** result) const override;
|
||||
base::Value::Dict GetValues() const override;
|
||||
void AddObserver(PrefStore::Observer* observer) override;
|
||||
|
@ -89,3 +89,7 @@ bool CefSpeechRecognitionManagerDelegate::FilterProfanities(
|
||||
int render_process_id) {
|
||||
return filter_profanities_;
|
||||
}
|
||||
|
||||
void CefSpeechRecognitionManagerDelegate::BindSpeechRecognitionContext(
|
||||
mojo::PendingReceiver<media::mojom::SpeechRecognitionContext>
|
||||
recognition_receiver) {}
|
||||
|
@ -52,6 +52,9 @@ class CefSpeechRecognitionManagerDelegate
|
||||
override;
|
||||
content::SpeechRecognitionEventListener* GetEventListener() override;
|
||||
bool FilterProfanities(int render_process_id) override;
|
||||
void BindSpeechRecognitionContext(
|
||||
mojo::PendingReceiver<media::mojom::SpeechRecognitionContext> receiver)
|
||||
override;
|
||||
|
||||
private:
|
||||
bool filter_profanities_;
|
||||
|
@ -33,9 +33,9 @@ class CefTestServerConnectionImpl : public CefTestServerConnection {
|
||||
size_t data_size) override {
|
||||
auto response = std::make_unique<BasicHttpResponse>();
|
||||
response->set_code(net::HTTP_OK);
|
||||
response->set_content_type(base::StringPiece(content_type.ToString()));
|
||||
response->set_content_type(std::string_view(content_type.ToString()));
|
||||
response->set_content(
|
||||
base::StringPiece(reinterpret_cast<const char*>(data), data_size));
|
||||
std::string_view(reinterpret_cast<const char*>(data), data_size));
|
||||
SendBasicHttpResponse(std::move(response));
|
||||
}
|
||||
|
||||
@ -48,8 +48,8 @@ class CefTestServerConnectionImpl : public CefTestServerConnection {
|
||||
void SendHttp500Response(const CefString& error_message) override {
|
||||
auto response = std::make_unique<BasicHttpResponse>();
|
||||
response->set_code(net::HTTP_INTERNAL_SERVER_ERROR);
|
||||
response->set_content_type(base::StringPiece("text/html"));
|
||||
response->set_content(base::StringPiece(error_message.ToString()));
|
||||
response->set_content_type(std::string_view("text/html"));
|
||||
response->set_content(std::string_view(error_message.ToString()));
|
||||
SendBasicHttpResponse(std::move(response));
|
||||
}
|
||||
|
||||
@ -60,9 +60,9 @@ class CefTestServerConnectionImpl : public CefTestServerConnection {
|
||||
const HeaderMap& extra_headers) override {
|
||||
auto response = std::make_unique<BasicHttpResponse>();
|
||||
response->set_code(static_cast<net::HttpStatusCode>(response_code));
|
||||
response->set_content_type(base::StringPiece(content_type.ToString()));
|
||||
response->set_content_type(std::string_view(content_type.ToString()));
|
||||
response->set_content(
|
||||
base::StringPiece(reinterpret_cast<const char*>(data), data_size));
|
||||
std::string_view(reinterpret_cast<const char*>(data), data_size));
|
||||
for (const auto& [key, value] : extra_headers) {
|
||||
response->AddCustomHeader(key.ToString(), value.ToString());
|
||||
}
|
||||
|
@ -299,6 +299,7 @@
|
||||
#include "base/logging.h"
|
||||
#include "base/values.h"
|
||||
#include "ui/gfx/color_palette.h"
|
||||
#include "ui/views/accessibility/view_accessibility.h"
|
||||
#include "ui/views/background.h"
|
||||
#include "ui/views/border.h"
|
||||
#include "ui/views/view.h"
|
||||
@ -667,7 +668,7 @@ CEF_VIEW_IMPL_T bool CEF_VIEW_IMPL_D::IsFocusable() {
|
||||
|
||||
CEF_VIEW_IMPL_T bool CEF_VIEW_IMPL_D::IsAccessibilityFocusable() {
|
||||
CEF_REQUIRE_VALID_RETURN(false);
|
||||
return root_view()->IsAccessibilityFocusable();
|
||||
return root_view()->GetViewAccessibility().IsAccessibilityFocusable();
|
||||
}
|
||||
|
||||
CEF_VIEW_IMPL_T void CEF_VIEW_IMPL_D::RequestFocus() {
|
||||
|
@ -7,6 +7,8 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <string_view>
|
||||
|
||||
#include "include/cef_stream.h"
|
||||
#include "include/cef_version.h"
|
||||
#include "libcef/common/app_manager.h"
|
||||
@ -18,7 +20,6 @@
|
||||
#include "base/json/json_reader.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/path_service.h"
|
||||
#include "base/strings/string_piece.h"
|
||||
#include "base/strings/string_split.h"
|
||||
#include "base/strings/string_util.h"
|
||||
#include "base/strings/stringprintf.h"
|
||||
|
@ -299,7 +299,7 @@ std::optional<int> AlloyMainDelegate::BasicStartupComplete() {
|
||||
if (settings_->log_items == LOG_ITEMS_NONE) {
|
||||
log_items_str = std::string(switches::kLogItems_None);
|
||||
} else {
|
||||
std::vector<base::StringPiece> added_items;
|
||||
std::vector<std::string_view> added_items;
|
||||
if (settings_->log_items & LOG_ITEMS_FLAG_PROCESS_ID) {
|
||||
added_items.emplace_back(switches::kLogItems_PId);
|
||||
}
|
||||
@ -472,9 +472,7 @@ std::optional<int> AlloyMainDelegate::BasicStartupComplete() {
|
||||
#endif // BUILDFLAG(IS_WIN)
|
||||
|
||||
if (dest == LoggingDest::kFile) {
|
||||
log_settings.log_file_path = log_file.value().c_str();
|
||||
} else {
|
||||
log_settings.log_file_path = nullptr;
|
||||
log_settings.log_file_path = log_file.value();
|
||||
}
|
||||
|
||||
log_settings.lock_log = logging::DONT_LOCK_LOG_FILE;
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
#include "libcef/common/crash_reporter_client.h"
|
||||
|
||||
#include <string_view>
|
||||
#include <utility>
|
||||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
@ -14,7 +15,6 @@
|
||||
#include "base/logging.h"
|
||||
#include "base/stl_util.h"
|
||||
#include "base/strings/string_number_conversions.h"
|
||||
#include "base/strings/string_piece.h"
|
||||
#include "base/strings/string_split.h"
|
||||
#include "base/strings/string_util.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
@ -250,7 +250,7 @@ CefCrashReporterClient* g_crash_reporter_client = nullptr;
|
||||
|
||||
const char kKeyMapDelim = ',';
|
||||
|
||||
std::string NormalizeCrashKey(const base::StringPiece& key) {
|
||||
std::string NormalizeCrashKey(const std::string_view& key) {
|
||||
std::string str(key);
|
||||
std::replace(str.begin(), str.end(), kKeyMapDelim, '-');
|
||||
if (str.length() > crashpad::Annotation::kNameMaxLength) {
|
||||
@ -297,7 +297,7 @@ int __declspec(dllexport) __cdecl SetCrashKeyValueImpl(const char* key,
|
||||
size_t value_size) {
|
||||
if (g_crash_reporter_client) {
|
||||
return g_crash_reporter_client->SetCrashKeyValue(
|
||||
base::StringPiece(key, key_size), base::StringPiece(value, value_size));
|
||||
std::string_view(key, key_size), std::string_view(value, value_size));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -537,7 +537,7 @@ bool CefCrashReporterClient::ReadCrashConfigFile() {
|
||||
for (auto& id : ids) {
|
||||
size_t length = std::min(map_keys.size() - offset,
|
||||
crashpad::Annotation::kValueMaxSize);
|
||||
id.Set(base::StringPiece(map_keys.data() + offset, length));
|
||||
id.Set(std::string_view(map_keys.data() + offset, length));
|
||||
offset += length;
|
||||
if (offset >= map_keys.size()) {
|
||||
break;
|
||||
@ -751,21 +751,21 @@ bool CefCrashReporterClient::EnableBrowserCrashForwarding() {
|
||||
IDKEY(n "-V"), IDKEY(n "-W"), IDKEY(n "-X"), IDKEY(n "-Y"), \
|
||||
IDKEY(n "-Z")
|
||||
|
||||
#define IDKEY_FUNCTION(name, size_) \
|
||||
static_assert(size_ <= crashpad::Annotation::kValueMaxSize, \
|
||||
"Annotation size is too large."); \
|
||||
bool Set##name##Annotation(size_t index, const base::StringPiece& value) { \
|
||||
using IDKey = crash_reporter::CrashKeyString<size_>; \
|
||||
static IDKey ids[] = {IDKEY_ENTRIES(#name)}; \
|
||||
if (index < std::size(ids)) { \
|
||||
if (value.empty()) { \
|
||||
ids[index].Clear(); \
|
||||
} else { \
|
||||
ids[index].Set(value); \
|
||||
} \
|
||||
return true; \
|
||||
} \
|
||||
return false; \
|
||||
#define IDKEY_FUNCTION(name, size_) \
|
||||
static_assert(size_ <= crashpad::Annotation::kValueMaxSize, \
|
||||
"Annotation size is too large."); \
|
||||
bool Set##name##Annotation(size_t index, const std::string_view& value) { \
|
||||
using IDKey = crash_reporter::CrashKeyString<size_>; \
|
||||
static IDKey ids[] = {IDKEY_ENTRIES(#name)}; \
|
||||
if (index < std::size(ids)) { \
|
||||
if (value.empty()) { \
|
||||
ids[index].Clear(); \
|
||||
} else { \
|
||||
ids[index].Set(value); \
|
||||
} \
|
||||
return true; \
|
||||
} \
|
||||
return false; \
|
||||
}
|
||||
|
||||
// The first argument must be kept synchronized with the logic in
|
||||
@ -775,8 +775,8 @@ IDKEY_FUNCTION(S, 64)
|
||||
IDKEY_FUNCTION(M, 256)
|
||||
IDKEY_FUNCTION(L, 1024)
|
||||
|
||||
bool CefCrashReporterClient::SetCrashKeyValue(const base::StringPiece& key,
|
||||
const base::StringPiece& value) {
|
||||
bool CefCrashReporterClient::SetCrashKeyValue(const std::string_view& key,
|
||||
const std::string_view& value) {
|
||||
if (key.empty() || crash_keys_.empty()) {
|
||||
return false;
|
||||
}
|
||||
|
@ -6,11 +6,11 @@
|
||||
#define CEF_LIBCEF_COMMON_CRASH_REPORTER_CLIENT_H_
|
||||
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
#include "include/cef_version.h"
|
||||
|
||||
#include "base/strings/string_piece.h"
|
||||
#include "base/synchronization/lock.h"
|
||||
#include "build/build_config.h"
|
||||
#include "components/crash/core/app/crash_reporter_client.h"
|
||||
@ -78,8 +78,8 @@ class CefCrashReporterClient : public crash_reporter::CrashReporterClient {
|
||||
#endif
|
||||
|
||||
// Set or clear a crash key value.
|
||||
bool SetCrashKeyValue(const base::StringPiece& key,
|
||||
const base::StringPiece& value);
|
||||
bool SetCrashKeyValue(const std::string_view& key,
|
||||
const std::string_view& value);
|
||||
|
||||
private:
|
||||
bool has_crash_config_file_ = false;
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
#include "libcef/common/crash_reporting.h"
|
||||
|
||||
#include <string_view>
|
||||
|
||||
#include "include/cef_crash_util.h"
|
||||
#include "libcef/common/cef_switches.h"
|
||||
#include "libcef/features/runtime.h"
|
||||
@ -13,7 +15,6 @@
|
||||
#include "base/debug/crash_logging.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/stl_util.h"
|
||||
#include "base/strings/string_piece.h"
|
||||
#include "base/strings/string_util.h"
|
||||
#include "chrome/common/crash_keys.h"
|
||||
#include "components/crash/core/common/crash_key.h"
|
||||
@ -51,8 +52,8 @@ typedef int(__cdecl* SetCrashKeyValue)(const char*,
|
||||
// int __declspec(dllexport) __cdecl IsCrashReportingEnabledImpl.
|
||||
typedef int(__cdecl* IsCrashReportingEnabled)();
|
||||
|
||||
bool SetCrashKeyValueTrampoline(const base::StringPiece& key,
|
||||
const base::StringPiece& value) {
|
||||
bool SetCrashKeyValueTrampoline(const std::string_view& key,
|
||||
const std::string_view& value) {
|
||||
static SetCrashKeyValue set_crash_key = []() {
|
||||
HMODULE elf_module = GetModuleHandle(kChromeElfDllName);
|
||||
return reinterpret_cast<SetCrashKeyValue>(
|
||||
@ -176,8 +177,8 @@ bool Enabled() {
|
||||
return g_crash_reporting_enabled;
|
||||
}
|
||||
|
||||
bool SetCrashKeyValue(const base::StringPiece& key,
|
||||
const base::StringPiece& value) {
|
||||
bool SetCrashKeyValue(const std::string_view& key,
|
||||
const std::string_view& value) {
|
||||
if (!g_crash_reporting_enabled) {
|
||||
return false;
|
||||
}
|
||||
|
@ -3,8 +3,8 @@
|
||||
// governed by a BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
||||
#include "base/strings/string_piece.h"
|
||||
#include "build/build_config.h"
|
||||
|
||||
namespace base {
|
||||
@ -17,8 +17,8 @@ namespace crash_reporting {
|
||||
bool Enabled();
|
||||
|
||||
// Set or clear a crash key value.
|
||||
bool SetCrashKeyValue(const base::StringPiece& key,
|
||||
const base::StringPiece& value);
|
||||
bool SetCrashKeyValue(const std::string_view& key,
|
||||
const std::string_view& value);
|
||||
|
||||
// Functions are called from similarly named methods in AlloyMainDelegate.
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
// Required by the PDF extension which is hosted in a guest view.
|
||||
"contentSettings": {
|
||||
"dependencies": ["permission:contentSettings"],
|
||||
"contexts": ["blessed_extension"]
|
||||
"contexts": ["privileged_extension"]
|
||||
},
|
||||
"mimeHandlerViewGuestInternal": {
|
||||
"internal": true,
|
||||
@ -24,12 +24,12 @@
|
||||
},
|
||||
"pdfViewerPrivate": {
|
||||
"dependencies": ["permission:pdfViewerPrivate"],
|
||||
"contexts": ["blessed_extension"]
|
||||
"contexts": ["privileged_extension"]
|
||||
},
|
||||
"resourcesPrivate": [
|
||||
{
|
||||
"dependencies": ["permission:resourcesPrivate"],
|
||||
"contexts": ["blessed_extension"]
|
||||
"contexts": ["privileged_extension"]
|
||||
},
|
||||
{
|
||||
"channel": "stable",
|
||||
@ -40,7 +40,7 @@
|
||||
"tabs": {
|
||||
"channel": "stable",
|
||||
"extension_types": ["extension", "legacy_packaged_app"],
|
||||
"contexts": ["blessed_extension"],
|
||||
"contexts": ["privileged_extension"],
|
||||
"disallow_for_service_workers": false
|
||||
}
|
||||
}
|
||||
|
@ -11,9 +11,9 @@
|
||||
namespace extensions::api::cef {
|
||||
|
||||
// static
|
||||
base::StringPiece ChromeGeneratedSchemas::Get(const std::string& name) {
|
||||
std::string_view ChromeGeneratedSchemas::Get(const std::string& name) {
|
||||
if (!ChromeFunctionRegistry::IsSupported(name)) {
|
||||
return base::StringPiece();
|
||||
return std::string_view();
|
||||
}
|
||||
return extensions::api::ChromeGeneratedSchemas::Get(name);
|
||||
}
|
||||
|
@ -11,8 +11,7 @@
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
#include "base/strings/string_piece.h"
|
||||
#include <string_view>
|
||||
|
||||
namespace extensions::api::cef {
|
||||
|
||||
@ -22,7 +21,7 @@ class ChromeGeneratedSchemas {
|
||||
static bool IsGenerated(std::string name);
|
||||
|
||||
// Gets the API schema named |name|.
|
||||
static base::StringPiece Get(const std::string& name);
|
||||
static std::string_view Get(const std::string& name);
|
||||
};
|
||||
|
||||
} // namespace extensions::api::cef
|
||||
|
@ -48,7 +48,7 @@ CefRefPtr<CefValue> CefParseJSON(const void* json,
|
||||
return nullptr;
|
||||
}
|
||||
std::optional<base::Value> parse_result = base::JSONReader::Read(
|
||||
base::StringPiece(static_cast<const char*>(json), json_size),
|
||||
std::string_view(static_cast<const char*>(json), json_size),
|
||||
GetJSONReaderOptions(options));
|
||||
if (parse_result) {
|
||||
return new CefValueImpl(std::move(parse_result.value()));
|
||||
|
@ -132,7 +132,7 @@ CefString CefBase64Encode(const void* data, size_t data_size) {
|
||||
return CefString();
|
||||
}
|
||||
|
||||
base::StringPiece input(static_cast<const char*>(data), data_size);
|
||||
std::string_view input(static_cast<const char*>(data), data_size);
|
||||
return base::Base64Encode(input);
|
||||
}
|
||||
|
||||
|
@ -80,7 +80,7 @@ int GetCacheControlHeaderPolicy(CefRequest::HeaderMap headerMap) {
|
||||
if (!line.empty()) {
|
||||
HttpHeaderUtils::MakeASCIILower(&line);
|
||||
|
||||
std::vector<base::StringPiece> pieces = base::SplitStringPiece(
|
||||
std::vector<std::string_view> pieces = base::SplitStringPiece(
|
||||
line, ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY);
|
||||
for (const auto& piece : pieces) {
|
||||
if (base::EqualsCaseInsensitiveASCII(piece,
|
||||
|
@ -43,7 +43,7 @@ std::optional<std::string> CefResourceBundleDelegate::LoadDataResourceString(
|
||||
bool CefResourceBundleDelegate::GetRawDataResource(
|
||||
int resource_id,
|
||||
ui::ResourceScaleFactor scale_factor,
|
||||
base::StringPiece* value) const {
|
||||
std::string_view* value) const {
|
||||
auto application = CefAppManager::Get()->GetApplication();
|
||||
if (application) {
|
||||
CefRefPtr<CefResourceBundleHandler> handler =
|
||||
@ -55,10 +55,10 @@ bool CefResourceBundleDelegate::GetRawDataResource(
|
||||
if (handler->GetDataResourceForScale(
|
||||
resource_id, static_cast<cef_scale_factor_t>(scale_factor),
|
||||
data, data_size)) {
|
||||
*value = base::StringPiece(static_cast<char*>(data), data_size);
|
||||
*value = std::string_view(static_cast<char*>(data), data_size);
|
||||
}
|
||||
} else if (handler->GetDataResource(resource_id, data, data_size)) {
|
||||
*value = base::StringPiece(static_cast<char*>(data), data_size);
|
||||
*value = std::string_view(static_cast<char*>(data), data_size);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ class CefResourceBundleDelegate : public ui::ResourceBundle::Delegate {
|
||||
std::optional<std::string> LoadDataResourceString(int resource_id) override;
|
||||
bool GetRawDataResource(int resource_id,
|
||||
ui::ResourceScaleFactor scale_factor,
|
||||
base::StringPiece* value) const override;
|
||||
std::string_view* value) const override;
|
||||
bool GetLocalizedString(int message_id, std::u16string* value) const override;
|
||||
|
||||
private:
|
||||
|
@ -26,7 +26,7 @@ void string_utf16_dtor(char16_t* str) {
|
||||
}
|
||||
|
||||
// Originally from base/strings/utf_string_conversions.cc
|
||||
std::wstring ASCIIToWide(const base::StringPiece& ascii) {
|
||||
std::wstring ASCIIToWide(const std::string_view& ascii) {
|
||||
DCHECK(base::IsStringASCII(ascii)) << ascii;
|
||||
return std::wstring(ascii.begin(), ascii.end());
|
||||
}
|
||||
|
@ -795,7 +795,7 @@ bool CefDictionaryValueImpl::Clear() {
|
||||
|
||||
bool CefDictionaryValueImpl::HasKey(const CefString& key) {
|
||||
CEF_VALUE_VERIFY_RETURN(false, 0);
|
||||
return const_value().GetDict().contains(base::StringPiece(key.ToString()));
|
||||
return const_value().GetDict().contains(std::string_view(key.ToString()));
|
||||
}
|
||||
|
||||
bool CefDictionaryValueImpl::GetKeys(KeyList& keys) {
|
||||
@ -817,7 +817,7 @@ CefValueType CefDictionaryValueImpl::GetType(const CefString& key) {
|
||||
CEF_VALUE_VERIFY_RETURN(false, VTYPE_INVALID);
|
||||
|
||||
const base::Value* value =
|
||||
const_value().GetDict().Find(base::StringPiece(key.ToString()));
|
||||
const_value().GetDict().Find(std::string_view(key.ToString()));
|
||||
if (value) {
|
||||
switch (value->type()) {
|
||||
case base::Value::Type::NONE:
|
||||
@ -846,7 +846,7 @@ CefRefPtr<CefValue> CefDictionaryValueImpl::GetValue(const CefString& key) {
|
||||
CEF_VALUE_VERIFY_RETURN(false, nullptr);
|
||||
|
||||
const base::Value* value =
|
||||
const_value().GetDict().Find(base::StringPiece(key.ToString()));
|
||||
const_value().GetDict().Find(std::string_view(key.ToString()));
|
||||
if (value) {
|
||||
return CefValueImpl::GetOrCreateRefOrCopy(const_cast<base::Value*>(value),
|
||||
mutable_value_unchecked(),
|
||||
@ -862,7 +862,7 @@ bool CefDictionaryValueImpl::GetBool(const CefString& key) {
|
||||
bool ret_value = false;
|
||||
|
||||
const base::Value* value =
|
||||
const_value().GetDict().Find(base::StringPiece(key.ToString()));
|
||||
const_value().GetDict().Find(std::string_view(key.ToString()));
|
||||
if (value && value->is_bool()) {
|
||||
ret_value = value->GetBool();
|
||||
}
|
||||
@ -876,7 +876,7 @@ int CefDictionaryValueImpl::GetInt(const CefString& key) {
|
||||
int ret_value = 0;
|
||||
|
||||
const base::Value* value =
|
||||
const_value().GetDict().Find(base::StringPiece(key.ToString()));
|
||||
const_value().GetDict().Find(std::string_view(key.ToString()));
|
||||
if (value && value->is_int()) {
|
||||
ret_value = value->GetInt();
|
||||
}
|
||||
@ -890,7 +890,7 @@ double CefDictionaryValueImpl::GetDouble(const CefString& key) {
|
||||
double ret_value = 0;
|
||||
|
||||
const base::Value* value =
|
||||
const_value().GetDict().Find(base::StringPiece(key.ToString()));
|
||||
const_value().GetDict().Find(std::string_view(key.ToString()));
|
||||
if (value && value->is_double()) {
|
||||
ret_value = value->GetDouble();
|
||||
}
|
||||
@ -904,7 +904,7 @@ CefString CefDictionaryValueImpl::GetString(const CefString& key) {
|
||||
std::string ret_value;
|
||||
|
||||
const base::Value* value =
|
||||
const_value().GetDict().Find(base::StringPiece(key.ToString()));
|
||||
const_value().GetDict().Find(std::string_view(key.ToString()));
|
||||
if (value && value->is_string()) {
|
||||
ret_value = value->GetString();
|
||||
}
|
||||
@ -917,7 +917,7 @@ CefRefPtr<CefBinaryValue> CefDictionaryValueImpl::GetBinary(
|
||||
CEF_VALUE_VERIFY_RETURN(false, nullptr);
|
||||
|
||||
const base::Value* value =
|
||||
const_value().GetDict().Find(base::StringPiece(key.ToString()));
|
||||
const_value().GetDict().Find(std::string_view(key.ToString()));
|
||||
if (value && value->is_blob()) {
|
||||
base::Value* binary_value = const_cast<base::Value*>(value);
|
||||
return CefBinaryValueImpl::GetOrCreateRef(
|
||||
@ -932,7 +932,7 @@ CefRefPtr<CefDictionaryValue> CefDictionaryValueImpl::GetDictionary(
|
||||
CEF_VALUE_VERIFY_RETURN(false, nullptr);
|
||||
|
||||
const base::Value* value =
|
||||
const_value().GetDict().Find(base::StringPiece(key.ToString()));
|
||||
const_value().GetDict().Find(std::string_view(key.ToString()));
|
||||
if (value && value->is_dict()) {
|
||||
base::Value* dict_value = const_cast<base::Value*>(value);
|
||||
return CefDictionaryValueImpl::GetOrCreateRef(
|
||||
@ -946,7 +946,7 @@ CefRefPtr<CefListValue> CefDictionaryValueImpl::GetList(const CefString& key) {
|
||||
CEF_VALUE_VERIFY_RETURN(false, nullptr);
|
||||
|
||||
const base::Value* value =
|
||||
const_value().GetDict().Find(base::StringPiece(key.ToString()));
|
||||
const_value().GetDict().Find(std::string_view(key.ToString()));
|
||||
if (value && value->is_list()) {
|
||||
base::Value* list_value = const_cast<base::Value*>(value);
|
||||
return CefListValueImpl::GetOrCreateRef(
|
||||
@ -1042,14 +1042,14 @@ bool CefDictionaryValueImpl::RemoveInternal(const CefString& key) {
|
||||
// retrieve the actual Value pointer as it current exists first, for later
|
||||
// comparison purposes.
|
||||
const base::Value* actual_value =
|
||||
const_value().GetDict().Find(base::StringPiece(key.ToString()));
|
||||
const_value().GetDict().Find(std::string_view(key.ToString()));
|
||||
if (!actual_value) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// |actual_value| is no longer valid after this call.
|
||||
std::optional<base::Value> out_value =
|
||||
mutable_value()->GetDict().Extract(base::StringPiece(key.ToString()));
|
||||
mutable_value()->GetDict().Extract(std::string_view(key.ToString()));
|
||||
if (!out_value.has_value()) {
|
||||
return false;
|
||||
}
|
||||
@ -1076,7 +1076,7 @@ base::Value* CefDictionaryValueImpl::SetInternal(
|
||||
// contents of the passed-in base::Value instead of keeping the same object.
|
||||
// Set() then returns the actual Value pointer as it currently exists.
|
||||
base::Value* actual_value = mutable_value()->GetDict().Set(
|
||||
base::StringPiece(key.ToString()), std::move(*value));
|
||||
std::string_view(key.ToString()), std::move(*value));
|
||||
CHECK(actual_value);
|
||||
|
||||
// |value| will be deleted when this method returns. Update the controller to
|
||||
|
@ -59,6 +59,7 @@
|
||||
#include "components/content_settings/core/common/content_settings_types.h"
|
||||
#include "components/nacl/common/nacl_constants.h"
|
||||
#include "components/pdf/common/constants.h"
|
||||
#include "components/pdf/common/pdf_util.h"
|
||||
#include "components/pdf/renderer/internal_plugin_renderer_helpers.h"
|
||||
#include "components/printing/renderer/print_render_frame_helper.h"
|
||||
#include "components/spellcheck/renderer/spellcheck.h"
|
||||
@ -430,10 +431,11 @@ bool AlloyContentRendererClient::IsOriginIsolatedPepperPlugin(
|
||||
return true;
|
||||
}
|
||||
|
||||
std::unique_ptr<media::KeySystemSupportObserver>
|
||||
std::unique_ptr<media::KeySystemSupportRegistration>
|
||||
AlloyContentRendererClient::GetSupportedKeySystems(
|
||||
content::RenderFrame* render_frame,
|
||||
media::GetSupportedKeySystemsCB cb) {
|
||||
return GetChromeKeySystems(std::move(cb));
|
||||
return GetChromeKeySystems(render_frame, std::move(cb));
|
||||
}
|
||||
|
||||
void AlloyContentRendererClient::RunScriptsAtDocumentStart(
|
||||
|
@ -20,7 +20,6 @@
|
||||
#include "chrome/common/plugin.mojom.h"
|
||||
#include "content/public/renderer/content_renderer_client.h"
|
||||
#include "content/public/renderer/render_thread.h"
|
||||
#include "media/base/key_systems_support_observer.h"
|
||||
#include "mojo/public/cpp/bindings/generic_pending_receiver.h"
|
||||
#include "services/service_manager/public/cpp/local_interface_provider.h"
|
||||
|
||||
@ -100,7 +99,8 @@ class AlloyContentRendererClient
|
||||
uint64_t VisitedLinkHash(std::string_view canonical_url) override;
|
||||
bool IsLinkVisited(uint64_t link_hash) override;
|
||||
bool IsOriginIsolatedPepperPlugin(const base::FilePath& plugin_path) override;
|
||||
std::unique_ptr<media::KeySystemSupportObserver> GetSupportedKeySystems(
|
||||
std::unique_ptr<media::KeySystemSupportRegistration> GetSupportedKeySystems(
|
||||
content::RenderFrame* render_frame,
|
||||
media::GetSupportedKeySystemsCB cb) override;
|
||||
void RunScriptsAtDocumentStart(content::RenderFrame* render_frame) override;
|
||||
void RunScriptsAtDocumentEnd(content::RenderFrame* render_frame) override;
|
||||
|
@ -18,7 +18,6 @@
|
||||
#include "extensions/common/permissions/permissions_data.h"
|
||||
#include "extensions/renderer/api/core_extensions_renderer_api_provider.h"
|
||||
#include "extensions/renderer/dispatcher.h"
|
||||
#include "extensions/renderer/dispatcher_delegate.h"
|
||||
#include "extensions/renderer/extension_frame_helper.h"
|
||||
#include "extensions/renderer/extensions_render_frame_observer.h"
|
||||
#include "extensions/renderer/extensions_renderer_api_provider.h"
|
||||
@ -87,9 +86,8 @@ bool CefExtensionsRendererClient::ExtensionAPIEnabledForServiceWorkerScript(
|
||||
void CefExtensionsRendererClient::RenderThreadStarted() {
|
||||
content::RenderThread* thread = content::RenderThread::Get();
|
||||
|
||||
extension_dispatcher_ = std::make_unique<extensions::Dispatcher>(
|
||||
std::make_unique<extensions::DispatcherDelegate>(),
|
||||
std::move(api_providers_));
|
||||
extension_dispatcher_ =
|
||||
std::make_unique<extensions::Dispatcher>(std::move(api_providers_));
|
||||
extension_dispatcher_->OnRenderThreadStarted(thread);
|
||||
resource_request_policy_ =
|
||||
std::make_unique<extensions::ResourceRequestPolicy>(
|
||||
|
@ -358,9 +358,8 @@ void CefFrameImpl::OnDidFinishLoad() {
|
||||
}
|
||||
|
||||
void CefFrameImpl::OnDraggableRegionsChanged() {
|
||||
// Match the behavior in ChromeRenderFrameObserver::DraggableRegionsChanged.
|
||||
// Only the main frame is allowed to control draggable regions, to avoid other
|
||||
// frames manipulate the regions in the browser process.
|
||||
// frames trying to manipulate the regions in the browser process.
|
||||
if (frame_->Parent() != nullptr) {
|
||||
return;
|
||||
}
|
||||
@ -376,7 +375,7 @@ void CefFrameImpl::OnDraggableRegionsChanged() {
|
||||
auto region = cef::mojom::DraggableRegionEntry::New(webregion.bounds,
|
||||
webregion.draggable);
|
||||
render_frame->ConvertViewportToWindow(®ion->bounds);
|
||||
regions.push_back(std::move(region));
|
||||
regions.emplace_back(std::move(region));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -85,7 +85,6 @@ class CefFrameImpl
|
||||
void OnWasShown();
|
||||
void OnDidCommitProvisionalLoad();
|
||||
void OnDidFinishLoad();
|
||||
void OnDraggableRegionsChanged();
|
||||
void OnContextCreated(v8::Local<v8::Context> context);
|
||||
void OnContextReleased();
|
||||
void OnDetached();
|
||||
@ -93,6 +92,11 @@ class CefFrameImpl
|
||||
blink::WebLocalFrame* web_frame() const { return frame_; }
|
||||
|
||||
private:
|
||||
// Called for draggable region changes due to navigation. This is in addition
|
||||
// to the standard notifications delivered via
|
||||
// WebContentsDelegate::DraggableRegionsChanged.
|
||||
void OnDraggableRegionsChanged();
|
||||
|
||||
// Execute an action on the associated WebLocalFrame. This will queue the
|
||||
// action if the JavaScript context is not yet created.
|
||||
using LocalFrameAction =
|
||||
|
@ -118,12 +118,6 @@ void CefRenderFrameObserver::FocusedElementChanged(
|
||||
documentImpl->Detach();
|
||||
}
|
||||
|
||||
void CefRenderFrameObserver::DraggableRegionsChanged() {
|
||||
if (frame_) {
|
||||
frame_->OnDraggableRegionsChanged();
|
||||
}
|
||||
}
|
||||
|
||||
void CefRenderFrameObserver::DidCreateScriptContext(
|
||||
v8::Handle<v8::Context> context,
|
||||
int world_id) {
|
||||
|
@ -33,7 +33,6 @@ class CefRenderFrameObserver : public content::RenderFrameObserver {
|
||||
void DidFinishLoad() override;
|
||||
void WillDetach(blink::DetachReason detach_reason) override;
|
||||
void FocusedElementChanged(const blink::WebElement& element) override;
|
||||
void DraggableRegionsChanged() override;
|
||||
void DidCreateScriptContext(v8::Handle<v8::Context> context,
|
||||
int world_id) override;
|
||||
void WillReleaseScriptContext(v8::Handle<v8::Context> context,
|
||||
|
@ -125,7 +125,7 @@ void CefRenderManager::RenderFrameCreated(
|
||||
// Enable support for draggable regions.
|
||||
// TODO: This has performance consequences so consider making it configurable
|
||||
// (e.g. only enabled for frameless windows). See issue #3636.
|
||||
render_frame->GetWebView()->SetSupportsAppRegion(true);
|
||||
render_frame->GetWebView()->SetSupportsDraggableRegions(true);
|
||||
}
|
||||
|
||||
void CefRenderManager::WebViewCreated(
|
||||
|
@ -2364,7 +2364,7 @@ bool CefV8ValueImpl::NeuterArrayBuffer() {
|
||||
if (!arr->IsDetachable()) {
|
||||
return false;
|
||||
}
|
||||
arr->Detach();
|
||||
[[maybe_unused]] auto result = arr->Detach(v8::Local<v8::Value>());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -44,6 +44,12 @@ patches = [
|
||||
# https://bugs.chromium.org/p/chromium/issues/detail?id=623342
|
||||
'name': 'runhooks',
|
||||
},
|
||||
{
|
||||
# Don't sort CEF and Chromium header includes into the same block.
|
||||
# Partially reverts:
|
||||
# https://chromium-review.googlesource.com/c/chromium/src/+/5197064
|
||||
'name': 'clang_format_includes',
|
||||
},
|
||||
{
|
||||
# Support component builds (GN is_component_build=true).
|
||||
# https://github.com/chromiumembedded/cef/issues/1617
|
||||
@ -745,12 +751,6 @@ patches = [
|
||||
# https://github.com/chromiumembedded/cef/issues/3645
|
||||
'name': 'win_taskbar_decorator_3645'
|
||||
},
|
||||
{
|
||||
# chrome: Fix crash on static FontList destruction with
|
||||
# multi-threaded-message-loop.
|
||||
# https://chromium-review.googlesource.com/c/chromium/src/+/5388128
|
||||
'name': 'chrome_watermark_5388128'
|
||||
},
|
||||
{
|
||||
# views: Update textfield colors when enabled state changes
|
||||
# https://chromium-review.googlesource.com/c/chromium/src/+/5399416
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git base/command_line.cc base/command_line.cc
|
||||
index 15d57c1c78956..2241eb0c32572 100644
|
||||
index 3596432cb48b3..b7846f07f7b1d 100644
|
||||
--- base/command_line.cc
|
||||
+++ base/command_line.cc
|
||||
@@ -383,11 +383,10 @@ void CommandLine::AppendSwitchNative(StringPiece switch_string,
|
||||
@@ -384,11 +384,10 @@ void CommandLine::AppendSwitchNative(std::string_view switch_string,
|
||||
#if BUILDFLAG(ENABLE_COMMANDLINE_SEQUENCE_CHECKS)
|
||||
sequence_checker_.Check();
|
||||
#endif
|
||||
@ -11,7 +11,7 @@ index 15d57c1c78956..2241eb0c32572 100644
|
||||
+#if BUILDFLAG(IS_WIN)
|
||||
StringType combined_switch_string(UTF8ToWide(switch_key));
|
||||
#elif BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA)
|
||||
- StringPiece switch_key = switch_string;
|
||||
- std::string_view switch_key = switch_string;
|
||||
StringType combined_switch_string(switch_key);
|
||||
#endif
|
||||
size_t prefix_length = GetSwitchPrefixLength(combined_switch_string);
|
||||
|
@ -1,5 +1,5 @@
|
||||
diff --git base/BUILD.gn base/BUILD.gn
|
||||
index 25356ec40cdbf..250bac82d893a 100644
|
||||
index 5dc15da08eeff..4d98f417eabc3 100644
|
||||
--- base/BUILD.gn
|
||||
+++ base/BUILD.gn
|
||||
@@ -41,6 +41,7 @@ import("//build/nocompile.gni")
|
||||
@ -10,7 +10,7 @@ index 25356ec40cdbf..250bac82d893a 100644
|
||||
import("//testing/libfuzzer/fuzzer_test.gni")
|
||||
import("//testing/test.gni")
|
||||
|
||||
@@ -1515,7 +1516,11 @@ component("base") {
|
||||
@@ -1525,7 +1526,11 @@ component("base") {
|
||||
"hash/md5_constexpr_internal.h",
|
||||
"hash/sha1.h",
|
||||
]
|
||||
@ -23,7 +23,7 @@ index 25356ec40cdbf..250bac82d893a 100644
|
||||
sources += [
|
||||
"hash/md5_nacl.cc",
|
||||
"hash/md5_nacl.h",
|
||||
@@ -1944,6 +1949,12 @@ component("base") {
|
||||
@@ -1954,6 +1959,12 @@ component("base") {
|
||||
defines += [ "COM_INIT_CHECK_HOOK_DISABLED" ]
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git base/test/BUILD.gn base/test/BUILD.gn
|
||||
index 4c0357370dffc..cdb90b96e1a4a 100644
|
||||
index f50c2e942aed5..3a682be935a99 100644
|
||||
--- base/test/BUILD.gn
|
||||
+++ base/test/BUILD.gn
|
||||
@@ -190,11 +190,6 @@ static_library("test_support") {
|
||||
@@ -191,11 +191,6 @@ static_library("test_support") {
|
||||
|
||||
if (enable_base_tracing) {
|
||||
public_deps += [ "//third_party/perfetto:perfetto_test_support" ]
|
||||
@ -14,7 +14,7 @@ index 4c0357370dffc..cdb90b96e1a4a 100644
|
||||
deps += [
|
||||
":amalgamated_perfetto_sql_stdlib",
|
||||
":gen_cc_chrome_track_event_descriptor",
|
||||
@@ -560,7 +555,7 @@ if (enable_base_tracing) {
|
||||
@@ -563,7 +558,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 4c0357370dffc..cdb90b96e1a4a 100644
|
||||
if (is_ios) {
|
||||
_target_type = "ios_framework_bundle"
|
||||
}
|
||||
@@ -569,6 +564,8 @@ if (enable_base_tracing) {
|
||||
@@ -572,6 +567,8 @@ if (enable_base_tracing) {
|
||||
defines = [ "TEST_TRACE_PROCESSOR_IMPL" ]
|
||||
testonly = true
|
||||
sources = [
|
||||
@ -32,7 +32,7 @@ index 4c0357370dffc..cdb90b96e1a4a 100644
|
||||
"test_trace_processor_export.h",
|
||||
"test_trace_processor_impl.cc",
|
||||
"test_trace_processor_impl.h",
|
||||
@@ -586,33 +583,6 @@ if (enable_base_tracing) {
|
||||
@@ -589,33 +586,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 d04abf8d841cc..61caa4266685b 100644
|
||||
index c469f1ee966ea..dec797956143f 100644
|
||||
--- content/shell/BUILD.gn
|
||||
+++ content/shell/BUILD.gn
|
||||
@@ -878,7 +878,6 @@ if (is_mac) {
|
||||
@@ -871,7 +871,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" ]
|
||||
|
@ -13,10 +13,10 @@ index 103cbab74b515..3b763e5100340 100644
|
||||
// Returns true if the element's contenteditable attribute is in the true
|
||||
// state or in the plaintext-only state:
|
||||
diff --git third_party/blink/renderer/core/exported/web_element.cc third_party/blink/renderer/core/exported/web_element.cc
|
||||
index 3c71a93d1a6ea..df2c5cd35b846 100644
|
||||
index f05470ff9c673..7ffee95e4540b 100644
|
||||
--- third_party/blink/renderer/core/exported/web_element.cc
|
||||
+++ third_party/blink/renderer/core/exported/web_element.cc
|
||||
@@ -116,6 +116,24 @@ void WebElement::SetAttribute(const WebString& attr_name,
|
||||
@@ -118,6 +118,24 @@ void WebElement::SetAttribute(const WebString& attr_name,
|
||||
IGNORE_EXCEPTION_FOR_TESTING);
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git content/browser/child_process_security_policy_impl.cc content/browser/child_process_security_policy_impl.cc
|
||||
index 5daf5aba13046..f0922951ee2b3 100644
|
||||
index d660380d5d9ca..c0480add36259 100644
|
||||
--- content/browser/child_process_security_policy_impl.cc
|
||||
+++ content/browser/child_process_security_policy_impl.cc
|
||||
@@ -1904,6 +1904,16 @@ bool ChildProcessSecurityPolicyImpl::CanAccessDataForMaybeOpaqueOrigin(
|
||||
@@ -1953,6 +1953,16 @@ bool ChildProcessSecurityPolicyImpl::CanAccessMaybeOpaqueOrigin(
|
||||
// DeclarativeApiTest.PersistRules.
|
||||
if (actual_process_lock.matches_scheme(url::kDataScheme))
|
||||
return true;
|
||||
@ -20,10 +20,10 @@ index 5daf5aba13046..f0922951ee2b3 100644
|
||||
|
||||
// Make an exception to allow most visited tiles to commit in
|
||||
diff --git content/browser/renderer_host/navigation_request.cc content/browser/renderer_host/navigation_request.cc
|
||||
index 52cdd617511bd..1d52c8473304c 100644
|
||||
index 5b2a0a561b948..2f0c7f9941877 100644
|
||||
--- content/browser/renderer_host/navigation_request.cc
|
||||
+++ content/browser/renderer_host/navigation_request.cc
|
||||
@@ -7966,10 +7966,22 @@ NavigationRequest::GetOriginForURLLoaderFactoryBeforeResponseWithDebugInfo(
|
||||
@@ -7944,10 +7944,22 @@ NavigationRequest::GetOriginForURLLoaderFactoryBeforeResponseWithDebugInfo(
|
||||
bool use_opaque_origin =
|
||||
(sandbox_flags & network::mojom::WebSandboxFlags::kOrigin) ==
|
||||
network::mojom::WebSandboxFlags::kOrigin;
|
||||
@ -47,7 +47,7 @@ index 52cdd617511bd..1d52c8473304c 100644
|
||||
}
|
||||
|
||||
return origin_and_debug_info;
|
||||
@@ -8077,6 +8089,15 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() {
|
||||
@@ -8055,6 +8067,15 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() {
|
||||
DetermineInitiatorRelationship(initiator_rfh,
|
||||
frame_tree_node_->current_frame_host()));
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git build/config/compiler/BUILD.gn build/config/compiler/BUILD.gn
|
||||
index bd7dd25175f1e..de5b560a8bb3e 100644
|
||||
index 973d8bcbd2f1f..385c865f0159e 100644
|
||||
--- build/config/compiler/BUILD.gn
|
||||
+++ build/config/compiler/BUILD.gn
|
||||
@@ -138,6 +138,9 @@ declare_args() {
|
||||
@@ -137,6 +137,9 @@ declare_args() {
|
||||
# The cache can lead to non-determinism: https://crbug.com/1486045
|
||||
thin_lto_enable_cache = true
|
||||
|
||||
@ -12,7 +12,7 @@ index bd7dd25175f1e..de5b560a8bb3e 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,
|
||||
@@ -2180,11 +2183,13 @@ config("export_dynamic") {
|
||||
@@ -2204,11 +2207,13 @@ config("export_dynamic") {
|
||||
config("thin_archive") {
|
||||
# The macOS and iOS default linker ld64 does not support reading thin
|
||||
# archives.
|
||||
|
@ -1,5 +1,5 @@
|
||||
diff --git chrome/browser/BUILD.gn chrome/browser/BUILD.gn
|
||||
index 5d698b969a134..ffddbc4db780b 100644
|
||||
index 70c3930b4d357..f71d0ff5bd9a7 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 5d698b969a134..ffddbc4db780b 100644
|
||||
import("//chrome/browser/buildflags.gni")
|
||||
import("//chrome/browser/downgrade/buildflags.gni")
|
||||
import("//chrome/common/features.gni")
|
||||
@@ -2050,6 +2051,7 @@ static_library("browser") {
|
||||
@@ -2089,6 +2090,7 @@ static_library("browser") {
|
||||
"//build/config/chromebox_for_meetings:buildflags",
|
||||
"//build/config/compiler:compiler_buildflags",
|
||||
"//cc",
|
||||
@ -18,7 +18,7 @@ index 5d698b969a134..ffddbc4db780b 100644
|
||||
"//chrome:extra_resources",
|
||||
"//chrome:resources",
|
||||
"//chrome:strings",
|
||||
@@ -2707,6 +2709,10 @@ static_library("browser") {
|
||||
@@ -2759,6 +2761,10 @@ static_library("browser") {
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git chrome/browser/browser_process.h chrome/browser/browser_process.h
|
||||
index 3e7de43022a41..21354d14d11c3 100644
|
||||
index 0a7910bc42894..7dc340fb9c29e 100644
|
||||
--- chrome/browser/browser_process.h
|
||||
+++ chrome/browser/browser_process.h
|
||||
@@ -207,9 +207,9 @@ class BrowserProcess {
|
||||
@@ -210,9 +210,9 @@ class BrowserProcess {
|
||||
virtual DownloadStatusUpdater* download_status_updater() = 0;
|
||||
virtual DownloadRequestLimiter* download_request_limiter() = 0;
|
||||
|
||||
@ -14,10 +14,10 @@ index 3e7de43022a41..21354d14d11c3 100644
|
||||
std::unique_ptr<BackgroundModeManager> manager) = 0;
|
||||
#endif
|
||||
diff --git chrome/browser/browser_process_impl.cc chrome/browser/browser_process_impl.cc
|
||||
index 0290ba1dbcbba..d96217c2bb869 100644
|
||||
index 19949bdecce72..cf4ed48fff5ce 100644
|
||||
--- chrome/browser/browser_process_impl.cc
|
||||
+++ chrome/browser/browser_process_impl.cc
|
||||
@@ -1093,18 +1093,14 @@ DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() {
|
||||
@@ -1097,18 +1097,14 @@ DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() {
|
||||
return download_request_limiter_.get();
|
||||
}
|
||||
|
||||
@ -38,10 +38,10 @@ index 0290ba1dbcbba..d96217c2bb869 100644
|
||||
std::unique_ptr<BackgroundModeManager> manager) {
|
||||
background_mode_manager_ = std::move(manager);
|
||||
diff --git chrome/browser/browser_process_impl.h chrome/browser/browser_process_impl.h
|
||||
index b303ad32bec66..e85dd8134147e 100644
|
||||
index e4cfec362d50c..2c17d0307601c 100644
|
||||
--- chrome/browser/browser_process_impl.h
|
||||
+++ chrome/browser/browser_process_impl.h
|
||||
@@ -190,8 +190,8 @@ class BrowserProcessImpl : public BrowserProcess,
|
||||
@@ -191,8 +191,8 @@ class BrowserProcessImpl : public BrowserProcess,
|
||||
void SetApplicationLocale(const std::string& actual_locale) override;
|
||||
DownloadStatusUpdater* download_status_updater() override;
|
||||
DownloadRequestLimiter* download_request_limiter() override;
|
||||
|
@ -13,10 +13,10 @@ index 2480282a19d12..dbd1fbf8a15b5 100644
|
||||
return false;
|
||||
}
|
||||
diff --git chrome/browser/devtools/devtools_window.cc chrome/browser/devtools/devtools_window.cc
|
||||
index c5eea1036e1eb..034b325c95f6b 100644
|
||||
index 8fbc9ab537c6d..e87d068678767 100644
|
||||
--- chrome/browser/devtools/devtools_window.cc
|
||||
+++ chrome/browser/devtools/devtools_window.cc
|
||||
@@ -35,6 +35,7 @@
|
||||
@@ -37,6 +37,7 @@
|
||||
#include "chrome/browser/search_engines/template_url_service_factory.h"
|
||||
#include "chrome/browser/task_manager/web_contents_tags.h"
|
||||
#include "chrome/browser/ui/browser.h"
|
||||
@ -24,7 +24,7 @@ index c5eea1036e1eb..034b325c95f6b 100644
|
||||
#include "chrome/browser/ui/browser_list.h"
|
||||
#include "chrome/browser/ui/browser_tabstrip.h"
|
||||
#include "chrome/browser/ui/browser_window.h"
|
||||
@@ -1223,6 +1224,13 @@ DevToolsWindow* DevToolsWindow::Create(
|
||||
@@ -1235,6 +1236,13 @@ DevToolsWindow* DevToolsWindow::Create(
|
||||
!browser->is_type_normal()) {
|
||||
can_dock = false;
|
||||
}
|
||||
@ -38,7 +38,7 @@ index c5eea1036e1eb..034b325c95f6b 100644
|
||||
}
|
||||
|
||||
// Create WebContents with devtools.
|
||||
@@ -1845,12 +1853,28 @@ void DevToolsWindow::CreateDevToolsBrowser() {
|
||||
@@ -1908,12 +1916,28 @@ void DevToolsWindow::CreateDevToolsBrowser() {
|
||||
Browser::CreationStatus::kOk) {
|
||||
return;
|
||||
}
|
||||
@ -74,7 +74,7 @@ index c5eea1036e1eb..034b325c95f6b 100644
|
||||
}
|
||||
|
||||
diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn
|
||||
index 3fe3d6eddbf01..b1549c86523be 100644
|
||||
index d6c14b3d70a75..577586f0dd8b4 100644
|
||||
--- chrome/browser/ui/BUILD.gn
|
||||
+++ chrome/browser/ui/BUILD.gn
|
||||
@@ -8,6 +8,7 @@ import("//build/config/compiler/compiler.gni")
|
||||
@ -85,7 +85,7 @@ index 3fe3d6eddbf01..b1549c86523be 100644
|
||||
import("//chrome/browser/buildflags.gni")
|
||||
import("//chrome/common/features.gni")
|
||||
import("//chromeos/ash/components/assistant/assistant.gni")
|
||||
@@ -393,6 +394,10 @@ static_library("ui") {
|
||||
@@ -401,6 +402,10 @@ static_library("ui") {
|
||||
"//build/config/compiler:wexit_time_destructors",
|
||||
]
|
||||
|
||||
@ -96,7 +96,7 @@ index 3fe3d6eddbf01..b1549c86523be 100644
|
||||
# Since browser and browser_ui actually depend on each other,
|
||||
# we must omit the dependency from browser_ui to browser.
|
||||
# However, this means browser_ui and browser should more or less
|
||||
@@ -418,6 +423,7 @@ static_library("ui") {
|
||||
@@ -426,6 +431,7 @@ static_library("ui") {
|
||||
"//build:chromeos_buildflags",
|
||||
"//build/config/chromebox_for_meetings:buildflags",
|
||||
"//cc/paint",
|
||||
@ -104,7 +104,7 @@ index 3fe3d6eddbf01..b1549c86523be 100644
|
||||
"//chrome:resources",
|
||||
"//chrome:strings",
|
||||
"//chrome/app:chrome_dll_resources",
|
||||
@@ -2936,6 +2942,8 @@ static_library("ui") {
|
||||
@@ -2979,6 +2985,8 @@ static_library("ui") {
|
||||
"views/apps/app_dialog/app_block_dialog_view.h",
|
||||
"views/apps/app_dialog/app_pause_dialog_view.cc",
|
||||
"views/apps/app_dialog/app_pause_dialog_view.h",
|
||||
@ -113,7 +113,7 @@ index 3fe3d6eddbf01..b1549c86523be 100644
|
||||
"views/apps/app_info_dialog/arc_app_info_links_panel.cc",
|
||||
"views/apps/app_info_dialog/arc_app_info_links_panel.h",
|
||||
"views/apps/chrome_app_window_client_views_chromeos.cc",
|
||||
@@ -4996,8 +5004,6 @@ static_library("ui") {
|
||||
@@ -5062,8 +5070,6 @@ static_library("ui") {
|
||||
"views/accessibility/theme_tracking_non_accessible_image_view.h",
|
||||
"views/apps/app_dialog/app_dialog_view.cc",
|
||||
"views/apps/app_dialog/app_dialog_view.h",
|
||||
@ -122,7 +122,7 @@ index 3fe3d6eddbf01..b1549c86523be 100644
|
||||
"views/apps/app_info_dialog/app_info_dialog_container.cc",
|
||||
"views/apps/app_info_dialog/app_info_dialog_container.h",
|
||||
"views/apps/app_info_dialog/app_info_dialog_views.cc",
|
||||
@@ -6813,6 +6819,7 @@ static_library("ui") {
|
||||
@@ -6895,6 +6901,7 @@ static_library("ui") {
|
||||
if (enable_printing) {
|
||||
deps += [
|
||||
"//components/printing/browser",
|
||||
@ -131,10 +131,10 @@ index 3fe3d6eddbf01..b1549c86523be 100644
|
||||
]
|
||||
}
|
||||
diff --git chrome/browser/ui/browser.cc chrome/browser/ui/browser.cc
|
||||
index 3d985470f60d1..762f0e827d53e 100644
|
||||
index cf9de7df6299d..3f93ff73ab038 100644
|
||||
--- chrome/browser/ui/browser.cc
|
||||
+++ chrome/browser/ui/browser.cc
|
||||
@@ -264,6 +264,25 @@
|
||||
@@ -267,6 +267,25 @@
|
||||
#include "components/captive_portal/content/captive_portal_tab_helper.h"
|
||||
#endif
|
||||
|
||||
@ -160,7 +160,7 @@ index 3d985470f60d1..762f0e827d53e 100644
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
#include "chrome/browser/extensions/extension_browser_window_helper.h"
|
||||
#endif
|
||||
@@ -466,6 +485,10 @@ Browser::Browser(const CreateParams& params)
|
||||
@@ -476,6 +495,10 @@ Browser::Browser(const CreateParams& params)
|
||||
type_(params.type),
|
||||
profile_(params.profile),
|
||||
window_(nullptr),
|
||||
@ -171,7 +171,7 @@ index 3d985470f60d1..762f0e827d53e 100644
|
||||
tab_strip_model_delegate_(
|
||||
std::make_unique<chrome::BrowserTabStripModelDelegate>(this)),
|
||||
tab_strip_model_(std::make_unique<TabStripModel>(
|
||||
@@ -679,6 +702,12 @@ Browser::~Browser() {
|
||||
@@ -678,6 +701,12 @@ Browser::~Browser() {
|
||||
// away so they don't try and call back to us.
|
||||
if (select_file_dialog_.get())
|
||||
select_file_dialog_->ListenerDestroyed();
|
||||
@ -184,7 +184,7 @@ index 3d985470f60d1..762f0e827d53e 100644
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@@ -1110,6 +1139,8 @@ void Browser::WindowFullscreenStateChanged() {
|
||||
@@ -1109,6 +1138,8 @@ void Browser::WindowFullscreenStateChanged() {
|
||||
->WindowFullscreenStateChanged();
|
||||
command_controller_->FullscreenStateChanged();
|
||||
UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TOGGLE_FULLSCREEN);
|
||||
@ -193,7 +193,7 @@ index 3d985470f60d1..762f0e827d53e 100644
|
||||
}
|
||||
|
||||
void Browser::FullscreenTopUIStateChanged() {
|
||||
@@ -1451,6 +1482,14 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent(
|
||||
@@ -1450,6 +1481,14 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent(
|
||||
if (exclusive_access_manager_->HandleUserKeyEvent(event))
|
||||
return content::KeyboardEventProcessingResult::HANDLED;
|
||||
|
||||
@ -208,7 +208,7 @@ index 3d985470f60d1..762f0e827d53e 100644
|
||||
return window()->PreHandleKeyboardEvent(event);
|
||||
}
|
||||
|
||||
@@ -1458,8 +1497,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source,
|
||||
@@ -1457,8 +1496,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source,
|
||||
const NativeWebKeyboardEvent& event) {
|
||||
DevToolsWindow* devtools_window =
|
||||
DevToolsWindow::GetInstanceForInspectedWebContents(source);
|
||||
@ -229,13 +229,15 @@ index 3d985470f60d1..762f0e827d53e 100644
|
||||
}
|
||||
|
||||
bool Browser::TabsNeedBeforeUnloadFired() const {
|
||||
@@ -1658,6 +1707,14 @@ WebContents* Browser::OpenURLFromTab(WebContents* source,
|
||||
@@ -1660,6 +1709,16 @@ WebContents* Browser::OpenURLFromTab(
|
||||
}
|
||||
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
|
||||
+#if BUILDFLAG(ENABLE_CEF)
|
||||
+ if (cef_browser_delegate_) {
|
||||
+ auto web_contents = cef_browser_delegate_->OpenURLFromTab(source, params);
|
||||
+ auto web_contents =
|
||||
+ cef_browser_delegate_->OpenURLFromTabEx(source, params,
|
||||
+ navigation_handle_callback);
|
||||
+ if (!web_contents)
|
||||
+ return nullptr;
|
||||
+ }
|
||||
@ -244,7 +246,7 @@ index 3d985470f60d1..762f0e827d53e 100644
|
||||
NavigateParams nav_params(this, params.url, params.transition);
|
||||
nav_params.FillNavigateParamsFromOpenURLParams(params);
|
||||
nav_params.source_contents = source;
|
||||
@@ -1815,6 +1872,8 @@ void Browser::LoadingStateChanged(WebContents* source,
|
||||
@@ -1822,6 +1881,8 @@ void Browser::LoadingStateChanged(WebContents* source,
|
||||
bool should_show_loading_ui) {
|
||||
ScheduleUIUpdate(source, content::INVALIDATE_TYPE_LOAD);
|
||||
UpdateWindowForLoadingStateChanged(source, should_show_loading_ui);
|
||||
@ -253,7 +255,7 @@ index 3d985470f60d1..762f0e827d53e 100644
|
||||
}
|
||||
|
||||
void Browser::CloseContents(WebContents* source) {
|
||||
@@ -1843,6 +1902,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) {
|
||||
@@ -1850,6 +1911,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) {
|
||||
}
|
||||
|
||||
void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
|
||||
@ -262,7 +264,7 @@ index 3d985470f60d1..762f0e827d53e 100644
|
||||
if (!GetStatusBubble())
|
||||
return;
|
||||
|
||||
@@ -1850,6 +1911,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
|
||||
@@ -1857,6 +1920,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
|
||||
GetStatusBubble()->SetURL(url);
|
||||
}
|
||||
|
||||
@ -280,7 +282,7 @@ index 3d985470f60d1..762f0e827d53e 100644
|
||||
void Browser::ContentsMouseEvent(WebContents* source,
|
||||
bool motion,
|
||||
bool exited) {
|
||||
@@ -1874,6 +1946,19 @@ bool Browser::TakeFocus(content::WebContents* source, bool reverse) {
|
||||
@@ -1881,6 +1955,19 @@ bool Browser::TakeFocus(content::WebContents* source, bool reverse) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -300,7 +302,7 @@ index 3d985470f60d1..762f0e827d53e 100644
|
||||
void Browser::BeforeUnloadFired(WebContents* web_contents,
|
||||
bool proceed,
|
||||
bool* proceed_to_fire_unload) {
|
||||
@@ -1973,12 +2058,24 @@ void Browser::WebContentsCreated(WebContents* source_contents,
|
||||
@@ -1980,12 +2067,24 @@ void Browser::WebContentsCreated(WebContents* source_contents,
|
||||
|
||||
// Make the tab show up in the task manager.
|
||||
task_manager::WebContentsTags::CreateForTabContents(new_contents);
|
||||
@ -325,7 +327,7 @@ index 3d985470f60d1..762f0e827d53e 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();
|
||||
@@ -1991,6 +2088,13 @@ void Browser::RendererUnresponsive(
|
||||
@@ -1998,6 +2097,13 @@ void Browser::RendererUnresponsive(
|
||||
void Browser::RendererResponsive(
|
||||
WebContents* source,
|
||||
content::RenderWidgetHost* render_widget_host) {
|
||||
@ -339,7 +341,19 @@ index 3d985470f60d1..762f0e827d53e 100644
|
||||
RenderWidgetHostView* view = render_widget_host->GetView();
|
||||
if (view && !render_widget_host->GetView()->IsHTMLFormPopup()) {
|
||||
TabDialogs::FromWebContents(source)->HideHungRendererDialog(
|
||||
@@ -2117,11 +2221,15 @@ void Browser::EnterFullscreenModeForTab(
|
||||
@@ -2051,6 +2157,11 @@ void Browser::DraggableRegionsChanged(
|
||||
if (app_controller_) {
|
||||
app_controller_->DraggableRegionsChanged(regions, contents);
|
||||
}
|
||||
+#if BUILDFLAG(ENABLE_CEF)
|
||||
+ else if (cef_delegate()) {
|
||||
+ cef_delegate()->DraggableRegionsChanged(regions, contents);
|
||||
+ }
|
||||
+#endif
|
||||
}
|
||||
|
||||
void Browser::DidFinishNavigation(
|
||||
@@ -2132,11 +2243,15 @@ void Browser::EnterFullscreenModeForTab(
|
||||
const blink::mojom::FullscreenOptions& options) {
|
||||
exclusive_access_manager_->fullscreen_controller()->EnterFullscreenModeForTab(
|
||||
requesting_frame, options.display_id);
|
||||
@ -355,7 +369,7 @@ index 3d985470f60d1..762f0e827d53e 100644
|
||||
}
|
||||
|
||||
bool Browser::IsFullscreenForTabOrPending(const WebContents* web_contents) {
|
||||
@@ -2321,6 +2429,15 @@ void Browser::RequestMediaAccessPermission(
|
||||
@@ -2336,6 +2451,15 @@ void Browser::RequestMediaAccessPermission(
|
||||
content::WebContents* web_contents,
|
||||
const content::MediaStreamRequest& request,
|
||||
content::MediaResponseCallback callback) {
|
||||
@ -371,7 +385,7 @@ index 3d985470f60d1..762f0e827d53e 100644
|
||||
const extensions::Extension* extension =
|
||||
GetExtensionForOrigin(profile_, request.security_origin);
|
||||
MediaCaptureDevicesDispatcher::GetInstance()->ProcessMediaAccessRequest(
|
||||
@@ -2864,9 +2981,11 @@ void Browser::RemoveScheduledUpdatesFor(WebContents* contents) {
|
||||
@@ -2880,9 +3004,11 @@ void Browser::RemoveScheduledUpdatesFor(WebContents* contents) {
|
||||
// Browser, Getters for UI (private):
|
||||
|
||||
StatusBubble* Browser::GetStatusBubble() {
|
||||
@ -384,7 +398,7 @@ index 3d985470f60d1..762f0e827d53e 100644
|
||||
}
|
||||
|
||||
// We hide the status bar for web apps windows as this matches native
|
||||
@@ -2874,6 +2993,12 @@ StatusBubble* Browser::GetStatusBubble() {
|
||||
@@ -2890,6 +3016,12 @@ StatusBubble* Browser::GetStatusBubble() {
|
||||
// mode, as the minimal browser UI includes the status bar.
|
||||
if (web_app::AppBrowserController::IsWebApp(this) &&
|
||||
!app_controller()->HasMinimalUiButtons()) {
|
||||
@ -397,7 +411,7 @@ index 3d985470f60d1..762f0e827d53e 100644
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -3010,6 +3135,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) {
|
||||
@@ -3026,6 +3158,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) {
|
||||
BookmarkTabHelper::FromWebContents(web_contents)->RemoveObserver(this);
|
||||
web_contents_collection_.StopObserving(web_contents);
|
||||
}
|
||||
@ -406,7 +420,7 @@ index 3d985470f60d1..762f0e827d53e 100644
|
||||
}
|
||||
|
||||
void Browser::TabDetachedAtImpl(content::WebContents* contents,
|
||||
@@ -3164,6 +3291,14 @@ bool Browser::PictureInPictureBrowserSupportsWindowFeature(
|
||||
@@ -3180,6 +3314,14 @@ bool Browser::PictureInPictureBrowserSupportsWindowFeature(
|
||||
|
||||
bool Browser::SupportsWindowFeatureImpl(WindowFeature feature,
|
||||
bool check_can_support) const {
|
||||
@ -422,7 +436,7 @@ index 3d985470f60d1..762f0e827d53e 100644
|
||||
case TYPE_NORMAL:
|
||||
return NormalBrowserSupportsWindowFeature(feature, check_can_support);
|
||||
diff --git chrome/browser/ui/browser.h chrome/browser/ui/browser.h
|
||||
index 4f393fa78e991..a486d6f7f1571 100644
|
||||
index 6a3a4af355be9..b04d27dab01ed 100644
|
||||
--- chrome/browser/ui/browser.h
|
||||
+++ chrome/browser/ui/browser.h
|
||||
@@ -22,6 +22,7 @@
|
||||
@ -433,7 +447,7 @@ index 4f393fa78e991..a486d6f7f1571 100644
|
||||
#include "chrome/browser/tab_contents/web_contents_collection.h"
|
||||
#include "chrome/browser/themes/theme_service_observer.h"
|
||||
#include "chrome/browser/ui/bookmarks/bookmark_bar.h"
|
||||
@@ -48,6 +49,10 @@
|
||||
@@ -49,6 +50,10 @@
|
||||
#include "ui/gfx/geometry/rect.h"
|
||||
#include "ui/shell_dialogs/select_file_dialog.h"
|
||||
|
||||
@ -444,7 +458,7 @@ index 4f393fa78e991..a486d6f7f1571 100644
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
#error This file should only be included on desktop.
|
||||
#endif
|
||||
@@ -347,6 +352,15 @@ class Browser : public TabStripModelObserver,
|
||||
@@ -365,6 +370,15 @@ class Browser : public TabStripModelObserver,
|
||||
// Document Picture in Picture options, specific to TYPE_PICTURE_IN_PICTURE.
|
||||
std::optional<blink::mojom::PictureInPictureWindowOptions> pip_options;
|
||||
|
||||
@ -460,7 +474,7 @@ index 4f393fa78e991..a486d6f7f1571 100644
|
||||
private:
|
||||
friend class Browser;
|
||||
friend class WindowSizerChromeOSTest;
|
||||
@@ -428,6 +442,13 @@ class Browser : public TabStripModelObserver,
|
||||
@@ -446,6 +460,13 @@ class Browser : public TabStripModelObserver,
|
||||
update_ui_immediately_for_testing_ = true;
|
||||
}
|
||||
|
||||
@ -474,7 +488,7 @@ index 4f393fa78e991..a486d6f7f1571 100644
|
||||
// Accessors ////////////////////////////////////////////////////////////////
|
||||
|
||||
const CreateParams& create_params() const { return create_params_; }
|
||||
@@ -502,6 +523,12 @@ class Browser : public TabStripModelObserver,
|
||||
@@ -536,6 +557,12 @@ class Browser : public TabStripModelObserver,
|
||||
base::WeakPtr<Browser> AsWeakPtr();
|
||||
base::WeakPtr<const Browser> AsWeakPtr() const;
|
||||
|
||||
@ -487,7 +501,7 @@ index 4f393fa78e991..a486d6f7f1571 100644
|
||||
// Get the FindBarController for this browser, creating it if it does not
|
||||
// yet exist.
|
||||
FindBarController* GetFindBarController();
|
||||
@@ -908,11 +935,19 @@ class Browser : public TabStripModelObserver,
|
||||
@@ -947,11 +974,19 @@ class Browser : public TabStripModelObserver,
|
||||
void SetContentsBounds(content::WebContents* source,
|
||||
const gfx::Rect& bounds) override;
|
||||
void UpdateTargetURL(content::WebContents* source, const GURL& url) override;
|
||||
@ -507,7 +521,7 @@ index 4f393fa78e991..a486d6f7f1571 100644
|
||||
void BeforeUnloadFired(content::WebContents* source,
|
||||
bool proceed,
|
||||
bool* proceed_to_fire_unload) override;
|
||||
@@ -1252,6 +1287,10 @@ class Browser : public TabStripModelObserver,
|
||||
@@ -1289,6 +1324,10 @@ class Browser : public TabStripModelObserver,
|
||||
// This Browser's window.
|
||||
raw_ptr<BrowserWindow, DanglingUntriaged> window_;
|
||||
|
||||
@ -518,7 +532,7 @@ index 4f393fa78e991..a486d6f7f1571 100644
|
||||
std::unique_ptr<TabStripModelDelegate> const tab_strip_model_delegate_;
|
||||
std::unique_ptr<TabStripModel> const tab_strip_model_;
|
||||
|
||||
@@ -1318,6 +1357,8 @@ class Browser : public TabStripModelObserver,
|
||||
@@ -1355,6 +1394,8 @@ class Browser : public TabStripModelObserver,
|
||||
const std::string initial_workspace_;
|
||||
bool initial_visible_on_all_workspaces_state_;
|
||||
|
||||
@ -528,10 +542,10 @@ index 4f393fa78e991..a486d6f7f1571 100644
|
||||
|
||||
UnloadController unload_controller_;
|
||||
diff --git chrome/browser/ui/browser_navigator.cc chrome/browser/ui/browser_navigator.cc
|
||||
index 151c73f9d7a18..e02316efd4011 100644
|
||||
index cefb9f62051fe..6e19377f78e4f 100644
|
||||
--- chrome/browser/ui/browser_navigator.cc
|
||||
+++ chrome/browser/ui/browser_navigator.cc
|
||||
@@ -305,6 +305,10 @@ std::pair<Browser*, int> GetBrowserAndTabForDisposition(
|
||||
@@ -313,6 +313,10 @@ std::pair<Browser*, int> GetBrowserAndTabForDisposition(
|
||||
: 1.0;
|
||||
browser_params.pip_options = pip_options;
|
||||
|
||||
@ -542,7 +556,7 @@ index 151c73f9d7a18..e02316efd4011 100644
|
||||
const BrowserWindow* const browser_window = params.browser->window();
|
||||
const gfx::NativeWindow native_window =
|
||||
browser_window ? browser_window->GetNativeWindow()
|
||||
@@ -590,6 +594,13 @@ std::unique_ptr<content::WebContents> CreateTargetContents(
|
||||
@@ -598,6 +602,13 @@ std::unique_ptr<content::WebContents> CreateTargetContents(
|
||||
std::unique_ptr<WebContents> target_contents =
|
||||
WebContents::Create(create_params);
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
diff --git chrome/browser/content_settings/host_content_settings_map_factory.cc chrome/browser/content_settings/host_content_settings_map_factory.cc
|
||||
index 36335ba63ee83..e14005d6a4e86 100644
|
||||
index 9356bf044a318..2499576dea7f0 100644
|
||||
--- chrome/browser/content_settings/host_content_settings_map_factory.cc
|
||||
+++ chrome/browser/content_settings/host_content_settings_map_factory.cc
|
||||
@@ -9,6 +9,7 @@
|
||||
@ -10,7 +10,7 @@ index 36335ba63ee83..e14005d6a4e86 100644
|
||||
#include "chrome/browser/content_settings/one_time_permission_provider.h"
|
||||
#include "chrome/browser/permissions/one_time_permissions_tracker_factory.h"
|
||||
#include "chrome/browser/profiles/off_the_record_profile_impl.h"
|
||||
@@ -24,6 +25,10 @@
|
||||
@@ -27,6 +28,10 @@
|
||||
#include "extensions/buildflags/buildflags.h"
|
||||
#include "ui/webui/webui_allowlist_provider.h"
|
||||
|
||||
@ -21,7 +21,7 @@ index 36335ba63ee83..e14005d6a4e86 100644
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
#include "base/trace_event/trace_event.h"
|
||||
#include "extensions/browser/api/content_settings/content_settings_custom_extension_provider.h"
|
||||
@@ -64,7 +69,13 @@ HostContentSettingsMapFactory::HostContentSettingsMapFactory()
|
||||
@@ -58,7 +63,13 @@ HostContentSettingsMapFactory::HostContentSettingsMapFactory()
|
||||
#endif
|
||||
DependsOn(OneTimePermissionsTrackerFactory::GetInstance());
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
@ -35,7 +35,7 @@ index 36335ba63ee83..e14005d6a4e86 100644
|
||||
#endif
|
||||
// Used by way of ShouldRestoreOldSessionCookies().
|
||||
#if BUILDFLAG(ENABLE_SESSION_SERVICE)
|
||||
@@ -118,6 +129,9 @@ scoped_refptr<RefcountedKeyedService>
|
||||
@@ -112,6 +123,9 @@ scoped_refptr<RefcountedKeyedService>
|
||||
std::move(allowlist_provider));
|
||||
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
@ -45,7 +45,7 @@ index 36335ba63ee83..e14005d6a4e86 100644
|
||||
// These must be registered before before the HostSettings are passed over to
|
||||
// the IOThread. Simplest to do this on construction.
|
||||
settings_map->RegisterProvider(
|
||||
@@ -130,6 +144,9 @@ scoped_refptr<RefcountedKeyedService>
|
||||
@@ -124,6 +138,9 @@ scoped_refptr<RefcountedKeyedService>
|
||||
// the case where profile->IsOffTheRecord() is true? And what is the
|
||||
// interaction with profile->IsGuestSession()?
|
||||
false));
|
||||
@ -53,10 +53,10 @@ index 36335ba63ee83..e14005d6a4e86 100644
|
||||
+ }
|
||||
+#endif
|
||||
#endif // BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
|
||||
supervised_user::SupervisedUserSettingsService* supervised_service =
|
||||
SupervisedUserSettingsServiceFactory::GetForKey(profile->GetProfileKey());
|
||||
diff --git components/content_settings/renderer/content_settings_agent_impl.cc components/content_settings/renderer/content_settings_agent_impl.cc
|
||||
index 0ff900e700ba8..ca5b899bece6d 100644
|
||||
index f988c812b4ad9..3d5637f3cbdf3 100644
|
||||
--- components/content_settings/renderer/content_settings_agent_impl.cc
|
||||
+++ components/content_settings/renderer/content_settings_agent_impl.cc
|
||||
@@ -148,7 +148,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 d182bc1b7bff2..e7c0d5b03ede7 100644
|
||||
index 72a2b681d5b98..8f7368add83fb 100644
|
||||
--- chrome/browser/renderer_context_menu/render_view_context_menu.cc
|
||||
+++ chrome/browser/renderer_context_menu/render_view_context_menu.cc
|
||||
@@ -361,6 +361,18 @@ base::OnceCallback<void(RenderViewContextMenu*)>* GetMenuShownCallback() {
|
||||
@@ -358,6 +358,18 @@ base::OnceCallback<void(RenderViewContextMenu*)>* GetMenuShownCallback() {
|
||||
return callback.get();
|
||||
}
|
||||
|
||||
@ -21,7 +21,7 @@ index d182bc1b7bff2..e7c0d5b03ede7 100644
|
||||
enum class UmaEnumIdLookupType {
|
||||
GeneralEnumId,
|
||||
ContextSpecificEnumId,
|
||||
@@ -618,6 +630,10 @@ int FindUMAEnumValueForCommand(int id, UmaEnumIdLookupType type) {
|
||||
@@ -615,6 +627,10 @@ int FindUMAEnumValueForCommand(int id, UmaEnumIdLookupType type) {
|
||||
if (ContextMenuMatcher::IsExtensionsCustomCommandId(id))
|
||||
return 1;
|
||||
|
||||
@ -32,7 +32,7 @@ index d182bc1b7bff2..e7c0d5b03ede7 100644
|
||||
id = CollapseCommandsForUMA(id);
|
||||
const auto& map = GetIdcToUmaMap(type);
|
||||
auto it = map.find(id);
|
||||
@@ -867,6 +883,14 @@ RenderViewContextMenu::RenderViewContextMenu(
|
||||
@@ -865,6 +881,14 @@ RenderViewContextMenu::RenderViewContextMenu(
|
||||
pdf_ocr_submenu_model_ = std::make_unique<ui::SimpleMenuModel>(this);
|
||||
#endif // BUILDFLAG(ENABLE_SCREEN_AI_SERVICE)
|
||||
|
||||
@ -47,7 +47,7 @@ index d182bc1b7bff2..e7c0d5b03ede7 100644
|
||||
observers_.AddObserver(&autofill_context_menu_manager_);
|
||||
}
|
||||
|
||||
@@ -1341,6 +1365,12 @@ void RenderViewContextMenu::InitMenu() {
|
||||
@@ -1339,6 +1363,12 @@ void RenderViewContextMenu::InitMenu() {
|
||||
autofill::PopupHidingReason::kContextMenuOpened);
|
||||
}
|
||||
}
|
||||
@ -60,7 +60,7 @@ index d182bc1b7bff2..e7c0d5b03ede7 100644
|
||||
}
|
||||
|
||||
Profile* RenderViewContextMenu::GetProfile() const {
|
||||
@@ -3564,6 +3594,26 @@ void RenderViewContextMenu::RegisterExecutePluginActionCallbackForTesting(
|
||||
@@ -3572,6 +3602,26 @@ void RenderViewContextMenu::RegisterExecutePluginActionCallbackForTesting(
|
||||
execute_plugin_action_callback_ = std::move(cb);
|
||||
}
|
||||
|
||||
@ -88,10 +88,10 @@ index d182bc1b7bff2..e7c0d5b03ede7 100644
|
||||
RenderViewContextMenu::GetHandlersForLinkUrl() {
|
||||
custom_handlers::ProtocolHandlerRegistry::ProtocolHandlerList handlers =
|
||||
diff --git chrome/browser/renderer_context_menu/render_view_context_menu.h chrome/browser/renderer_context_menu/render_view_context_menu.h
|
||||
index 9634f1d7f3442..96dc5f252280c 100644
|
||||
index 548004a597fa0..f63405fa8badc 100644
|
||||
--- chrome/browser/renderer_context_menu/render_view_context_menu.h
|
||||
+++ chrome/browser/renderer_context_menu/render_view_context_menu.h
|
||||
@@ -158,7 +158,21 @@ class RenderViewContextMenu
|
||||
@@ -155,7 +155,21 @@ class RenderViewContextMenu
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -113,7 +113,7 @@ index 9634f1d7f3442..96dc5f252280c 100644
|
||||
Profile* GetProfile() const;
|
||||
|
||||
// This may return nullptr (e.g. for WebUI dialogs). Virtual to allow tests to
|
||||
@@ -470,6 +484,9 @@ class RenderViewContextMenu
|
||||
@@ -465,6 +479,9 @@ class RenderViewContextMenu
|
||||
// built.
|
||||
bool is_protocol_submenu_valid_ = false;
|
||||
|
||||
@ -164,7 +164,7 @@ index c88a77a0b49e2..d1af9a85c4ec6 100644
|
||||
return;
|
||||
|
||||
diff --git components/renderer_context_menu/render_view_context_menu_base.cc components/renderer_context_menu/render_view_context_menu_base.cc
|
||||
index c49b49d76d7cc..842a6fae5d8e4 100644
|
||||
index 8e45cecb17039..e40115e23ee82 100644
|
||||
--- components/renderer_context_menu/render_view_context_menu_base.cc
|
||||
+++ components/renderer_context_menu/render_view_context_menu_base.cc
|
||||
@@ -374,6 +374,17 @@ bool RenderViewContextMenuBase::IsCommandIdChecked(int id) const {
|
||||
@ -186,7 +186,7 @@ index c49b49d76d7cc..842a6fae5d8e4 100644
|
||||
command_executed_ = true;
|
||||
RecordUsedItem(id);
|
||||
diff --git components/renderer_context_menu/render_view_context_menu_base.h components/renderer_context_menu/render_view_context_menu_base.h
|
||||
index e3e8617aa03b6..9bb486d691582 100644
|
||||
index 57b288bc885e6..112990e3a9ad3 100644
|
||||
--- components/renderer_context_menu/render_view_context_menu_base.h
|
||||
+++ components/renderer_context_menu/render_view_context_menu_base.h
|
||||
@@ -87,6 +87,9 @@ class RenderViewContextMenuBase : public ui::SimpleMenuModel::Delegate,
|
||||
|
@ -1,5 +1,5 @@
|
||||
diff --git chrome/browser/file_select_helper.cc chrome/browser/file_select_helper.cc
|
||||
index 4d5299dc12b76..a74d0212d2eb1 100644
|
||||
index 447a91b9ac380..51593091b5fa6 100644
|
||||
--- chrome/browser/file_select_helper.cc
|
||||
+++ chrome/browser/file_select_helper.cc
|
||||
@@ -20,6 +20,7 @@
|
||||
@ -10,7 +10,7 @@ index 4d5299dc12b76..a74d0212d2eb1 100644
|
||||
#include "chrome/browser/browser_process.h"
|
||||
#include "chrome/browser/enterprise/connectors/common.h"
|
||||
#include "chrome/browser/platform_util.h"
|
||||
@@ -246,6 +247,13 @@ void FileSelectHelper::OnListFile(
|
||||
@@ -245,6 +246,13 @@ void FileSelectHelper::OnListFile(
|
||||
void FileSelectHelper::LaunchConfirmationDialog(
|
||||
const base::FilePath& path,
|
||||
std::vector<ui::SelectedFileInfo> selected_files) {
|
||||
@ -24,7 +24,7 @@ index 4d5299dc12b76..a74d0212d2eb1 100644
|
||||
ShowFolderUploadConfirmationDialog(
|
||||
path,
|
||||
base::BindOnce(&FileSelectHelper::ConvertToFileChooserFileInfoList, this),
|
||||
@@ -330,6 +338,12 @@ void FileSelectHelper::PerformContentAnalysisIfNeeded(
|
||||
@@ -329,6 +337,12 @@ void FileSelectHelper::PerformContentAnalysisIfNeeded(
|
||||
if (AbortIfWebContentsDestroyed())
|
||||
return;
|
||||
|
||||
@ -37,7 +37,7 @@ index 4d5299dc12b76..a74d0212d2eb1 100644
|
||||
#if BUILDFLAG(ENTERPRISE_CLOUD_CONTENT_ANALYSIS)
|
||||
enterprise_connectors::ContentAnalysisDelegate::Data data;
|
||||
if (enterprise_connectors::ContentAnalysisDelegate::IsEnabled(
|
||||
@@ -460,7 +474,8 @@ void FileSelectHelper::DontAbortOnMissingWebContentsForTesting() {
|
||||
@@ -459,7 +473,8 @@ void FileSelectHelper::DontAbortOnMissingWebContentsForTesting() {
|
||||
|
||||
std::unique_ptr<ui::SelectFileDialog::FileTypeInfo>
|
||||
FileSelectHelper::GetFileTypesFromAcceptType(
|
||||
@ -47,7 +47,7 @@ index 4d5299dc12b76..a74d0212d2eb1 100644
|
||||
auto base_file_type = std::make_unique<ui::SelectFileDialog::FileTypeInfo>();
|
||||
if (accept_types.empty())
|
||||
return base_file_type;
|
||||
@@ -473,17 +488,24 @@ FileSelectHelper::GetFileTypesFromAcceptType(
|
||||
@@ -472,17 +487,24 @@ FileSelectHelper::GetFileTypesFromAcceptType(
|
||||
std::vector<base::FilePath::StringType>* extensions =
|
||||
&file_type->extensions.back();
|
||||
|
||||
@ -73,7 +73,7 @@ index 4d5299dc12b76..a74d0212d2eb1 100644
|
||||
} else {
|
||||
if (!base::IsStringASCII(accept_type))
|
||||
continue;
|
||||
@@ -494,10 +516,18 @@ FileSelectHelper::GetFileTypesFromAcceptType(
|
||||
@@ -493,10 +515,18 @@ FileSelectHelper::GetFileTypesFromAcceptType(
|
||||
description_id = IDS_AUDIO_FILES;
|
||||
else if (ascii_type == "video/*")
|
||||
description_id = IDS_VIDEO_FILES;
|
||||
@ -94,7 +94,7 @@ index 4d5299dc12b76..a74d0212d2eb1 100644
|
||||
if (extensions->size() > old_extension_size)
|
||||
valid_type_count++;
|
||||
}
|
||||
@@ -522,6 +552,15 @@ FileSelectHelper::GetFileTypesFromAcceptType(
|
||||
@@ -521,6 +551,15 @@ FileSelectHelper::GetFileTypesFromAcceptType(
|
||||
l10n_util::GetStringUTF16(description_id));
|
||||
}
|
||||
|
||||
@ -110,7 +110,7 @@ index 4d5299dc12b76..a74d0212d2eb1 100644
|
||||
return file_type;
|
||||
}
|
||||
|
||||
@@ -529,7 +568,8 @@ FileSelectHelper::GetFileTypesFromAcceptType(
|
||||
@@ -528,7 +567,8 @@ FileSelectHelper::GetFileTypesFromAcceptType(
|
||||
void FileSelectHelper::RunFileChooser(
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
scoped_refptr<content::FileSelectListener> listener,
|
||||
@ -120,7 +120,7 @@ index 4d5299dc12b76..a74d0212d2eb1 100644
|
||||
Profile* profile = Profile::FromBrowserContext(
|
||||
render_frame_host->GetProcess()->GetBrowserContext());
|
||||
|
||||
@@ -548,6 +588,7 @@ void FileSelectHelper::RunFileChooser(
|
||||
@@ -547,6 +587,7 @@ void FileSelectHelper::RunFileChooser(
|
||||
// message.
|
||||
scoped_refptr<FileSelectHelper> file_select_helper(
|
||||
new FileSelectHelper(profile));
|
||||
@ -128,7 +128,7 @@ index 4d5299dc12b76..a74d0212d2eb1 100644
|
||||
file_select_helper->RunFileChooser(render_frame_host, std::move(listener),
|
||||
params.Clone());
|
||||
}
|
||||
@@ -599,7 +640,8 @@ void FileSelectHelper::RunFileChooser(
|
||||
@@ -598,7 +639,8 @@ void FileSelectHelper::RunFileChooser(
|
||||
}
|
||||
|
||||
void FileSelectHelper::GetFileTypesInThreadPool(FileChooserParamsPtr params) {
|
||||
|
@ -12,7 +12,7 @@ index b169371e4d42f..509e4bda85b47 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 7eda0c852bb51..744452bf6c00c 100644
|
||||
index 630ede12ce3f8..b7bc765e3eb99 100644
|
||||
--- components/constrained_window/constrained_window_views.cc
|
||||
+++ components/constrained_window/constrained_window_views.cc
|
||||
@@ -105,15 +105,24 @@ void UpdateModalDialogPosition(views::Widget* widget,
|
||||
@ -53,7 +53,7 @@ index 7eda0c852bb51..744452bf6c00c 100644
|
||||
- host_widget->GetClientAreaBoundsInScreen().OffsetFromOrigin();
|
||||
- const gfx::Rect host_screen_bounds = host_widget->GetWindowBoundsInScreen();
|
||||
-
|
||||
- // TODO(crbug.com/1341530): The requested dialog bounds should never fall
|
||||
- // TODO(crbug.com/40851111): The requested dialog bounds should never fall
|
||||
- // outside the bounds of the transient parent.
|
||||
- DCHECK(dialog_screen_bounds.Intersects(host_screen_bounds));
|
||||
-
|
||||
@ -178,17 +178,17 @@ 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 992dbc606ab78..2361727757696 100644
|
||||
index 1361ac9b3d57b..5a41f86862561 100644
|
||||
--- ui/views/window/dialog_delegate.cc
|
||||
+++ ui/views/window/dialog_delegate.cc
|
||||
@@ -60,10 +60,12 @@ DialogDelegate::DialogDelegate() {
|
||||
@@ -84,10 +84,12 @@ DialogDelegate::DialogDelegate() {
|
||||
// static
|
||||
Widget* DialogDelegate::CreateDialogWidget(WidgetDelegate* delegate,
|
||||
gfx::NativeWindow context,
|
||||
- gfx::NativeView parent) {
|
||||
+ gfx::NativeView parent,
|
||||
+ gfx::AcceleratedWidget parent_widget) {
|
||||
views::Widget* widget = new views::Widget;
|
||||
views::Widget* widget = new DialogWidget;
|
||||
views::Widget::InitParams params =
|
||||
- GetDialogWidgetInitParams(delegate, context, parent, gfx::Rect());
|
||||
+ GetDialogWidgetInitParams(delegate, context, parent, gfx::Rect(),
|
||||
@ -196,7 +196,7 @@ index 992dbc606ab78..2361727757696 100644
|
||||
widget->Init(std::move(params));
|
||||
return widget;
|
||||
}
|
||||
@@ -72,17 +74,19 @@ Widget* DialogDelegate::CreateDialogWidget(WidgetDelegate* delegate,
|
||||
@@ -96,17 +98,19 @@ Widget* DialogDelegate::CreateDialogWidget(WidgetDelegate* delegate,
|
||||
Widget* DialogDelegate::CreateDialogWidget(
|
||||
std::unique_ptr<WidgetDelegate> delegate,
|
||||
gfx::NativeWindow context,
|
||||
@ -220,7 +220,7 @@ index 992dbc606ab78..2361727757696 100644
|
||||
#else
|
||||
return true;
|
||||
#endif
|
||||
@@ -93,14 +97,15 @@ Widget::InitParams DialogDelegate::GetDialogWidgetInitParams(
|
||||
@@ -117,14 +121,15 @@ Widget::InitParams DialogDelegate::GetDialogWidgetInitParams(
|
||||
WidgetDelegate* delegate,
|
||||
gfx::NativeWindow context,
|
||||
gfx::NativeView parent,
|
||||
@ -238,7 +238,7 @@ index 992dbc606ab78..2361727757696 100644
|
||||
|
||||
if (!dialog || dialog->use_custom_frame()) {
|
||||
params.opacity = Widget::InitParams::WindowOpacity::kTranslucent;
|
||||
@@ -113,6 +118,7 @@ Widget::InitParams DialogDelegate::GetDialogWidgetInitParams(
|
||||
@@ -137,6 +142,7 @@ Widget::InitParams DialogDelegate::GetDialogWidgetInitParams(
|
||||
}
|
||||
params.context = context;
|
||||
params.parent = parent;
|
||||
@ -247,10 +247,10 @@ index 992dbc606ab78..2361727757696 100644
|
||||
// Web-modal (ui::MODAL_TYPE_CHILD) dialogs with parents are marked as child
|
||||
// widgets to prevent top-level window behavior (independent movement, etc).
|
||||
diff --git ui/views/window/dialog_delegate.h ui/views/window/dialog_delegate.h
|
||||
index bfeb88bc9b666..6dd74a72e20cc 100644
|
||||
index de642a3bc1101..bdd8664f481a9 100644
|
||||
--- ui/views/window/dialog_delegate.h
|
||||
+++ ui/views/window/dialog_delegate.h
|
||||
@@ -96,13 +96,18 @@ class VIEWS_EXPORT DialogDelegate : public WidgetDelegate {
|
||||
@@ -97,13 +97,18 @@ class VIEWS_EXPORT DialogDelegate : public WidgetDelegate {
|
||||
// your use case.
|
||||
static Widget* CreateDialogWidget(std::unique_ptr<WidgetDelegate> delegate,
|
||||
gfx::NativeWindow context,
|
||||
@ -272,7 +272,7 @@ index bfeb88bc9b666..6dd74a72e20cc 100644
|
||||
|
||||
// Returns the dialog widget InitParams for a given |context| or |parent|.
|
||||
// If |bounds| is not empty, used to initially place the dialog, otherwise
|
||||
@@ -110,7 +115,9 @@ class VIEWS_EXPORT DialogDelegate : public WidgetDelegate {
|
||||
@@ -111,7 +116,9 @@ class VIEWS_EXPORT DialogDelegate : public WidgetDelegate {
|
||||
static Widget::InitParams GetDialogWidgetInitParams(WidgetDelegate* delegate,
|
||||
gfx::NativeWindow context,
|
||||
gfx::NativeView parent,
|
||||
|
@ -1,5 +1,5 @@
|
||||
diff --git chrome/browser/extensions/api/chrome_extensions_api_client.cc chrome/browser/extensions/api/chrome_extensions_api_client.cc
|
||||
index 2897ebd032da8..32b2e5d80f39a 100644
|
||||
index 4007e26f780c3..5f92d74018f9e 100644
|
||||
--- chrome/browser/extensions/api/chrome_extensions_api_client.cc
|
||||
+++ chrome/browser/extensions/api/chrome_extensions_api_client.cc
|
||||
@@ -14,6 +14,7 @@
|
||||
@ -10,7 +10,7 @@ index 2897ebd032da8..32b2e5d80f39a 100644
|
||||
#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"
|
||||
@@ -91,6 +92,10 @@
|
||||
@@ -92,6 +93,10 @@
|
||||
#include "chrome/browser/extensions/clipboard_extension_helper_chromeos.h"
|
||||
#endif
|
||||
|
||||
@ -21,7 +21,7 @@ index 2897ebd032da8..32b2e5d80f39a 100644
|
||||
#if BUILDFLAG(ENABLE_PRINTING)
|
||||
#include "chrome/browser/printing/printing_init.h"
|
||||
#endif
|
||||
@@ -318,6 +323,11 @@ ChromeExtensionsAPIClient::CreateGuestViewManagerDelegate() const {
|
||||
@@ -314,6 +319,11 @@ ChromeExtensionsAPIClient::CreateGuestViewManagerDelegate() const {
|
||||
std::unique_ptr<MimeHandlerViewGuestDelegate>
|
||||
ChromeExtensionsAPIClient::CreateMimeHandlerViewGuestDelegate(
|
||||
MimeHandlerViewGuest* guest) const {
|
||||
|
@ -33,7 +33,7 @@ index a5ee05ae5f5e9..97fd2e8da450e 100644
|
||||
~BrowserFrameMac() override;
|
||||
|
||||
diff --git chrome/browser/ui/views/frame/browser_frame_mac.mm chrome/browser/ui/views/frame/browser_frame_mac.mm
|
||||
index 24b68406431ce..5d58296a7a7f4 100644
|
||||
index 13300a3ec7e25..b8f61c5845779 100644
|
||||
--- chrome/browser/ui/views/frame/browser_frame_mac.mm
|
||||
+++ chrome/browser/ui/views/frame/browser_frame_mac.mm
|
||||
@@ -182,7 +182,14 @@ void BrowserFrameMac::OnWindowFullscreenTransitionComplete() {
|
||||
@ -52,7 +52,7 @@ index 24b68406431ce..5d58296a7a7f4 100644
|
||||
if (!chrome::SupportsCommand(browser, tag)) {
|
||||
result->enable = false;
|
||||
return;
|
||||
@@ -310,8 +317,16 @@ bool BrowserFrameMac::WillExecuteCommand(
|
||||
@@ -294,8 +301,16 @@ bool BrowserFrameMac::WillExecuteCommand(
|
||||
int32_t command,
|
||||
WindowOpenDisposition window_open_disposition,
|
||||
bool is_before_first_responder) {
|
||||
@ -70,7 +70,7 @@ index 24b68406431ce..5d58296a7a7f4 100644
|
||||
if (is_before_first_responder) {
|
||||
// The specification for this private extensions API is incredibly vague.
|
||||
// For now, we avoid triggering chrome commands prior to giving the
|
||||
@@ -342,11 +357,20 @@ bool BrowserFrameMac::ExecuteCommand(
|
||||
@@ -326,11 +341,20 @@ bool BrowserFrameMac::ExecuteCommand(
|
||||
int32_t command,
|
||||
WindowOpenDisposition window_open_disposition,
|
||||
bool is_before_first_responder) {
|
||||
|
@ -21,7 +21,7 @@ index 429739d7b8dfe..0f4bff365f62b 100644
|
||||
g_browser_process->download_request_limiter();
|
||||
DCHECK(limiter);
|
||||
diff --git chrome/browser/background_sync/periodic_background_sync_permission_context.cc chrome/browser/background_sync/periodic_background_sync_permission_context.cc
|
||||
index ea1467d09700d..5537a99500e7f 100644
|
||||
index d63a055919747..8d13959217751 100644
|
||||
--- chrome/browser/background_sync/periodic_background_sync_permission_context.cc
|
||||
+++ chrome/browser/background_sync/periodic_background_sync_permission_context.cc
|
||||
@@ -6,6 +6,7 @@
|
||||
@ -30,8 +30,8 @@ index ea1467d09700d..5537a99500e7f 100644
|
||||
#include "build/build_config.h"
|
||||
+#include "cef/libcef/features/runtime.h"
|
||||
#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
|
||||
#include "chrome/browser/installable/installable_utils.h"
|
||||
#include "chrome/browser/profiles/profile.h"
|
||||
#include "chrome/browser/search_engines/template_url_service_factory.h"
|
||||
@@ -89,6 +90,10 @@ PeriodicBackgroundSyncPermissionContext::GetPermissionStatusInternal(
|
||||
return CONTENT_SETTING_ALLOW;
|
||||
#endif
|
||||
@ -44,7 +44,7 @@ index ea1467d09700d..5537a99500e7f 100644
|
||||
base::FeatureList::IsEnabled(
|
||||
features::kPeriodicSyncPermissionForDefaultSearchEngine) &&
|
||||
diff --git chrome/browser/permissions/chrome_permissions_client.cc chrome/browser/permissions/chrome_permissions_client.cc
|
||||
index b6afdced9d0af..e189d08ecdd46 100644
|
||||
index 7f14b48feedf6..cfcf4554c1d4d 100644
|
||||
--- chrome/browser/permissions/chrome_permissions_client.cc
|
||||
+++ chrome/browser/permissions/chrome_permissions_client.cc
|
||||
@@ -14,6 +14,7 @@
|
||||
@ -52,10 +52,10 @@ index b6afdced9d0af..e189d08ecdd46 100644
|
||||
#include "build/build_config.h"
|
||||
#include "build/chromeos_buildflags.h"
|
||||
+#include "cef/libcef/features/runtime.h"
|
||||
#include "chrome/browser/ash/shimless_rma/chrome_shimless_rma_delegate.h"
|
||||
#include "chrome/browser/bluetooth/bluetooth_chooser_context_factory.h"
|
||||
#include "chrome/browser/browser_process.h"
|
||||
#include "chrome/browser/content_settings/cookie_settings_factory.h"
|
||||
@@ -189,6 +190,9 @@ ChromePermissionsClient::GetPermissionDecisionAutoBlocker(
|
||||
@@ -190,6 +191,9 @@ ChromePermissionsClient::GetPermissionDecisionAutoBlocker(
|
||||
double ChromePermissionsClient::GetSiteEngagementScore(
|
||||
content::BrowserContext* browser_context,
|
||||
const GURL& origin) {
|
||||
@ -65,7 +65,7 @@ index b6afdced9d0af..e189d08ecdd46 100644
|
||||
return site_engagement::SiteEngagementService::Get(
|
||||
Profile::FromBrowserContext(browser_context))
|
||||
->GetScore(origin);
|
||||
@@ -359,8 +363,10 @@ ChromePermissionsClient::CreatePermissionUiSelectors(
|
||||
@@ -360,8 +364,10 @@ ChromePermissionsClient::CreatePermissionUiSelectors(
|
||||
std::make_unique<ContextualNotificationPermissionUiSelector>());
|
||||
selectors.emplace_back(std::make_unique<PrefBasedQuietPermissionUiSelector>(
|
||||
Profile::FromBrowserContext(browser_context)));
|
||||
@ -77,7 +77,7 @@ index b6afdced9d0af..e189d08ecdd46 100644
|
||||
}
|
||||
|
||||
diff --git chrome/browser/permissions/permission_manager_factory.cc chrome/browser/permissions/permission_manager_factory.cc
|
||||
index c75f396997e17..b219e122ffb5c 100644
|
||||
index 1ad4009827a9d..ca054482954f9 100644
|
||||
--- chrome/browser/permissions/permission_manager_factory.cc
|
||||
+++ chrome/browser/permissions/permission_manager_factory.cc
|
||||
@@ -6,6 +6,7 @@
|
||||
@ -88,7 +88,7 @@ index c75f396997e17..b219e122ffb5c 100644
|
||||
#include "chrome/browser/background_fetch/background_fetch_permission_context.h"
|
||||
#include "chrome/browser/background_sync/periodic_background_sync_permission_context.h"
|
||||
#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
|
||||
@@ -62,9 +63,11 @@ permissions::PermissionManager::PermissionContextMap CreatePermissionContexts(
|
||||
@@ -64,9 +65,11 @@ permissions::PermissionManager::PermissionContextMap CreatePermissionContexts(
|
||||
std::make_unique<GeolocationPermissionContextDelegate>(profile);
|
||||
#endif // BUILDFLAG(IS_ANDROID)
|
||||
#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS)
|
||||
@ -143,10 +143,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 07720bc3faccb..546325f2b5558 100644
|
||||
index 613500ba8c3d3..36c9aa0d2ea71 100644
|
||||
--- chrome/browser/ui/views/permissions/permission_prompt_factory.cc
|
||||
+++ chrome/browser/ui/views/permissions/permission_prompt_factory.cc
|
||||
@@ -186,11 +186,28 @@ std::unique_ptr<permissions::PermissionPrompt> CreateQuietPrompt(
|
||||
@@ -202,11 +202,28 @@ std::unique_ptr<permissions::PermissionPrompt> CreateQuietPrompt(
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,7 @@ index 27af6ec08f593..156689eec644d 100644
|
||||
#include "chrome/common/chrome_paths.h"
|
||||
|
||||
namespace policy {
|
||||
@@ -47,11 +48,6 @@
|
||||
@@ -47,11 +48,6 @@ const char kEnrollmentOptionsFilePath[] = FILE_PATH_LITERAL(
|
||||
"/Library/Google/Chrome/CloudManagementEnrollmentOptions");
|
||||
const char kEnrollmentMandatoryOption[] = "Mandatory";
|
||||
|
||||
@ -306,7 +306,7 @@ index 1a2e78c3472ec..5d1bd95a15113 100644
|
||||
#include "components/policy/policy_constants.h"
|
||||
|
||||
namespace policy::path_parser {
|
||||
@@ -97,16 +98,12 @@
|
||||
@@ -97,16 +98,12 @@ base::FilePath::StringType ExpandPathVariables(
|
||||
void CheckUserDataDirPolicy(base::FilePath* user_data_dir) {
|
||||
// Since the configuration management infrastructure is not initialized when
|
||||
// this code runs, read the policy preference directly.
|
||||
@ -357,10 +357,10 @@ index 8dbf958c189dd..6eaccc6688eca 100644
|
||||
*dir = base::FilePath(policy::path_parser::ExpandPathVariables(value));
|
||||
return true;
|
||||
diff --git chrome/common/chrome_paths.cc chrome/common/chrome_paths.cc
|
||||
index 54aca1f19f909..f93197a133dc2 100644
|
||||
index c94a25e390864..b47996eaeb902 100644
|
||||
--- chrome/common/chrome_paths.cc
|
||||
+++ chrome/common/chrome_paths.cc
|
||||
@@ -544,7 +544,8 @@ bool PathProvider(int key, base::FilePath* result) {
|
||||
@@ -541,7 +541,8 @@ bool PathProvider(int key, base::FilePath* result) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@ -392,7 +392,7 @@ index 4cde94111918e..aaf8245abd9a6 100644
|
||||
// policy files that allow sys-admins
|
||||
// to set policies for chrome. This directory
|
||||
diff --git components/policy/tools/generate_policy_source.py components/policy/tools/generate_policy_source.py
|
||||
index e5efa52a8467f..37253ef517bfa 100755
|
||||
index aef54cfd633eb..a3760acb82ea5 100755
|
||||
--- components/policy/tools/generate_policy_source.py
|
||||
+++ components/policy/tools/generate_policy_source.py
|
||||
@@ -449,6 +449,7 @@ def _WritePolicyConstantHeader(all_policies, policy_atomic_groups,
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git chrome/browser/printing/print_backend_service_manager.cc chrome/browser/printing/print_backend_service_manager.cc
|
||||
index 84abad228292c..5b90c7921c2b5 100644
|
||||
index ea046f5f1dfe3..0a915b7e3a091 100644
|
||||
--- chrome/browser/printing/print_backend_service_manager.cc
|
||||
+++ chrome/browser/printing/print_backend_service_manager.cc
|
||||
@@ -73,7 +73,15 @@ PrintBackendServiceManager* g_print_backend_service_manager_singleton = nullptr;
|
||||
@@ -74,7 +74,15 @@ PrintBackendServiceManager* g_print_backend_service_manager_singleton = nullptr;
|
||||
// to support modal dialogs from OOP.
|
||||
uint32_t NativeViewToUint(gfx::NativeView view) {
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
|
@ -14,7 +14,7 @@ index 2e67f8c97fab8..a3367979977c9 100644
|
||||
}
|
||||
|
||||
diff --git chrome/browser/profiles/profile.cc chrome/browser/profiles/profile.cc
|
||||
index 2ec2a791c4943..8573cac4111d6 100644
|
||||
index a9762d47c397d..482c0e4c8550f 100644
|
||||
--- chrome/browser/profiles/profile.cc
|
||||
+++ chrome/browser/profiles/profile.cc
|
||||
@@ -91,6 +91,7 @@ base::LazyInstance<std::set<content::BrowserContext*>>::Leaky
|
||||
@ -52,10 +52,10 @@ index 2ec2a791c4943..8573cac4111d6 100644
|
||||
Profile::OTRProfileID Profile::OTRProfileID::CreateUniqueForDevTools() {
|
||||
return CreateUnique(kDevToolsOTRProfileIDPrefix);
|
||||
diff --git chrome/browser/profiles/profile.h chrome/browser/profiles/profile.h
|
||||
index 3d5b457eeca11..c7d37503a0fef 100644
|
||||
index b06035ad4748f..5d51cd1038a66 100644
|
||||
--- chrome/browser/profiles/profile.h
|
||||
+++ chrome/browser/profiles/profile.h
|
||||
@@ -94,6 +94,10 @@ class Profile : public content::BrowserContext {
|
||||
@@ -93,6 +93,10 @@ class Profile : public content::BrowserContext {
|
||||
// be applicable to run. Please see crbug.com/1098697#c3 for more details.
|
||||
static OTRProfileID CreateUnique(const std::string& profile_id_prefix);
|
||||
|
||||
@ -66,7 +66,7 @@ index 3d5b457eeca11..c7d37503a0fef 100644
|
||||
// Creates a unique OTR profile id to be used for DevTools browser contexts.
|
||||
static OTRProfileID CreateUniqueForDevTools();
|
||||
|
||||
@@ -511,6 +515,8 @@ class Profile : public content::BrowserContext {
|
||||
@@ -504,6 +508,8 @@ class Profile : public content::BrowserContext {
|
||||
return instant_service_;
|
||||
}
|
||||
|
||||
@ -75,7 +75,7 @@ index 3d5b457eeca11..c7d37503a0fef 100644
|
||||
protected:
|
||||
// Creates an OffTheRecordProfile which points to this Profile.
|
||||
static std::unique_ptr<Profile> CreateOffTheRecordProfile(
|
||||
@@ -522,7 +528,6 @@ class Profile : public content::BrowserContext {
|
||||
@@ -515,7 +521,6 @@ class Profile : public content::BrowserContext {
|
||||
static PrefStore* CreateExtensionPrefStore(Profile*,
|
||||
bool incognito_pref_store);
|
||||
|
||||
@ -84,10 +84,10 @@ index 3d5b457eeca11..c7d37503a0fef 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 98bfbc0f96140..de7919947e356 100644
|
||||
index 47ada6bf53225..a0c4d18b93278 100644
|
||||
--- chrome/browser/profiles/profile_impl.cc
|
||||
+++ chrome/browser/profiles/profile_impl.cc
|
||||
@@ -1043,7 +1043,9 @@ Profile* ProfileImpl::GetOffTheRecordProfile(const OTRProfileID& otr_profile_id,
|
||||
@@ -1040,7 +1040,9 @@ Profile* ProfileImpl::GetOffTheRecordProfile(const OTRProfileID& otr_profile_id,
|
||||
|
||||
otr_profiles_[otr_profile_id] = std::move(otr_profile);
|
||||
|
||||
@ -99,7 +99,7 @@ index 98bfbc0f96140..de7919947e356 100644
|
||||
return raw_otr_profile;
|
||||
}
|
||||
diff --git chrome/browser/profiles/profile_manager.cc chrome/browser/profiles/profile_manager.cc
|
||||
index 3db592470f262..75bfc32b6511b 100644
|
||||
index a8ae9d577d4fb..381d6ceeaccba 100644
|
||||
--- chrome/browser/profiles/profile_manager.cc
|
||||
+++ chrome/browser/profiles/profile_manager.cc
|
||||
@@ -437,7 +437,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir)
|
||||
|
@ -1,5 +1,5 @@
|
||||
diff --git chrome/browser/safe_browsing/BUILD.gn chrome/browser/safe_browsing/BUILD.gn
|
||||
index 3c300d1896019..5ee89b96ce05e 100644
|
||||
index 9bb9b155d3024..34f1bfcffd7d8 100644
|
||||
--- chrome/browser/safe_browsing/BUILD.gn
|
||||
+++ chrome/browser/safe_browsing/BUILD.gn
|
||||
@@ -32,6 +32,7 @@ static_library("safe_browsing") {
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git chrome/browser/ui/startup/startup_browser_creator.cc chrome/browser/ui/startup/startup_browser_creator.cc
|
||||
index a68953bd7f04a..9e25d6a3aede2 100644
|
||||
index f5fdf2a05a7e7..4622df9f7b0cb 100644
|
||||
--- chrome/browser/ui/startup/startup_browser_creator.cc
|
||||
+++ chrome/browser/ui/startup/startup_browser_creator.cc
|
||||
@@ -602,6 +602,13 @@ std::optional<ash::KioskAppId> GetAppId(const base::CommandLine& command_line,
|
||||
@@ -603,6 +603,13 @@ std::optional<ash::KioskAppId> GetAppId(const base::CommandLine& command_line,
|
||||
}
|
||||
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
|
||||
@ -16,7 +16,7 @@ index a68953bd7f04a..9e25d6a3aede2 100644
|
||||
} // namespace
|
||||
|
||||
StartupProfileMode StartupProfileModeFromReason(
|
||||
@@ -1470,6 +1477,12 @@ void StartupBrowserCreator::ProcessCommandLineWithProfile(
|
||||
@@ -1487,6 +1494,12 @@ void StartupBrowserCreator::ProcessCommandLineWithProfile(
|
||||
{profile, mode}, last_opened_profiles);
|
||||
}
|
||||
|
||||
@ -29,7 +29,7 @@ index a68953bd7f04a..9e25d6a3aede2 100644
|
||||
// static
|
||||
void StartupBrowserCreator::ProcessCommandLineAlreadyRunning(
|
||||
const base::CommandLine& command_line,
|
||||
@@ -1479,6 +1492,11 @@ void StartupBrowserCreator::ProcessCommandLineAlreadyRunning(
|
||||
@@ -1496,6 +1509,11 @@ void StartupBrowserCreator::ProcessCommandLineAlreadyRunning(
|
||||
return;
|
||||
}
|
||||
|
||||
@ -42,7 +42,7 @@ index a68953bd7f04a..9e25d6a3aede2 100644
|
||||
StartupProfileMode mode =
|
||||
StartupProfileModeFromReason(profile_path_info.reason);
|
||||
diff --git chrome/browser/ui/startup/startup_browser_creator.h chrome/browser/ui/startup/startup_browser_creator.h
|
||||
index 7ce113b2d3436..4d17c36beebd4 100644
|
||||
index fc41cf3c88d9b..e0e51cb9e2dec 100644
|
||||
--- chrome/browser/ui/startup/startup_browser_creator.h
|
||||
+++ chrome/browser/ui/startup/startup_browser_creator.h
|
||||
@@ -9,6 +9,7 @@
|
||||
|
@ -42,10 +42,10 @@ index 438276b719c2f..69635e429be78 100644
|
||||
const extensions::Extension* extension =
|
||||
registry->enabled_extensions().GetByID(extension_id);
|
||||
diff --git chrome/renderer/chrome_content_renderer_client.cc chrome/renderer/chrome_content_renderer_client.cc
|
||||
index bf59360fb366d..df9547d986cf1 100644
|
||||
index 620f0ebad27d3..f36f4a6c5d1ee 100644
|
||||
--- chrome/renderer/chrome_content_renderer_client.cc
|
||||
+++ chrome/renderer/chrome_content_renderer_client.cc
|
||||
@@ -1011,6 +1011,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
@@ -1007,6 +1007,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
|
||||
if ((status == chrome::mojom::PluginStatus::kUnauthorized ||
|
||||
status == chrome::mojom::PluginStatus::kBlocked) &&
|
||||
@ -53,7 +53,7 @@ index bf59360fb366d..df9547d986cf1 100644
|
||||
content_settings_agent_delegate->IsPluginTemporarilyAllowed(
|
||||
identifier)) {
|
||||
status = chrome::mojom::PluginStatus::kAllowed;
|
||||
@@ -1171,7 +1172,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
@@ -1167,7 +1168,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
render_frame->GetRemoteAssociatedInterfaces()->GetInterface(
|
||||
plugin_auth_host.BindNewEndpointAndPassReceiver());
|
||||
plugin_auth_host->BlockedUnauthorizedPlugin(group_name, identifier);
|
||||
@ -63,7 +63,7 @@ index bf59360fb366d..df9547d986cf1 100644
|
||||
break;
|
||||
}
|
||||
case chrome::mojom::PluginStatus::kBlocked: {
|
||||
@@ -1180,7 +1182,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
@@ -1176,7 +1178,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name));
|
||||
placeholder->AllowLoading();
|
||||
RenderThread::Get()->RecordAction(UserMetricsAction("Plugin_Blocked"));
|
||||
@ -73,7 +73,7 @@ index bf59360fb366d..df9547d986cf1 100644
|
||||
break;
|
||||
}
|
||||
case chrome::mojom::PluginStatus::kBlockedByPolicy: {
|
||||
@@ -1190,7 +1193,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
@@ -1186,7 +1189,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
group_name));
|
||||
RenderThread::Get()->RecordAction(
|
||||
UserMetricsAction("Plugin_BlockedByPolicy"));
|
||||
|
@ -1,5 +1,5 @@
|
||||
diff --git chrome/renderer/BUILD.gn chrome/renderer/BUILD.gn
|
||||
index fd99154d7744e..ef2ba8773d116 100644
|
||||
index b17c8a5f9f9c3..cfa44b65d066a 100644
|
||||
--- chrome/renderer/BUILD.gn
|
||||
+++ chrome/renderer/BUILD.gn
|
||||
@@ -5,6 +5,7 @@
|
||||
@ -10,7 +10,7 @@ index fd99154d7744e..ef2ba8773d116 100644
|
||||
import("//chrome/common/features.gni")
|
||||
import("//components/nacl/features.gni")
|
||||
import("//components/offline_pages/buildflags/features.gni")
|
||||
@@ -139,6 +140,7 @@ static_library("renderer") {
|
||||
@@ -136,6 +137,7 @@ static_library("renderer") {
|
||||
deps = [
|
||||
"//base/allocator:buildflags",
|
||||
"//build:chromeos_buildflags",
|
||||
@ -18,7 +18,7 @@ index fd99154d7744e..ef2ba8773d116 100644
|
||||
"//chrome:resources",
|
||||
"//chrome:strings",
|
||||
"//chrome/common",
|
||||
@@ -247,6 +249,10 @@ static_library("renderer") {
|
||||
@@ -246,6 +248,10 @@ static_library("renderer") {
|
||||
|
||||
configs += [ "//build/config/compiler:wexit_time_destructors" ]
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
diff --git chrome/renderer/printing/chrome_print_render_frame_helper_delegate.cc chrome/renderer/printing/chrome_print_render_frame_helper_delegate.cc
|
||||
index 64e7654b68578..3cd2486d3fc68 100644
|
||||
index 631a01a21a562..33e318e251aa2 100644
|
||||
--- chrome/renderer/printing/chrome_print_render_frame_helper_delegate.cc
|
||||
+++ chrome/renderer/printing/chrome_print_render_frame_helper_delegate.cc
|
||||
@@ -25,12 +25,31 @@
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git chrome/app/chrome_main_delegate.cc chrome/app/chrome_main_delegate.cc
|
||||
index 73b6ab0934b14..26f9334cdb668 100644
|
||||
index c09a805c4ed7b..de89b16690593 100644
|
||||
--- chrome/app/chrome_main_delegate.cc
|
||||
+++ chrome/app/chrome_main_delegate.cc
|
||||
@@ -41,6 +41,7 @@
|
||||
@@ -37,6 +37,7 @@
|
||||
#include "base/trace_event/trace_event_impl.h"
|
||||
#include "build/build_config.h"
|
||||
#include "build/chromeos_buildflags.h"
|
||||
@ -10,7 +10,7 @@ index 73b6ab0934b14..26f9334cdb668 100644
|
||||
#include "chrome/browser/buildflags.h"
|
||||
#include "chrome/browser/chrome_content_browser_client.h"
|
||||
#include "chrome/browser/chrome_resource_bundle_helper.h"
|
||||
@@ -613,6 +614,9 @@ struct MainFunction {
|
||||
@@ -608,6 +609,9 @@ struct MainFunction {
|
||||
|
||||
// Initializes the user data dir. Must be called before InitializeLocalState().
|
||||
void InitializeUserDataDir(base::CommandLine* command_line) {
|
||||
@ -20,7 +20,7 @@ index 73b6ab0934b14..26f9334cdb668 100644
|
||||
#if BUILDFLAG(IS_CHROMEOS_LACROS)
|
||||
// In debug builds of Lacros, we keep track of when the user data dir
|
||||
// is initialized, to ensure the cryptohome is not accessed before login
|
||||
@@ -853,6 +857,10 @@ ChromeMainDelegate::~ChromeMainDelegate() {
|
||||
@@ -854,6 +858,10 @@ ChromeMainDelegate::~ChromeMainDelegate() {
|
||||
ChromeMainDelegate::~ChromeMainDelegate() = default;
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
|
||||
@ -31,7 +31,7 @@ index 73b6ab0934b14..26f9334cdb668 100644
|
||||
std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
|
||||
InvokedIn invoked_in) {
|
||||
DUMP_WILL_BE_CHECK(base::ThreadPoolInstance::Get());
|
||||
@@ -878,7 +886,7 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
|
||||
@@ -879,7 +887,7 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
|
||||
// future session's metrics.
|
||||
DeferBrowserMetrics(user_data_dir);
|
||||
|
||||
@ -40,7 +40,7 @@ index 73b6ab0934b14..26f9334cdb668 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.
|
||||
@@ -1049,7 +1057,8 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
|
||||
@@ -1069,7 +1077,8 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
|
||||
|
||||
if (base::FeatureList::IsEnabled(
|
||||
features::kWriteBasicSystemProfileToPersistentHistogramsFile)) {
|
||||
@ -50,7 +50,7 @@ index 73b6ab0934b14..26f9334cdb668 100644
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
record =
|
||||
base::FeatureList::IsEnabled(chrome::android::kUmaBackgroundSessions);
|
||||
@@ -1520,6 +1529,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
|
||||
@@ -1505,6 +1514,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
|
||||
std::string process_type =
|
||||
command_line.GetSwitchValueASCII(switches::kProcessType);
|
||||
|
||||
@ -58,7 +58,7 @@ index 73b6ab0934b14..26f9334cdb668 100644
|
||||
crash_reporter::InitializeCrashKeys();
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS_LACROS)
|
||||
@@ -1538,6 +1548,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
|
||||
@@ -1523,6 +1533,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
|
||||
InitMacCrashReporter(command_line, process_type);
|
||||
SetUpInstallerPreferences(command_line);
|
||||
#endif
|
||||
@ -66,7 +66,7 @@ index 73b6ab0934b14..26f9334cdb668 100644
|
||||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
child_process_logging::Init();
|
||||
@@ -1750,6 +1761,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
|
||||
@@ -1733,6 +1744,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
|
||||
CHECK(!loaded_locale.empty()) << "Locale could not be found for " << locale;
|
||||
}
|
||||
|
||||
@ -74,7 +74,7 @@ index 73b6ab0934b14..26f9334cdb668 100644
|
||||
#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC)
|
||||
// Zygote needs to call InitCrashReporter() in RunZygote().
|
||||
if (process_type != switches::kZygoteProcess) {
|
||||
@@ -1785,6 +1797,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
|
||||
@@ -1768,6 +1780,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
|
||||
// After all the platform Breakpads have been initialized, store the command
|
||||
// line for crash reporting.
|
||||
crash_keys::SetCrashKeysFromCommandLine(command_line);
|
||||
@ -82,7 +82,7 @@ index 73b6ab0934b14..26f9334cdb668 100644
|
||||
|
||||
#if BUILDFLAG(ENABLE_PDF)
|
||||
MaybePatchGdiGetFontData();
|
||||
@@ -1910,6 +1923,7 @@ void ChromeMainDelegate::ZygoteForked() {
|
||||
@@ -1893,6 +1906,7 @@ void ChromeMainDelegate::ZygoteForked() {
|
||||
SetUpProfilingShutdownHandler();
|
||||
}
|
||||
|
||||
@ -90,7 +90,7 @@ index 73b6ab0934b14..26f9334cdb668 100644
|
||||
// Needs to be called after we have chrome::DIR_USER_DATA. BrowserMain sets
|
||||
// this up for the browser process in a different manner.
|
||||
const base::CommandLine* command_line =
|
||||
@@ -1922,6 +1936,7 @@ void ChromeMainDelegate::ZygoteForked() {
|
||||
@@ -1905,6 +1919,7 @@ void ChromeMainDelegate::ZygoteForked() {
|
||||
|
||||
// Reset the command line for the newly spawned process.
|
||||
crash_keys::SetCrashKeysFromCommandLine(*command_line);
|
||||
@ -98,15 +98,15 @@ index 73b6ab0934b14..26f9334cdb668 100644
|
||||
}
|
||||
|
||||
#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
|
||||
@@ -2021,6 +2036,7 @@ void ChromeMainDelegate::InitializeMemorySystem() {
|
||||
channel == version_info::Channel::DEV);
|
||||
const bool gwp_asan_boost_sampling = is_canary_dev || is_browser_process;
|
||||
@@ -2001,6 +2016,7 @@ void ChromeMainDelegate::InitializeMemorySystem() {
|
||||
const bool is_browser_process = process_type.empty();
|
||||
const bool gwp_asan_boost_sampling = is_browser_process || IsCanaryDev();
|
||||
|
||||
+ memory_system_ = std::make_unique<memory_system::MemorySystem>();
|
||||
memory_system::Initializer()
|
||||
.SetGwpAsanParameters(gwp_asan_boost_sampling, process_type)
|
||||
.SetProfilingClientParameters(channel,
|
||||
@@ -2030,5 +2046,5 @@ void ChromeMainDelegate::InitializeMemorySystem() {
|
||||
.SetProfilingClientParameters(chrome::GetChannel(),
|
||||
@@ -2010,5 +2026,5 @@ void ChromeMainDelegate::InitializeMemorySystem() {
|
||||
memory_system::DispatcherParameters::
|
||||
AllocationTraceRecorderInclusion::kDynamic,
|
||||
process_type)
|
||||
@ -136,7 +136,7 @@ index 3553377e96017..5207128b768f2 100644
|
||||
#if BUILDFLAG(IS_CHROMEOS_LACROS)
|
||||
std::unique_ptr<chromeos::LacrosService> lacros_service_;
|
||||
diff --git chrome/browser/chrome_browser_main.cc chrome/browser/chrome_browser_main.cc
|
||||
index 1d9bfb1c1d651..6a016c5d55b1e 100644
|
||||
index ed96ab7401650..625fd36e74d64 100644
|
||||
--- chrome/browser/chrome_browser_main.cc
|
||||
+++ chrome/browser/chrome_browser_main.cc
|
||||
@@ -52,6 +52,7 @@
|
||||
@ -224,7 +224,7 @@ index 1d9bfb1c1d651..6a016c5d55b1e 100644
|
||||
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
#if defined(ARCH_CPU_X86_64)
|
||||
@@ -1463,6 +1468,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
@@ -1459,6 +1464,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
browser_process_->PreMainMessageLoopRun();
|
||||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
@ -232,7 +232,7 @@ index 1d9bfb1c1d651..6a016c5d55b1e 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)) {
|
||||
@@ -1474,6 +1480,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
@@ -1470,6 +1476,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
return ChromeBrowserMainPartsWin::HandleIconsCommands(
|
||||
*base::CommandLine::ForCurrentProcess());
|
||||
}
|
||||
@ -240,7 +240,7 @@ index 1d9bfb1c1d651..6a016c5d55b1e 100644
|
||||
|
||||
ui::SelectFileDialog::SetFactory(
|
||||
std::make_unique<ChromeSelectFileDialogFactory>());
|
||||
@@ -1499,6 +1506,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
@@ -1495,6 +1502,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
}
|
||||
#endif // BUILDFLAG(CHROME_FOR_TESTING)
|
||||
|
||||
@ -248,7 +248,7 @@ index 1d9bfb1c1d651..6a016c5d55b1e 100644
|
||||
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
|
||||
switches::kMakeDefaultBrowser)) {
|
||||
bool is_managed = g_browser_process->local_state()->IsManagedPreference(
|
||||
@@ -1512,18 +1520,22 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
@@ -1508,18 +1516,22 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
? static_cast<int>(content::RESULT_CODE_NORMAL_EXIT)
|
||||
: static_cast<int>(chrome::RESULT_CODE_SHELL_INTEGRATION_FAILED);
|
||||
}
|
||||
@ -271,7 +271,7 @@ index 1d9bfb1c1d651..6a016c5d55b1e 100644
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID) && BUILDFLAG(ENABLE_DOWNGRADE_PROCESSING)
|
||||
// Begin relaunch processing immediately if User Data migration is required
|
||||
@@ -1562,7 +1574,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
@@ -1558,7 +1570,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
}
|
||||
#endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS)
|
||||
|
||||
@ -280,7 +280,7 @@ index 1d9bfb1c1d651..6a016c5d55b1e 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
|
||||
@@ -1571,7 +1583,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
@@ -1567,7 +1579,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
// obtained but before potentially creating the first run sentinel).
|
||||
if (ChromeBrowserMainPartsWin::CheckMachineLevelInstall())
|
||||
return chrome::RESULT_CODE_MACHINE_LEVEL_INSTALL_EXISTS;
|
||||
@ -289,7 +289,7 @@ index 1d9bfb1c1d651..6a016c5d55b1e 100644
|
||||
|
||||
// Desktop construction occurs here, (required before profile creation).
|
||||
PreProfileInit();
|
||||
@@ -1614,12 +1626,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
@@ -1610,12 +1622,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
browser_process_->local_state());
|
||||
}
|
||||
|
||||
@ -304,7 +304,7 @@ index 1d9bfb1c1d651..6a016c5d55b1e 100644
|
||||
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
page_info::SetPageInfoClient(new ChromePageInfoClient());
|
||||
@@ -1646,6 +1660,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
@@ -1642,6 +1656,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
// Call `PostProfileInit()`and set it up for profiles created later.
|
||||
profile_init_manager_ = std::make_unique<ProfileInitManager>(this, profile);
|
||||
|
||||
@ -312,7 +312,7 @@ index 1d9bfb1c1d651..6a016c5d55b1e 100644
|
||||
#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
// Execute first run specific code after the PrefService has been initialized
|
||||
// and preferences have been registered since some of the import code depends
|
||||
@@ -1685,6 +1700,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
@@ -1681,6 +1696,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
*base::CommandLine::ForCurrentProcess());
|
||||
}
|
||||
#endif // BUILDFLAG(IS_WIN)
|
||||
@ -320,7 +320,7 @@ index 1d9bfb1c1d651..6a016c5d55b1e 100644
|
||||
|
||||
// Configure modules that need access to resources.
|
||||
net::NetModule::SetResourceProvider(ChromeNetResourceProvider);
|
||||
@@ -1770,6 +1786,11 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
@@ -1766,6 +1782,11 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
g_browser_process->profile_manager()->GetLastOpenedProfiles();
|
||||
}
|
||||
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
@ -332,7 +332,7 @@ index 1d9bfb1c1d651..6a016c5d55b1e 100644
|
||||
// This step is costly.
|
||||
if (browser_creator_->Start(*base::CommandLine::ForCurrentProcess(),
|
||||
base::FilePath(), profile_info,
|
||||
@@ -1802,11 +1823,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
@@ -1798,11 +1819,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
|
||||
// Create the RunLoop for MainMessageLoopRun() to use and transfer
|
||||
// ownership of the browser's lifetime to the BrowserProcess.
|
||||
@ -348,10 +348,10 @@ index 1d9bfb1c1d651..6a016c5d55b1e 100644
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
|
||||
diff --git chrome/browser/chrome_browser_main_mac.mm chrome/browser/chrome_browser_main_mac.mm
|
||||
index 2f0fe9d22667c..f50fe7bf75df3 100644
|
||||
index 6568351d73ae9..f4a4bd3194c02 100644
|
||||
--- chrome/browser/chrome_browser_main_mac.mm
|
||||
+++ chrome/browser/chrome_browser_main_mac.mm
|
||||
@@ -16,6 +16,7 @@
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "base/path_service.h"
|
||||
#include "base/strings/sys_string_conversions.h"
|
||||
#include "build/branding_buildflags.h"
|
||||
@ -359,7 +359,7 @@ index 2f0fe9d22667c..f50fe7bf75df3 100644
|
||||
#import "chrome/browser/app_controller_mac.h"
|
||||
#include "chrome/browser/apps/app_shim/app_shim_listener.h"
|
||||
#include "chrome/browser/browser_process.h"
|
||||
@@ -105,6 +106,7 @@ void ChromeBrowserMainPartsMac::PreCreateMainMessageLoop() {
|
||||
@@ -107,6 +108,7 @@ void ChromeBrowserMainPartsMac::PreCreateMainMessageLoop() {
|
||||
}
|
||||
#endif // !BUILDFLAG(CHROME_FOR_TESTING)
|
||||
|
||||
@ -367,7 +367,7 @@ index 2f0fe9d22667c..f50fe7bf75df3 100644
|
||||
// Create the app delegate by requesting the shared AppController.
|
||||
CHECK_EQ(nil, NSApp.delegate);
|
||||
AppController* app_controller = AppController.sharedController;
|
||||
@@ -113,6 +115,7 @@ void ChromeBrowserMainPartsMac::PreCreateMainMessageLoop() {
|
||||
@@ -115,6 +117,7 @@ void ChromeBrowserMainPartsMac::PreCreateMainMessageLoop() {
|
||||
chrome::BuildMainMenu(NSApp, app_controller,
|
||||
l10n_util::GetStringUTF16(IDS_PRODUCT_NAME), false);
|
||||
[app_controller mainMenuCreated];
|
||||
@ -375,7 +375,7 @@ index 2f0fe9d22667c..f50fe7bf75df3 100644
|
||||
|
||||
ui::WarmScreenCapture();
|
||||
|
||||
@@ -152,5 +155,7 @@ void ChromeBrowserMainPartsMac::PostProfileInit(Profile* profile,
|
||||
@@ -155,5 +158,7 @@ void ChromeBrowserMainPartsMac::PostProfileInit(Profile* profile,
|
||||
}
|
||||
|
||||
void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() {
|
||||
@ -384,7 +384,7 @@ index 2f0fe9d22667c..f50fe7bf75df3 100644
|
||||
+#endif
|
||||
}
|
||||
diff --git chrome/browser/chrome_content_browser_client.cc chrome/browser/chrome_content_browser_client.cc
|
||||
index 66b50cf0fd99b..4b868cdf4c3ee 100644
|
||||
index b07f8f583dabb..94b2acd6ef46e 100644
|
||||
--- chrome/browser/chrome_content_browser_client.cc
|
||||
+++ chrome/browser/chrome_content_browser_client.cc
|
||||
@@ -47,6 +47,7 @@
|
||||
@ -395,7 +395,7 @@ index 66b50cf0fd99b..4b868cdf4c3ee 100644
|
||||
#include "chrome/browser/after_startup_task_utils.h"
|
||||
#include "chrome/browser/app_mode/app_mode_utils.h"
|
||||
#include "chrome/browser/bluetooth/chrome_bluetooth_delegate_impl_client.h"
|
||||
@@ -1423,6 +1424,8 @@ ChromeContentBrowserClient::GetPopupNavigationDelegateFactoryForTesting() {
|
||||
@@ -1462,6 +1463,8 @@ ChromeContentBrowserClient::GetPopupNavigationDelegateFactoryForTesting() {
|
||||
}
|
||||
|
||||
ChromeContentBrowserClient::ChromeContentBrowserClient() {
|
||||
@ -404,7 +404,7 @@ index 66b50cf0fd99b..4b868cdf4c3ee 100644
|
||||
#if BUILDFLAG(ENABLE_PLUGINS)
|
||||
extra_parts_.push_back(
|
||||
std::make_unique<ChromeContentBrowserClientPluginsPart>());
|
||||
@@ -1460,6 +1463,11 @@ ChromeContentBrowserClient::~ChromeContentBrowserClient() {
|
||||
@@ -1499,6 +1502,11 @@ ChromeContentBrowserClient::~ChromeContentBrowserClient() {
|
||||
}
|
||||
}
|
||||
|
||||
@ -416,8 +416,8 @@ index 66b50cf0fd99b..4b868cdf4c3ee 100644
|
||||
// static
|
||||
void ChromeContentBrowserClient::RegisterLocalStatePrefs(
|
||||
PrefRegistrySimple* registry) {
|
||||
@@ -3627,9 +3635,24 @@ bool UpdatePreferredColorScheme(WebPreferences* web_prefs,
|
||||
: blink::mojom::PreferredColorScheme::kLight;
|
||||
@@ -3697,9 +3705,24 @@ bool UpdatePreferredColorScheme(WebPreferences* web_prefs,
|
||||
web_prefs->preferred_color_scheme;
|
||||
}
|
||||
#else
|
||||
+ auto preferred_color_scheme = native_theme->GetPreferredColorScheme();
|
||||
@ -439,10 +439,10 @@ index 66b50cf0fd99b..4b868cdf4c3ee 100644
|
||||
web_prefs->preferred_color_scheme =
|
||||
- ToBlinkPreferredColorScheme(native_theme->GetPreferredColorScheme());
|
||||
+ ToBlinkPreferredColorScheme(preferred_color_scheme);
|
||||
#endif // BUILDFLAG(IS_ANDROID)
|
||||
|
||||
// Reauth WebUI doesn't support dark mode yet because it shares the dialog
|
||||
@@ -4375,9 +4398,11 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated(
|
||||
// Update based on the ColorProvider associated with `web_contents`. Depends
|
||||
// on the browser color mode settings.
|
||||
@@ -4454,9 +4477,11 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated(
|
||||
&search::HandleNewTabURLReverseRewrite);
|
||||
#endif // BUILDFLAG(IS_ANDROID)
|
||||
|
||||
@ -454,7 +454,7 @@ index 66b50cf0fd99b..4b868cdf4c3ee 100644
|
||||
}
|
||||
|
||||
base::FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() {
|
||||
@@ -6484,7 +6509,7 @@ void ChromeContentBrowserClient::OnNetworkServiceCreated(
|
||||
@@ -6565,7 +6590,7 @@ void ChromeContentBrowserClient::OnNetworkServiceCreated(
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -463,7 +463,7 @@ index 66b50cf0fd99b..4b868cdf4c3ee 100644
|
||||
content::BrowserContext* context,
|
||||
bool in_memory,
|
||||
const base::FilePath& relative_partition_path,
|
||||
@@ -6502,6 +6527,8 @@ void ChromeContentBrowserClient::ConfigureNetworkContextParams(
|
||||
@@ -6583,6 +6608,8 @@ void ChromeContentBrowserClient::ConfigureNetworkContextParams(
|
||||
network_context_params->user_agent = GetUserAgentBasedOnPolicy(context);
|
||||
network_context_params->accept_language = GetApplicationLocale();
|
||||
}
|
||||
@ -472,7 +472,7 @@ index 66b50cf0fd99b..4b868cdf4c3ee 100644
|
||||
}
|
||||
|
||||
std::vector<base::FilePath>
|
||||
@@ -7627,10 +7654,10 @@ void ChromeContentBrowserClient::OnKeepaliveRequestStarted(
|
||||
@@ -7698,10 +7725,10 @@ void ChromeContentBrowserClient::OnKeepaliveRequestStarted(
|
||||
const auto now = base::TimeTicks::Now();
|
||||
const auto timeout = GetKeepaliveTimerTimeout(context);
|
||||
keepalive_deadline_ = std::max(keepalive_deadline_, now + timeout);
|
||||
@ -485,7 +485,7 @@ index 66b50cf0fd99b..4b868cdf4c3ee 100644
|
||||
FROM_HERE, keepalive_deadline_ - now,
|
||||
base::BindOnce(
|
||||
&ChromeContentBrowserClient::OnKeepaliveTimerFired,
|
||||
@@ -7649,7 +7676,8 @@ void ChromeContentBrowserClient::OnKeepaliveRequestFinished() {
|
||||
@@ -7720,7 +7747,8 @@ void ChromeContentBrowserClient::OnKeepaliveRequestFinished() {
|
||||
--num_keepalive_requests_;
|
||||
if (num_keepalive_requests_ == 0) {
|
||||
DVLOG(1) << "Stopping the keepalive timer";
|
||||
@ -495,7 +495,7 @@ index 66b50cf0fd99b..4b868cdf4c3ee 100644
|
||||
// This deletes the keep alive handle attached to the timer function and
|
||||
// unblock the shutdown sequence.
|
||||
}
|
||||
@@ -7789,7 +7817,7 @@ void ChromeContentBrowserClient::OnKeepaliveTimerFired(
|
||||
@@ -7888,7 +7916,7 @@ void ChromeContentBrowserClient::OnKeepaliveTimerFired(
|
||||
const auto now = base::TimeTicks::Now();
|
||||
const auto then = keepalive_deadline_;
|
||||
if (now < then) {
|
||||
@ -505,10 +505,10 @@ index 66b50cf0fd99b..4b868cdf4c3ee 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 d8f6e1ea5f843..27172c75e4c3a 100644
|
||||
index e21d5dbffda0b..113df89dcd68a 100644
|
||||
--- chrome/browser/chrome_content_browser_client.h
|
||||
+++ chrome/browser/chrome_content_browser_client.h
|
||||
@@ -144,6 +144,8 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
|
||||
@@ -145,6 +145,8 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
|
||||
|
||||
~ChromeContentBrowserClient() override;
|
||||
|
||||
@ -517,7 +517,7 @@ index d8f6e1ea5f843..27172c75e4c3a 100644
|
||||
// TODO(https://crbug.com/787567): 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.
|
||||
@@ -681,7 +683,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
|
||||
@@ -682,7 +684,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
|
||||
override;
|
||||
void OnNetworkServiceCreated(
|
||||
network::mojom::NetworkService* network_service) override;
|
||||
@ -526,7 +526,7 @@ index d8f6e1ea5f843..27172c75e4c3a 100644
|
||||
content::BrowserContext* context,
|
||||
bool in_memory,
|
||||
const base::FilePath& relative_partition_path,
|
||||
@@ -1184,7 +1186,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
|
||||
@@ -1202,7 +1204,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
uint64_t num_keepalive_requests_ = 0;
|
||||
@ -536,7 +536,7 @@ index d8f6e1ea5f843..27172c75e4c3a 100644
|
||||
#endif
|
||||
|
||||
diff --git chrome/browser/prefs/browser_prefs.cc chrome/browser/prefs/browser_prefs.cc
|
||||
index 5eef5cdedda4c..d0c16b6d70585 100644
|
||||
index 14c785c5686a8..ed24f5f045006 100644
|
||||
--- chrome/browser/prefs/browser_prefs.cc
|
||||
+++ chrome/browser/prefs/browser_prefs.cc
|
||||
@@ -16,6 +16,7 @@
|
||||
@ -547,7 +547,7 @@ index 5eef5cdedda4c..d0c16b6d70585 100644
|
||||
#include "chrome/browser/about_flags.h"
|
||||
#include "chrome/browser/accessibility/accessibility_labels_service.h"
|
||||
#include "chrome/browser/accessibility/invert_bubble_prefs.h"
|
||||
@@ -195,6 +196,10 @@
|
||||
@@ -194,6 +195,10 @@
|
||||
#include "chrome/browser/background/background_mode_manager.h"
|
||||
#endif
|
||||
|
||||
@ -558,7 +558,7 @@ index 5eef5cdedda4c..d0c16b6d70585 100644
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
#include "chrome/browser/accessibility/animation_policy_prefs.h"
|
||||
#include "chrome/browser/apps/platform_apps/shortcut_manager.h"
|
||||
@@ -1679,7 +1684,8 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
|
||||
@@ -1743,7 +1748,8 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
|
||||
#endif // BUILDFLAG(GOOGLE_CHROME_BRANDING)
|
||||
#endif // BUILDFLAG(IS_WIN)
|
||||
|
||||
@ -568,7 +568,7 @@ index 5eef5cdedda4c..d0c16b6d70585 100644
|
||||
downgrade::RegisterPrefs(registry);
|
||||
#endif
|
||||
|
||||
@@ -1711,6 +1717,11 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
|
||||
@@ -1779,6 +1785,11 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
|
||||
|
||||
// This is intentionally last.
|
||||
RegisterLocalStatePrefsForMigration(registry);
|
||||
@ -580,7 +580,7 @@ index 5eef5cdedda4c..d0c16b6d70585 100644
|
||||
}
|
||||
|
||||
// Register prefs applicable to all profiles.
|
||||
@@ -2145,6 +2156,10 @@ void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
|
||||
@@ -2213,6 +2224,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 3bf48f1897c93..a9b219500beac 100644
|
||||
index 01d45469f3bae..d1bed9648e4a2 100644
|
||||
--- chrome/browser/ui/browser_command_controller.cc
|
||||
+++ chrome/browser/ui/browser_command_controller.cc
|
||||
@@ -400,6 +400,7 @@ bool BrowserCommandController::ExecuteCommandWithDisposition(
|
||||
@@ -401,6 +401,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 3bf48f1897c93..a9b219500beac 100644
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -416,6 +417,13 @@ bool BrowserCommandController::ExecuteCommandWithDisposition(
|
||||
@@ -417,6 +418,13 @@ bool BrowserCommandController::ExecuteCommandWithDisposition(
|
||||
DCHECK(command_updater_.IsCommandEnabled(id))
|
||||
<< "Invalid/disabled command " << id;
|
||||
|
||||
@ -24,7 +24,7 @@ index 3bf48f1897c93..a9b219500beac 100644
|
||||
// The order of commands in this switch statement must match the function
|
||||
// declaration order in browser.h!
|
||||
switch (id) {
|
||||
@@ -1169,11 +1177,13 @@ void BrowserCommandController::TabRestoreServiceLoaded(
|
||||
@@ -1179,11 +1187,13 @@ void BrowserCommandController::TabRestoreServiceLoaded(
|
||||
// BrowserCommandController, private:
|
||||
|
||||
bool BrowserCommandController::IsShowingMainUI() {
|
||||
@ -41,10 +41,10 @@ index 3bf48f1897c93..a9b219500beac 100644
|
||||
|
||||
bool BrowserCommandController::IsWebAppOrCustomTab() const {
|
||||
diff --git chrome/browser/ui/toolbar/app_menu_model.cc chrome/browser/ui/toolbar/app_menu_model.cc
|
||||
index 8cdbf6a389727..715078e9d0a2c 100644
|
||||
index fc51015c70183..52de604f96d9e 100644
|
||||
--- chrome/browser/ui/toolbar/app_menu_model.cc
|
||||
+++ chrome/browser/ui/toolbar/app_menu_model.cc
|
||||
@@ -709,6 +709,57 @@ SaveAndShareSubMenuModel::SaveAndShareSubMenuModel(
|
||||
@@ -728,6 +728,57 @@ SaveAndShareSubMenuModel::SaveAndShareSubMenuModel(
|
||||
}
|
||||
}
|
||||
|
||||
@ -102,7 +102,7 @@ index 8cdbf6a389727..715078e9d0a2c 100644
|
||||
} // namespace
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -1571,7 +1622,7 @@ bool AppMenuModel::IsCommandIdChecked(int command_id) const {
|
||||
@@ -1572,7 +1623,7 @@ bool AppMenuModel::IsCommandIdChecked(int command_id) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -111,7 +111,7 @@ index 8cdbf6a389727..715078e9d0a2c 100644
|
||||
GlobalError* error =
|
||||
GlobalErrorServiceFactory::GetForProfile(browser_->profile())
|
||||
->GetGlobalErrorByMenuItemCommandID(command_id);
|
||||
@@ -1586,6 +1637,30 @@ bool AppMenuModel::IsCommandIdEnabled(int command_id) const {
|
||||
@@ -1587,6 +1638,30 @@ bool AppMenuModel::IsCommandIdEnabled(int command_id) const {
|
||||
}
|
||||
}
|
||||
|
||||
@ -142,7 +142,7 @@ index 8cdbf6a389727..715078e9d0a2c 100644
|
||||
bool AppMenuModel::IsCommandIdAlerted(int command_id) const {
|
||||
if (command_id == IDC_VIEW_PASSWORDS ||
|
||||
command_id == IDC_SHOW_PASSWORD_MANAGER) {
|
||||
@@ -1753,11 +1828,15 @@ void AppMenuModel::Build() {
|
||||
@@ -1755,11 +1830,15 @@ void AppMenuModel::Build() {
|
||||
kDefaultIconSize));
|
||||
}
|
||||
|
||||
@ -163,7 +163,7 @@ index 8cdbf6a389727..715078e9d0a2c 100644
|
||||
|
||||
AddItemWithStringId(IDC_PRINT, IDS_PRINT);
|
||||
|
||||
@@ -1870,9 +1949,13 @@ void AppMenuModel::Build() {
|
||||
@@ -1852,9 +1931,13 @@ void AppMenuModel::Build() {
|
||||
kMoreToolsMenuItem);
|
||||
|
||||
if (!features::IsChromeRefresh2023()) {
|
||||
@ -180,7 +180,7 @@ index 8cdbf6a389727..715078e9d0a2c 100644
|
||||
}
|
||||
|
||||
if (!features::IsChromeRefresh2023()) {
|
||||
@@ -1961,6 +2044,11 @@ void AppMenuModel::Build() {
|
||||
@@ -1943,6 +2026,11 @@ void AppMenuModel::Build() {
|
||||
SetCommandIcon(this, IDC_EXIT, kExitMenuIcon);
|
||||
}
|
||||
|
||||
@ -193,7 +193,7 @@ index 8cdbf6a389727..715078e9d0a2c 100644
|
||||
}
|
||||
|
||||
diff --git chrome/browser/ui/toolbar/app_menu_model.h chrome/browser/ui/toolbar/app_menu_model.h
|
||||
index e9d46ee3b2250..0b1b19140c42e 100644
|
||||
index c477fba63fd1a..3b9eaad8e1906 100644
|
||||
--- chrome/browser/ui/toolbar/app_menu_model.h
|
||||
+++ chrome/browser/ui/toolbar/app_menu_model.h
|
||||
@@ -218,6 +218,7 @@ class AppMenuModel : public ui::SimpleMenuModel,
|
||||
@ -233,7 +233,7 @@ index 0ccfe39eb5696..c9424316b6d14 100644
|
||||
return gfx::Rect();
|
||||
}
|
||||
diff --git chrome/browser/ui/views/frame/browser_frame.cc chrome/browser/ui/views/frame/browser_frame.cc
|
||||
index cce1835d35be3..75f8aae063ada 100644
|
||||
index 8dd3620ba2720..ab3a92fd7ebe4 100644
|
||||
--- chrome/browser/ui/views/frame/browser_frame.cc
|
||||
+++ chrome/browser/ui/views/frame/browser_frame.cc
|
||||
@@ -114,15 +114,23 @@ ui::ColorProviderKey::SchemeVariant GetSchemeVariant(
|
||||
@ -411,10 +411,10 @@ index 2e973c9e279b0..8662f9cf14b17 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 f764d5edc704c..b7d5ee188736e 100644
|
||||
index 110812d2874d7..89b28bdb32d90 100644
|
||||
--- chrome/browser/ui/views/frame/browser_view.cc
|
||||
+++ chrome/browser/ui/views/frame/browser_view.cc
|
||||
@@ -351,11 +351,10 @@ using content::NativeWebKeyboardEvent;
|
||||
@@ -346,11 +346,10 @@ using content::NativeWebKeyboardEvent;
|
||||
using content::WebContents;
|
||||
using web_modal::WebContentsModalDialogHost;
|
||||
|
||||
@ -429,7 +429,7 @@ index f764d5edc704c..b7d5ee188736e 100644
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
// UMA histograms that record animation smoothness for tab loading animation.
|
||||
@@ -688,6 +687,14 @@ class BrowserViewLayoutDelegateImpl : public BrowserViewLayoutDelegate {
|
||||
@@ -683,6 +682,14 @@ class BrowserViewLayoutDelegateImpl : public BrowserViewLayoutDelegate {
|
||||
return browser_view_->frame()->GetTopInset() - browser_view_->y();
|
||||
}
|
||||
|
||||
@ -444,7 +444,7 @@ index f764d5edc704c..b7d5ee188736e 100644
|
||||
bool IsToolbarVisible() const override {
|
||||
return browser_view_->IsToolbarVisible();
|
||||
}
|
||||
@@ -839,11 +846,21 @@ class BrowserView::AccessibilityModeObserver : public ui::AXModeObserver {
|
||||
@@ -834,11 +841,21 @@ class BrowserView::AccessibilityModeObserver : public ui::AXModeObserver {
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// BrowserView, public:
|
||||
|
||||
@ -467,7 +467,7 @@ index f764d5edc704c..b7d5ee188736e 100644
|
||||
// Store the actions so that the access is available for other classes.
|
||||
if (features::IsSidePanelPinningEnabled()) {
|
||||
browser_->SetUserData(BrowserActions::UserDataKey(),
|
||||
@@ -944,8 +961,15 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
|
||||
@@ -939,8 +956,15 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
|
||||
contents_container->SetLayoutManager(std::make_unique<ContentsLayoutManager>(
|
||||
devtools_web_view_, contents_web_view_, watermark_view_));
|
||||
|
||||
@ -485,7 +485,7 @@ index f764d5edc704c..b7d5ee188736e 100644
|
||||
|
||||
contents_separator_ =
|
||||
top_container_->AddChildView(std::make_unique<ContentsSeparator>());
|
||||
@@ -1022,7 +1046,9 @@ BrowserView::~BrowserView() {
|
||||
@@ -1017,7 +1041,9 @@ BrowserView::~BrowserView() {
|
||||
|
||||
// All the tabs should have been destroyed already. If we were closed by the
|
||||
// OS with some tabs than the NativeBrowserFrame should have destroyed them.
|
||||
@ -495,7 +495,7 @@ index f764d5edc704c..b7d5ee188736e 100644
|
||||
|
||||
// Stop the animation timer explicitly here to avoid running it in a nested
|
||||
// message loop, which may run by Browser destructor.
|
||||
@@ -1036,12 +1062,14 @@ BrowserView::~BrowserView() {
|
||||
@@ -1031,12 +1057,14 @@ BrowserView::~BrowserView() {
|
||||
// child views and it is an observer for avatar toolbar button if any.
|
||||
autofill_bubble_handler_.reset();
|
||||
|
||||
@ -510,7 +510,7 @@ index f764d5edc704c..b7d5ee188736e 100644
|
||||
|
||||
// The TabStrip attaches a listener to the model. Make sure we shut down the
|
||||
// TabStrip first so that it can cleanly remove the listener.
|
||||
@@ -1065,7 +1093,9 @@ BrowserView::~BrowserView() {
|
||||
@@ -1060,7 +1088,9 @@ BrowserView::~BrowserView() {
|
||||
|
||||
// `SidePanelUI::RemoveSidePanelUIForBrowser()` deletes the
|
||||
// SidePanelCoordinator.
|
||||
@ -520,7 +520,7 @@ index f764d5edc704c..b7d5ee188736e 100644
|
||||
}
|
||||
|
||||
// static
|
||||
@@ -2039,9 +2069,14 @@ void BrowserView::OnExclusiveAccessUserInput() {
|
||||
@@ -2032,9 +2062,14 @@ void BrowserView::OnExclusiveAccessUserInput() {
|
||||
|
||||
bool BrowserView::ShouldHideUIForFullscreen() const {
|
||||
// Immersive mode needs UI for the slide-down top panel.
|
||||
@ -536,7 +536,7 @@ index f764d5edc704c..b7d5ee188736e 100644
|
||||
return frame_->GetFrameView()->ShouldHideTopUIForFullscreen();
|
||||
}
|
||||
|
||||
@@ -3172,7 +3207,8 @@ DownloadShelf* BrowserView::GetDownloadShelf() {
|
||||
@@ -3170,7 +3205,8 @@ DownloadShelf* BrowserView::GetDownloadShelf() {
|
||||
}
|
||||
|
||||
DownloadBubbleUIController* BrowserView::GetDownloadBubbleUIController() {
|
||||
@ -546,7 +546,7 @@ index f764d5edc704c..b7d5ee188736e 100644
|
||||
if (auto* download_button = toolbar_button_provider_->GetDownloadButton())
|
||||
return download_button->bubble_controller();
|
||||
return nullptr;
|
||||
@@ -3727,7 +3763,8 @@ void BrowserView::ReparentTopContainerForEndOfImmersive() {
|
||||
@@ -3725,7 +3761,8 @@ void BrowserView::ReparentTopContainerForEndOfImmersive() {
|
||||
if (top_container()->parent() == this)
|
||||
return;
|
||||
|
||||
@ -556,7 +556,7 @@ index f764d5edc704c..b7d5ee188736e 100644
|
||||
top_container()->DestroyLayer();
|
||||
AddChildViewAt(top_container(), 0);
|
||||
EnsureFocusOrder();
|
||||
@@ -4209,11 +4246,38 @@ void BrowserView::GetAccessiblePanes(std::vector<views::View*>* panes) {
|
||||
@@ -4207,11 +4244,38 @@ void BrowserView::GetAccessiblePanes(std::vector<views::View*>* panes) {
|
||||
bool BrowserView::ShouldDescendIntoChildForEventHandling(
|
||||
gfx::NativeView child,
|
||||
const gfx::Point& location) {
|
||||
@ -597,7 +597,7 @@ index f764d5edc704c..b7d5ee188736e 100644
|
||||
// Draggable regions are defined relative to the web contents.
|
||||
gfx::Point point_in_contents_web_view_coords(location);
|
||||
views::View::ConvertPointToTarget(GetWidget()->GetRootView(),
|
||||
@@ -4222,7 +4286,7 @@ bool BrowserView::ShouldDescendIntoChildForEventHandling(
|
||||
@@ -4220,7 +4284,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.
|
||||
@ -606,7 +606,7 @@ index f764d5edc704c..b7d5ee188736e 100644
|
||||
point_in_contents_web_view_coords.x(),
|
||||
point_in_contents_web_view_coords.y()) ||
|
||||
WidgetOwnedByAnchorContainsPoint(point_in_contents_web_view_coords);
|
||||
@@ -4333,8 +4397,10 @@ void BrowserView::Layout(PassKey) {
|
||||
@@ -4331,8 +4395,10 @@ void BrowserView::Layout(PassKey) {
|
||||
|
||||
// TODO(jamescook): Why was this in the middle of layout code?
|
||||
toolbar_->location_bar()->omnibox_view()->SetFocusBehavior(
|
||||
@ -619,7 +619,7 @@ index f764d5edc704c..b7d5ee188736e 100644
|
||||
|
||||
// Some of the situations when the BrowserView is laid out are:
|
||||
// - Enter/exit immersive fullscreen mode.
|
||||
@@ -4400,6 +4466,11 @@ void BrowserView::AddedToWidget() {
|
||||
@@ -4398,6 +4464,11 @@ void BrowserView::AddedToWidget() {
|
||||
SetThemeProfileForWindow(GetNativeWindow(), browser_->profile());
|
||||
#endif
|
||||
|
||||
@ -631,7 +631,7 @@ index f764d5edc704c..b7d5ee188736e 100644
|
||||
toolbar_->Init();
|
||||
|
||||
// TODO(pbos): Investigate whether the side panels should be creatable when
|
||||
@@ -4448,13 +4519,9 @@ void BrowserView::AddedToWidget() {
|
||||
@@ -4445,13 +4516,9 @@ void BrowserView::AddedToWidget() {
|
||||
|
||||
EnsureFocusOrder();
|
||||
|
||||
@ -647,7 +647,7 @@ index f764d5edc704c..b7d5ee188736e 100644
|
||||
using_native_frame_ = frame_->ShouldUseNativeFrame();
|
||||
|
||||
MaybeInitializeWebUITabStrip();
|
||||
@@ -4885,7 +4952,8 @@ void BrowserView::ProcessFullscreen(bool fullscreen,
|
||||
@@ -4882,7 +4949,8 @@ void BrowserView::ProcessFullscreen(bool fullscreen,
|
||||
// Undo our anti-jankiness hacks and force a re-layout.
|
||||
in_process_fullscreen_ = false;
|
||||
ToolbarSizeChanged(false);
|
||||
@ -657,7 +657,7 @@ index f764d5edc704c..b7d5ee188736e 100644
|
||||
}
|
||||
|
||||
bool BrowserView::ShouldUseImmersiveFullscreenForUrl(const GURL& url) const {
|
||||
@@ -5307,6 +5375,8 @@ Profile* BrowserView::GetProfile() {
|
||||
@@ -5304,6 +5372,8 @@ Profile* BrowserView::GetProfile() {
|
||||
}
|
||||
|
||||
void BrowserView::UpdateUIForTabFullscreen() {
|
||||
@ -666,7 +666,7 @@ index f764d5edc704c..b7d5ee188736e 100644
|
||||
frame()->GetFrameView()->UpdateFullscreenTopUI();
|
||||
}
|
||||
|
||||
@@ -5329,6 +5399,8 @@ void BrowserView::HideDownloadShelf() {
|
||||
@@ -5326,6 +5396,8 @@ void BrowserView::HideDownloadShelf() {
|
||||
}
|
||||
|
||||
bool BrowserView::CanUserExitFullscreen() const {
|
||||
@ -676,10 +676,10 @@ index f764d5edc704c..b7d5ee188736e 100644
|
||||
}
|
||||
|
||||
diff --git chrome/browser/ui/views/frame/browser_view.h chrome/browser/ui/views/frame/browser_view.h
|
||||
index 836b5aa549183..a336aca64101d 100644
|
||||
index 46cdfe23b1234..14cbb302de0a2 100644
|
||||
--- chrome/browser/ui/views/frame/browser_view.h
|
||||
+++ chrome/browser/ui/views/frame/browser_view.h
|
||||
@@ -137,11 +137,16 @@ class BrowserView : public BrowserWindow,
|
||||
@@ -138,11 +138,16 @@ class BrowserView : public BrowserWindow,
|
||||
METADATA_HEADER(BrowserView, views::ClientView)
|
||||
|
||||
public:
|
||||
@ -696,7 +696,7 @@ index 836b5aa549183..a336aca64101d 100644
|
||||
void set_frame(BrowserFrame* frame) {
|
||||
frame_ = frame;
|
||||
paint_as_active_subscription_ =
|
||||
@@ -863,6 +868,9 @@ class BrowserView : public BrowserWindow,
|
||||
@@ -873,6 +878,9 @@ class BrowserView : public BrowserWindow,
|
||||
const gfx::Rect& contents_webview_bounds,
|
||||
const gfx::Rect& local_webview_container_bounds);
|
||||
|
||||
@ -707,7 +707,7 @@ index 836b5aa549183..a336aca64101d 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 0991a57cccfe8..3ed3d43497460 100644
|
||||
index 07bc84fe5ed23..9d05d8918fa3d 100644
|
||||
--- chrome/browser/ui/views/frame/browser_view_layout.cc
|
||||
+++ chrome/browser/ui/views/frame/browser_view_layout.cc
|
||||
@@ -48,6 +48,10 @@
|
||||
@ -825,7 +825,7 @@ index 71445bfab1824..c77750ea2a820 100644
|
||||
|
||||
ContentsWebView::~ContentsWebView() {
|
||||
diff --git chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc
|
||||
index ee9e4cf7d4d92..e6c53660a4407 100644
|
||||
index b1662191f0967..245895ab7bd37 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
|
||||
@@ -610,6 +610,11 @@ PictureInPictureBrowserFrameView::PictureInPictureBrowserFrameView(
|
||||
@ -926,10 +926,10 @@ index b862ceac7225d..9575440a77d67 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 55d99c5f53e92..172ac465b6f21 100644
|
||||
index db003cd7f8329..9ba9064ef0563 100644
|
||||
--- chrome/browser/ui/views/page_action/page_action_icon_controller.cc
|
||||
+++ chrome/browser/ui/views/page_action/page_action_icon_controller.cc
|
||||
@@ -97,6 +97,12 @@ void PageActionIconController::Init(const PageActionIconParams& params,
|
||||
@@ -95,6 +95,12 @@ void PageActionIconController::Init(const PageActionIconParams& params,
|
||||
};
|
||||
|
||||
for (PageActionIconType type : params.types_enabled) {
|
||||
@ -943,7 +943,7 @@ index 55d99c5f53e92..172ac465b6f21 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 a8fc1df0e8fae..cc496ba91716e 100644
|
||||
index 880d83324cfa6..a6a80cd0b3def 100644
|
||||
--- chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
|
||||
+++ chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
|
||||
@@ -554,29 +554,41 @@ gfx::Range BrowserTabStripController::ListTabsInGroup(
|
||||
@ -989,7 +989,7 @@ index a8fc1df0e8fae..cc496ba91716e 100644
|
||||
}
|
||||
|
||||
diff --git chrome/browser/ui/views/toolbar/toolbar_view.cc chrome/browser/ui/views/toolbar/toolbar_view.cc
|
||||
index d65dc839c20e7..cf4caa7301108 100644
|
||||
index e97342ef97514..e373f6374fa4c 100644
|
||||
--- chrome/browser/ui/views/toolbar/toolbar_view.cc
|
||||
+++ chrome/browser/ui/views/toolbar/toolbar_view.cc
|
||||
@@ -191,7 +191,7 @@ class TabstripLikeBackground : public views::Background {
|
||||
@ -1083,7 +1083,7 @@ index d65dc839c20e7..cf4caa7301108 100644
|
||||
if (companion::IsCompanionFeatureEnabled()) {
|
||||
side_panel_container_ = container_view_->AddChildView(
|
||||
std::make_unique<SidePanelToolbarContainer>(browser_view_));
|
||||
@@ -811,7 +828,7 @@ void ToolbarView::Layout(PassKey) {
|
||||
@@ -818,7 +835,7 @@ void ToolbarView::Layout(PassKey) {
|
||||
if (display_mode_ == DisplayMode::NORMAL) {
|
||||
LayoutCommon();
|
||||
|
||||
@ -1093,7 +1093,7 @@ index d65dc839c20e7..cf4caa7301108 100644
|
||||
}
|
||||
}
|
||||
diff --git chrome/browser/ui/views/toolbar/toolbar_view.h chrome/browser/ui/views/toolbar/toolbar_view.h
|
||||
index 325b73a399d3f..9242aed24ef35 100644
|
||||
index 1163e52e738ce..e70ebde66fb25 100644
|
||||
--- chrome/browser/ui/views/toolbar/toolbar_view.h
|
||||
+++ chrome/browser/ui/views/toolbar/toolbar_view.h
|
||||
@@ -93,7 +93,8 @@ class ToolbarView : public views::AccessiblePaneView,
|
||||
@ -1106,68 +1106,3 @@ index 325b73a399d3f..9242aed24ef35 100644
|
||||
ToolbarView(const ToolbarView&) = delete;
|
||||
ToolbarView& operator=(const ToolbarView&) = delete;
|
||||
~ToolbarView() override;
|
||||
diff --git chrome/browser/ui/web_applications/draggable_region_host_impl.cc chrome/browser/ui/web_applications/draggable_region_host_impl.cc
|
||||
index 8980b03f2c945..831f6dd681cb9 100644
|
||||
--- chrome/browser/ui/web_applications/draggable_region_host_impl.cc
|
||||
+++ chrome/browser/ui/web_applications/draggable_region_host_impl.cc
|
||||
@@ -11,6 +11,28 @@
|
||||
#include "chrome/common/chrome_features.h"
|
||||
#include "mojo/public/cpp/bindings/self_owned_receiver.h"
|
||||
|
||||
+namespace {
|
||||
+
|
||||
+bool IsSupported(Browser* browser) {
|
||||
+ // May be nullptr when running with Alloy style.
|
||||
+ if (!browser)
|
||||
+ return false;
|
||||
+
|
||||
+ if (web_app::AppBrowserController::IsWebApp(browser))
|
||||
+ return true;
|
||||
+
|
||||
+#if BUILDFLAG(ENABLE_CEF)
|
||||
+ if (browser->cef_delegate() &&
|
||||
+ browser->cef_delegate()->SupportsDraggableRegion()) {
|
||||
+ return true;
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
+} // namespace
|
||||
+
|
||||
DraggableRegionsHostImpl::DraggableRegionsHostImpl(
|
||||
content::RenderFrameHost& render_frame_host,
|
||||
mojo::PendingReceiver<chrome::mojom::DraggableRegions> receiver)
|
||||
@@ -28,7 +50,7 @@ void DraggableRegionsHostImpl::CreateIfAllowed(
|
||||
auto* browser = chrome::FindBrowserWithTab(web_contents);
|
||||
|
||||
// We only want to bind the receiver for PWAs.
|
||||
- if (!web_app::AppBrowserController::IsWebApp(browser))
|
||||
+ if (!IsSupported(browser))
|
||||
return;
|
||||
|
||||
// The object is bound to the lifetime of |render_frame_host| and the mojo
|
||||
@@ -43,7 +65,7 @@ void DraggableRegionsHostImpl::UpdateDraggableRegions(
|
||||
auto* browser = chrome::FindBrowserWithTab(web_contents);
|
||||
// When a WebApp browser's WebContents is reparented to a tabbed browser, a
|
||||
// draggable regions update may race with the reparenting logic.
|
||||
- if (!web_app::AppBrowserController::IsWebApp(browser))
|
||||
+ if (!IsSupported(browser))
|
||||
return;
|
||||
|
||||
SkRegion sk_region;
|
||||
@@ -56,5 +78,12 @@ void DraggableRegionsHostImpl::UpdateDraggableRegions(
|
||||
}
|
||||
|
||||
auto* app_browser_controller = browser->app_controller();
|
||||
- app_browser_controller->UpdateDraggableRegion(sk_region);
|
||||
+ if (app_browser_controller) {
|
||||
+ app_browser_controller->UpdateDraggableRegion(sk_region);
|
||||
+ }
|
||||
+#if BUILDFLAG(ENABLE_CEF)
|
||||
+ else {
|
||||
+ browser->cef_delegate()->UpdateDraggableRegion(sk_region);
|
||||
+ }
|
||||
+#endif
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git chrome/browser/ui/views/sad_tab_view.cc chrome/browser/ui/views/sad_tab_view.cc
|
||||
index 5a3aa5c05907e..3630c7496fb70 100644
|
||||
index 0418f446e46ce..541b8389e7c88 100644
|
||||
--- chrome/browser/ui/views/sad_tab_view.cc
|
||||
+++ chrome/browser/ui/views/sad_tab_view.cc
|
||||
@@ -680,6 +680,11 @@ void SadTabView::OnBoundsChanged(const gfx::Rect& previous_bounds) {
|
||||
@@ -684,6 +684,11 @@ void SadTabView::OnBoundsChanged(const gfx::Rect& previous_bounds) {
|
||||
title_->SizeToFit(max_width);
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
diff --git chrome/utility/chrome_content_utility_client.cc chrome/utility/chrome_content_utility_client.cc
|
||||
index e070f862c3492..fdf448397fb3e 100644
|
||||
index c15d1fa6d6e25..b89a663d2664f 100644
|
||||
--- chrome/utility/chrome_content_utility_client.cc
|
||||
+++ chrome/utility/chrome_content_utility_client.cc
|
||||
@@ -13,6 +13,7 @@
|
||||
@ -10,7 +10,7 @@ index e070f862c3492..fdf448397fb3e 100644
|
||||
#include "chrome/common/chrome_paths.h"
|
||||
#include "chrome/common/profiler/thread_profiler.h"
|
||||
#include "chrome/common/profiler/thread_profiler_configuration.h"
|
||||
@@ -61,7 +62,8 @@ void ChromeContentUtilityClient::UtilityThreadStarted() {
|
||||
@@ -54,7 +55,8 @@ void ChromeContentUtilityClient::UtilityThreadStarted() {
|
||||
command_line->GetSwitchValueASCII(switches::kProcessType);
|
||||
// An in-process utility thread may run in other processes, only set up
|
||||
// collector in a utility process.
|
||||
|
@ -1,42 +0,0 @@
|
||||
diff --git chrome/browser/enterprise/watermark/watermark_view.cc chrome/browser/enterprise/watermark/watermark_view.cc
|
||||
index f48b59cd4fe50..3ed5a896a142c 100644
|
||||
--- chrome/browser/enterprise/watermark/watermark_view.cc
|
||||
+++ chrome/browser/enterprise/watermark/watermark_view.cc
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <algorithm>
|
||||
#include <string>
|
||||
|
||||
+#include "base/no_destructor.h"
|
||||
#include "cc/paint/paint_canvas.h"
|
||||
#include "ui/base/metadata/metadata_impl_macros.h"
|
||||
#include "ui/compositor/layer.h"
|
||||
@@ -27,8 +28,8 @@ constexpr double kRotationAngle = 45;
|
||||
constexpr SkColor kFillColor = SkColorSetARGB(0x12, 0x00, 0x00, 0x00);
|
||||
constexpr SkColor kOutlineColor = SkColorSetARGB(0x27, 0xff, 0xff, 0xff);
|
||||
|
||||
-const gfx::Font& WatermarkFont() {
|
||||
- static gfx::Font font(
|
||||
+gfx::Font WatermarkFont() {
|
||||
+ return gfx::Font(
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
"Segoe UI",
|
||||
#elif BUILDFLAG(IS_MAC)
|
||||
@@ -41,7 +42,6 @@ const gfx::Font& WatermarkFont() {
|
||||
"sans-serif",
|
||||
#endif
|
||||
kTextSize);
|
||||
- return font;
|
||||
}
|
||||
|
||||
gfx::Font::Weight WatermarkFontWeight() {
|
||||
@@ -53,8 +53,8 @@ gfx::Font::Weight WatermarkFontWeight() {
|
||||
}
|
||||
|
||||
const gfx::FontList& WatermarkFontList() {
|
||||
- static gfx::FontList font_list(WatermarkFont());
|
||||
- return font_list;
|
||||
+ static base::NoDestructor<gfx::FontList> font_list(WatermarkFont());
|
||||
+ return *font_list;
|
||||
}
|
||||
|
||||
std::unique_ptr<gfx::RenderText> CreateRenderText(const gfx::Rect& display_rect,
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user