Experimental support for extensions on Android: patch for 145.0.7632.46

This commit is contained in:
Carmelo Messina
2026-02-09 14:17:37 +01:00
parent 08596afae6
commit c8a1047c2a
@@ -121,6 +121,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
chrome/version.gni | 4 +-
.../core/browser/host_content_settings_map.cc | 6 ++
.../embedder_support/view/ContentView.java | 2 +-
.../embedder_support/user_agent_utils.cc | 14 ++--
.../browser/android/media_router_android.cc | 2 +-
.../browser/android/media_router_android.h | 2 +-
.../media_router/browser/media_router.h | 4 +-
@@ -178,7 +179,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
ui/webui/resources/cr_elements/BUILD.gn | 2 +-
.../cr_elements/cr_toolbar/cr_toolbar.css | 6 ++
ui/webui/resources/css/BUILD.gn | 2 +-
166 files changed, 577 insertions(+), 297 deletions(-)
167 files changed, 584 insertions(+), 304 deletions(-)
create mode 100644 chrome/browser/ui/android/strings/cromite_android_chrome_strings_grd/Enable-extensions-Android.grdp
create mode 100644 chrome/browser/ui/android/strings/cromite_android_chrome_strings_grd/Extensions-Android.grdp
create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Extensions-Android.inc
@@ -2560,6 +2561,72 @@ diff --git a/components/embedder_support/android/java/src/org/chromium/component
if (MotionEventUtils.isTrackpadEvent(event)
&& event.getClassification() == MotionEvent.CLASSIFICATION_TWO_FINGER_SWIPE
&& forwarder != null) {
diff --git a/components/embedder_support/user_agent_utils.cc b/components/embedder_support/user_agent_utils.cc
--- a/components/embedder_support/user_agent_utils.cc
+++ b/components/embedder_support/user_agent_utils.cc
@@ -321,7 +321,7 @@ std::string GetUnifiedPlatform() {
#if BUILDFLAG(IS_ANDROID)
// The Android XR device by default also has the unified platform of desktop
// form factor.
- if (base::android::device_info::is_desktop() ||
+ if (base::android::device_info::is_desktop_false() ||
base::android::device_info::is_xr()) {
return kUnifiedPlatformLinuxX64;
}
@@ -580,7 +580,7 @@ bool GetMobileBitForUAMetadata() {
// Android and not a desktop form factor, AND the kUseMobileUserAgent switch
// is present.
#if BUILDFLAG(IS_ANDROID)
- if (base::android::device_info::is_desktop() ||
+ if (base::android::device_info::is_desktop_false() ||
base::android::device_info::is_xr()) {
return false;
}
@@ -603,7 +603,7 @@ std::string GetPlatformVersion() {
#endif
#if BUILDFLAG(IS_ANDROID)
- if (base::android::device_info::is_desktop() ||
+ if (base::android::device_info::is_desktop_false() ||
base::android::device_info::is_xr()) {
return std::string();
}
@@ -623,7 +623,7 @@ std::string GetPlatformVersion() {
std::string GetPlatformForUAMetadata() {
#if BUILDFLAG(IS_ANDROID)
- if (base::android::device_info::is_desktop() ||
+ if (base::android::device_info::is_desktop_false() ||
base::android::device_info::is_xr()) {
return "Linux";
}
@@ -743,7 +743,7 @@ std::string GetCpuArchitecture() {
// TODO(crbug.com/433345971) The user agent string should contain the actual
// cpu type information obtained from the Android device. Same for the cpu bit
// count in #GetCpuBitness below.
- if (base::android::device_info::is_desktop() ||
+ if (base::android::device_info::is_desktop_false() ||
base::android::device_info::is_xr()) {
return "x86";
}
@@ -783,7 +783,7 @@ std::string GetCpuBitness() {
#elif BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FUCHSIA)
return "64";
#elif BUILDFLAG(IS_ANDROID)
- if (base::android::device_info::is_desktop() ||
+ if (base::android::device_info::is_desktop_false() ||
base::android::device_info::is_xr()) {
return "64";
}
@@ -857,7 +857,7 @@ std::string BuildModelInfo() {
if ((true)) return std::string();
#if BUILDFLAG(IS_ANDROID)
// Model information is not exposed on Android desktop.
- if (base::android::device_info::is_desktop()) {
+ if (base::android::device_info::is_desktop_false()) {
return std::string();
}
diff --git a/components/media_router/browser/android/media_router_android.cc b/components/media_router/browser/android/media_router_android.cc
--- a/components/media_router/browser/android/media_router_android.cc
+++ b/components/media_router/browser/android/media_router_android.cc