LeOSium_webview/LeOS/patches/Do-not-compile-QR-code-shar...

125 lines
8.0 KiB
Diff

From: csagan5 <32685696+csagan5@users.noreply.github.com>
Date: Thu, 27 Feb 2020 23:23:59 +0100
Subject: Do not compile QR code sharing
License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
---
chrome/android/BUILD.gn | 1 -
.../chrome/browser/ui/RootUiCoordinator.java | 5 -----
chrome/browser/share/BUILD.gn | 2 --
...omeProvidedSharingOptionsProviderBase.java | 19 -------------------
chrome/browser/share/android/java_sources.gni | 11 -----------
5 files changed, 38 deletions(-)
diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
--- a/chrome/android/BUILD.gn
+++ b/chrome/android/BUILD.gn
@@ -3415,7 +3415,6 @@ generate_jni("chrome_jni_headers") {
"../browser/share/android/java/src/org/chromium/chrome/browser/share/link_to_text/LinkToTextBridge.java",
"../browser/share/android/java/src/org/chromium/chrome/browser/share/long_screenshots/bitmap_generation/LongScreenshotsTabService.java",
"../browser/share/android/java/src/org/chromium/chrome/browser/share/long_screenshots/bitmap_generation/LongScreenshotsTabServiceFactory.java",
- "../browser/share/android/java/src/org/chromium/chrome/browser/share/qrcode/QRCodeGenerationRequest.java",
"../browser/share/android/java/src/org/chromium/chrome/browser/share/screenshot/EditorScreenshotTask.java",
"../browser/share/android/java/src/org/chromium/chrome/browser/share/send_tab_to_self/MetricsRecorder.java",
"../browser/share/android/java/src/org/chromium/chrome/browser/share/send_tab_to_self/NotificationManager.java",
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ui/RootUiCoordinator.java b/chrome/android/java/src/org/chromium/chrome/browser/ui/RootUiCoordinator.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/ui/RootUiCoordinator.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ui/RootUiCoordinator.java
@@ -114,7 +114,6 @@ import org.chromium.chrome.browser.share.ShareButtonController;
import org.chromium.chrome.browser.share.ShareDelegate;
import org.chromium.chrome.browser.share.ShareDelegate.ShareOrigin;
import org.chromium.chrome.browser.share.ShareUtils;
-import org.chromium.chrome.browser.share.qrcode.QrCodeDialog;
import org.chromium.chrome.browser.share.scroll_capture.ScrollCaptureManager;
import org.chromium.chrome.browser.tab.AccessibilityVisibilityHandler;
import org.chromium.chrome.browser.tab.AutofillSessionLifetimeController;
@@ -546,10 +545,6 @@ public class RootUiCoordinator
}
public void onAttachFragment(Fragment fragment) {
- if (fragment instanceof QrCodeDialog) {
- QrCodeDialog qrCodeDialog = (QrCodeDialog) fragment;
- qrCodeDialog.setWindowAndroid(mWindowAndroid);
- }
}
@Override
diff --git a/chrome/browser/share/BUILD.gn b/chrome/browser/share/BUILD.gn
--- a/chrome/browser/share/BUILD.gn
+++ b/chrome/browser/share/BUILD.gn
@@ -44,8 +44,6 @@ source_set("share") {
"default_ranking_android.cc",
"editor_screenshot_task.cc",
"link_to_text_bridge.cc",
- "qr_code_generation_request.cc",
- "qr_code_generation_request.h",
]
deps += [
":jni_headers",
diff --git a/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/ChromeProvidedSharingOptionsProviderBase.java b/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/ChromeProvidedSharingOptionsProviderBase.java
--- a/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/ChromeProvidedSharingOptionsProviderBase.java
+++ b/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/ChromeProvidedSharingOptionsProviderBase.java
@@ -24,7 +24,6 @@ import org.chromium.chrome.browser.preferences.Pref;
import org.chromium.chrome.browser.profiles.Profile;
import org.chromium.chrome.browser.share.ChromeShareExtras.DetailedContentType;
import org.chromium.chrome.browser.share.ShareContentTypeHelper.ContentType;
-import org.chromium.chrome.browser.share.qrcode.QrCodeCoordinator;
import org.chromium.chrome.browser.share.send_tab_to_self.SendTabToSelfAndroidBridge;
import org.chromium.chrome.browser.share.send_tab_to_self.SendTabToSelfCoordinator;
import org.chromium.chrome.browser.share.share_sheet.ChromeOptionShareCallback;
@@ -288,9 +287,6 @@ public abstract class ChromeProvidedSharingOptionsProviderBase {
}
private void maybeAddQrCodeFirstPartyOption() {
- if (!mIsIncognito && !TextUtils.isEmpty(mUrl)) {
- mOrderedFirstPartyOptions.add(createQrCodeFirstPartyOption());
- }
}
private void maybeAddScreenshotFirstPartyOption() {
@@ -442,21 +438,6 @@ public abstract class ChromeProvidedSharingOptionsProviderBase {
.build();
}
- private FirstPartyOption createQrCodeFirstPartyOption() {
- return new FirstPartyOptionBuilder(
- ContentType.LINK_PAGE_VISIBLE, ContentType.LINK_PAGE_NOT_VISIBLE, ContentType.IMAGE)
- .setDetailedContentTypesToDisableFor(
- DetailedContentType.WEB_NOTES, DetailedContentType.SCREENSHOT)
- .setIcon(R.drawable.qr_code, R.string.qr_code_share_icon_label)
- .setFeatureNameForMetrics(USER_ACTION_QR_CODE_SELECTED)
- .setOnClickCallback((view) -> {
- QrCodeCoordinator qrCodeCoordinator =
- new QrCodeCoordinator(mActivity, mUrl, mShareParams.getWindow());
- qrCodeCoordinator.show();
- })
- .build();
- }
-
private FirstPartyOption createPrintingFirstPartyOption() {
return new FirstPartyOptionBuilder(ContentType.LINK_PAGE_VISIBLE)
.setIcon(R.drawable.sharing_print, R.string.print_share_activity_title)
diff --git a/chrome/browser/share/android/java_sources.gni b/chrome/browser/share/android/java_sources.gni
--- a/chrome/browser/share/android/java_sources.gni
+++ b/chrome/browser/share/android/java_sources.gni
@@ -28,17 +28,6 @@ share_java_sources = [
"//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/long_screenshots/bitmap_generation/LongScreenshotsTabService.java",
"//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/long_screenshots/bitmap_generation/LongScreenshotsTabServiceFactory.java",
"//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/long_screenshots/bitmap_generation/ScreenshotBoundsManager.java",
- "//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/qrcode/QRCodeGenerationRequest.java",
- "//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/qrcode/QrCodeCoordinator.java",
- "//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/qrcode/QrCodeDialog.java",
- "//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/qrcode/QrCodeDialogTab.java",
- "//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/qrcode/QrCodePageAdapter.java",
- "//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/qrcode/TabLayoutPageListener.java",
- "//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/qrcode/share_tab/QrCodeShareCoordinator.java",
- "//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/qrcode/share_tab/QrCodeShareMediator.java",
- "//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/qrcode/share_tab/QrCodeShareView.java",
- "//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/qrcode/share_tab/QrCodeShareViewBinder.java",
- "//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/qrcode/share_tab/QrCodeShareViewProperties.java",
"//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/screenshot/EditorScreenshotSource.java",
"//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/screenshot/EditorScreenshotTask.java",
"//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/screenshot/ScreenshotCoordinator.java",
--
2.25.1