81 lines
4.1 KiB
Diff
81 lines
4.1 KiB
Diff
From: uazo <uazo@users.noreply.github.com>
|
|
Date: Mon, 18 May 2026 14:39:41 +0000
|
|
Subject: Enable Android DevTools Frontend
|
|
|
|
Enable the Android DevTools frontend and remove Android-specific UI
|
|
restrictions that prevented access to developer features on phones.
|
|
|
|
License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
|
|
---
|
|
.../contextmenu/ChromeContextMenuPopulator.java | 5 ++---
|
|
.../tabbed_mode/TabbedAppMenuPropertiesDelegate.java | 10 +---------
|
|
.../Enable-Android-DevTools-Frontend.inc | 3 +++
|
|
3 files changed, 6 insertions(+), 12 deletions(-)
|
|
create mode 100755 cromite_flags/content/public/common/content_features_cc/Enable-Android-DevTools-Frontend.inc
|
|
|
|
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java b/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java
|
|
--- a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java
|
|
+++ b/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java
|
|
@@ -447,6 +447,7 @@ public class ChromeContextMenuPopulator implements ContextMenuPopulator {
|
|
|
|
@VisibleForTesting
|
|
boolean shouldShowEmptySpaceContextMenu() {
|
|
+ if ((true)) return true;
|
|
// Enable empty space context menu from mouse-right click on all device form factors, while
|
|
// long press (touch) should only work for large screen devices (crbug.com/429262357).
|
|
return (mParams.getSourceType() == MenuSourceType.MOUSE
|
|
@@ -458,9 +459,7 @@ public class ChromeContextMenuPopulator implements ContextMenuPopulator {
|
|
@VisibleForTesting
|
|
boolean shouldShowDeveloperMenu() {
|
|
return DevToolsWindowAndroid.isDevToolsAllowedFor(
|
|
- getProfile(), mItemDelegate.getWebContents())
|
|
- && DeviceInput.supportsAlphabeticKeyboard()
|
|
- && DeviceInput.supportsPrecisionPointer();
|
|
+ getProfile(), mItemDelegate.getWebContents());
|
|
}
|
|
|
|
@VisibleForTesting
|
|
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedAppMenuPropertiesDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedAppMenuPropertiesDelegate.java
|
|
--- a/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedAppMenuPropertiesDelegate.java
|
|
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedAppMenuPropertiesDelegate.java
|
|
@@ -1037,7 +1037,7 @@ public class TabbedAppMenuPropertiesDelegate extends AppMenuPropertiesDelegateIm
|
|
}
|
|
|
|
private boolean shouldShowTaskManagerItem() {
|
|
- return ChromeFeatureList.isEnabled(ChromeFeatureList.TASK_MANAGER_CLANK);
|
|
+ return true; // ChromeFeatureList.isEnabled(ChromeFeatureList.TASK_MANAGER_CLANK);
|
|
}
|
|
|
|
private MVCListAdapter.ListItem buildTaskManagerItem() {
|
|
@@ -1056,10 +1056,6 @@ public class TabbedAppMenuPropertiesDelegate extends AppMenuPropertiesDelegateIm
|
|
return false;
|
|
}
|
|
|
|
- if (!DeviceFormFactor.isNonMultiDisplayContextOnTablet(mContext)) {
|
|
- return false;
|
|
- }
|
|
-
|
|
if (currentTab == null || currentTab.isNativePage()) {
|
|
return false;
|
|
}
|
|
@@ -1084,10 +1080,6 @@ public class TabbedAppMenuPropertiesDelegate extends AppMenuPropertiesDelegateIm
|
|
}
|
|
|
|
private boolean shouldShowMoreToolsItem(@Nullable Tab currentTab) {
|
|
- if (!ChromeFeatureList.isEnabled(ChromeFeatureList.SUBMENUS_IN_APP_MENU)) {
|
|
- return false;
|
|
- }
|
|
-
|
|
if (shouldShowReaderModeItem(currentTab)) {
|
|
return true;
|
|
}
|
|
diff --git a/cromite_flags/content/public/common/content_features_cc/Enable-Android-DevTools-Frontend.inc b/cromite_flags/content/public/common/content_features_cc/Enable-Android-DevTools-Frontend.inc
|
|
new file mode 100755
|
|
--- /dev/null
|
|
+++ b/cromite_flags/content/public/common/content_features_cc/Enable-Android-DevTools-Frontend.inc
|
|
@@ -0,0 +1,3 @@
|
|
+#if BUILDFLAG(IS_ANDROID)
|
|
+SET_CROMITE_FEATURE_ENABLED(kAndroidDevToolsFrontend);
|
|
+#endif
|
|
--
|