From 86f58a3a85e5fde00e82f215ead1b097de7b8f4f Mon Sep 17 00:00:00 2001 From: mkarolin Date: Fri, 22 Oct 2021 15:41:57 -0400 Subject: [PATCH] OutdatedUpgradeBubbleView moved to chrome/browser/ui/dialogs/ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Chromium change: https://chromium.googlesource.com/chromium/src/+/9a697f9b7b1b6a51118ae420adb4ee96fa647243 commit 9a697f9b7b1b6a51118ae420adb4ee96fa647243 Author: Peter Boström Date: Fri Oct 15 23:27:56 2021 +0000 Add chrome::ShowBubble() for anchored DialogModels This migrates OutdatedUpgradeBubbleView to chrome/browser/ui/dialogs/ as ShowOutdatedUpgradeBubble(). Follow-up actions should move other dialogs (such as window_name_prompt) into this directory. This also adds chrome/browser/ui/browser_element_identifiers.h to be able to refer to the app menu from outside of views code to end up anchoring to it. This also replaces BrowserAppMenuButton::kIdentifier with kAppMenuElementId for this purpose. Bug: 1259210 --- chromium_src/chrome/browser/DEPS | 1 + .../outdated_upgrade_bubble.cc} | 5 +++-- ...wser-ui-dialogs-outdated_upgrade_bubble.cc.patch} | 12 ++++++------ 3 files changed, 10 insertions(+), 8 deletions(-) rename chromium_src/chrome/browser/ui/{views/outdated_upgrade_bubble_view.cc => dialogs/outdated_upgrade_bubble.cc} (50%) rename patches/{chrome-browser-ui-views-outdated_upgrade_bubble_view.cc.patch => chrome-browser-ui-dialogs-outdated_upgrade_bubble.cc.patch} (50%) diff --git a/chromium_src/chrome/browser/DEPS b/chromium_src/chrome/browser/DEPS index b81a5477ed0..259ee1a1db9 100644 --- a/chromium_src/chrome/browser/DEPS +++ b/chromium_src/chrome/browser/DEPS @@ -52,6 +52,7 @@ include_rules = [ "+../../../../../../chrome/browser/ui/bookmarks", "+../../../../../../chrome/browser/ui/cocoa", "+../../../../../../chrome/browser/ui/content_settings", + "+../../../../../../chrome/browser/ui/dialogs", "+../../../../../../chrome/browser/ui/extensions", "+../../../../../../chrome/browser/ui/omnibox", "+../../../../../../chrome/browser/ui/page_info", diff --git a/chromium_src/chrome/browser/ui/views/outdated_upgrade_bubble_view.cc b/chromium_src/chrome/browser/ui/dialogs/outdated_upgrade_bubble.cc similarity index 50% rename from chromium_src/chrome/browser/ui/views/outdated_upgrade_bubble_view.cc rename to chromium_src/chrome/browser/ui/dialogs/outdated_upgrade_bubble.cc index 63404e2d6b0..599471d2062 100644 --- a/chromium_src/chrome/browser/ui/views/outdated_upgrade_bubble_view.cc +++ b/chromium_src/chrome/browser/ui/dialogs/outdated_upgrade_bubble.cc @@ -1,7 +1,8 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public +/* Copyright (c) 2021 The Brave Authors. All rights reserved. + * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "brave/common/url_constants.h" // for kDownloadBraveUrl -#include "../../../../../../chrome/browser/ui/views/outdated_upgrade_bubble_view.cc" +#include "../../../../../../chrome/browser/ui/dialogs/outdated_upgrade_bubble.cc" diff --git a/patches/chrome-browser-ui-views-outdated_upgrade_bubble_view.cc.patch b/patches/chrome-browser-ui-dialogs-outdated_upgrade_bubble.cc.patch similarity index 50% rename from patches/chrome-browser-ui-views-outdated_upgrade_bubble_view.cc.patch rename to patches/chrome-browser-ui-dialogs-outdated_upgrade_bubble.cc.patch index 447e8f26124..915eb909ac9 100644 --- a/patches/chrome-browser-ui-views-outdated_upgrade_bubble_view.cc.patch +++ b/patches/chrome-browser-ui-dialogs-outdated_upgrade_bubble.cc.patch @@ -1,8 +1,8 @@ -diff --git a/chrome/browser/ui/views/outdated_upgrade_bubble_view.cc b/chrome/browser/ui/views/outdated_upgrade_bubble_view.cc -index 3dc38bb91c65a077b19c42c4a3acb8d7c616e939..53e0c25ce7fd96580c2b0eaf63949613a6f8cebc 100644 ---- a/chrome/browser/ui/views/outdated_upgrade_bubble_view.cc -+++ b/chrome/browser/ui/views/outdated_upgrade_bubble_view.cc -@@ -47,6 +47,8 @@ constexpr int kNumIgnoredBuckets = 5; +diff --git a/chrome/browser/ui/dialogs/outdated_upgrade_bubble.cc b/chrome/browser/ui/dialogs/outdated_upgrade_bubble.cc +index 36fbd92197bb7419a654689258e431eccb0a2bb4..fd46898c10728156ac8e157c44ed025488d47343 100644 +--- a/chrome/browser/ui/dialogs/outdated_upgrade_bubble.cc ++++ b/chrome/browser/ui/dialogs/outdated_upgrade_bubble.cc +@@ -42,6 +42,8 @@ constexpr int kNumIgnoredBuckets = 5; // we redirect to the safetyCheck page that interacts with these. On other // platforms it may be possible to download an updated browser via a site. const char* kUpdateBrowserRedirectUrl = @@ -11,7 +11,7 @@ index 3dc38bb91c65a077b19c42c4a3acb8d7c616e939..53e0c25ce7fd96580c2b0eaf63949613 #if BUILDFLAG(IS_CHROMEOS_LACROS) // The URL to be used to update Lacros-Chrome when auto-update failed // for too long. -@@ -56,6 +58,7 @@ const char* kUpdateBrowserRedirectUrl = +@@ -51,6 +53,7 @@ const char* kUpdateBrowserRedirectUrl = // too long. "https://www.google.com/chrome"; #endif