summaryrefslogtreecommitdiff
path: root/chromium/components/javascript_dialogs
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2021-05-20 09:47:09 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2021-06-07 11:15:42 +0000
commit189d4fd8fad9e3c776873be51938cd31a42b6177 (patch)
tree6497caeff5e383937996768766ab3bb2081a40b2 /chromium/components/javascript_dialogs
parent8bc75099d364490b22f43a7ce366b366c08f4164 (diff)
downloadqtwebengine-chromium-189d4fd8fad9e3c776873be51938cd31a42b6177.tar.gz
BASELINE: Update Chromium to 90.0.4430.221
Change-Id: Iff4d9d18d2fcf1a576f3b1f453010f744a232920 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/components/javascript_dialogs')
-rw-r--r--chromium/components/javascript_dialogs/BUILD.gn5
-rw-r--r--chromium/components/javascript_dialogs/DIR_METADATA3
-rw-r--r--chromium/components/javascript_dialogs/OWNERS1
-rw-r--r--chromium/components/javascript_dialogs/android/BUILD.gn2
-rw-r--r--chromium/components/javascript_dialogs/android/javascript_dialogs_android_strings.grd2
-rw-r--r--chromium/components/javascript_dialogs/android/translations/javascript_dialogs_android_strings_nl.xtb2
-rw-r--r--chromium/components/javascript_dialogs/app_modal_dialog_manager.cc20
-rw-r--r--chromium/components/javascript_dialogs/app_modal_dialog_manager.h6
-rw-r--r--chromium/components/javascript_dialogs/tab_modal_dialog_manager.cc11
-rw-r--r--chromium/components/javascript_dialogs/tab_modal_dialog_manager.h8
-rw-r--r--chromium/components/javascript_dialogs/views/DIR_METADATA3
-rw-r--r--chromium/components/javascript_dialogs/views/OWNERS1
-rw-r--r--chromium/components/javascript_dialogs/views/app_modal_dialog_view_views.cc3
13 files changed, 16 insertions, 51 deletions
diff --git a/chromium/components/javascript_dialogs/BUILD.gn b/chromium/components/javascript_dialogs/BUILD.gn
index 28bf17348f3..94034255947 100644
--- a/chromium/components/javascript_dialogs/BUILD.gn
+++ b/chromium/components/javascript_dialogs/BUILD.gn
@@ -47,7 +47,10 @@ static_library("javascript_dialogs") {
"views/app_modal_dialog_view_views.h",
]
- deps += [ "//ui/views" ]
+ deps += [
+ "//build:chromeos_buildflags",
+ "//ui/views",
+ ]
}
if (is_android) {
diff --git a/chromium/components/javascript_dialogs/DIR_METADATA b/chromium/components/javascript_dialogs/DIR_METADATA
new file mode 100644
index 00000000000..e3d54cf090c
--- /dev/null
+++ b/chromium/components/javascript_dialogs/DIR_METADATA
@@ -0,0 +1,3 @@
+monorail {
+ component: "Blink>WindowDialog"
+}
diff --git a/chromium/components/javascript_dialogs/OWNERS b/chromium/components/javascript_dialogs/OWNERS
index 9c92ae3e5c3..704db9fc248 100644
--- a/chromium/components/javascript_dialogs/OWNERS
+++ b/chromium/components/javascript_dialogs/OWNERS
@@ -1,2 +1 @@
avi@chromium.org
-# COMPONENT: Blink>WindowDialog
diff --git a/chromium/components/javascript_dialogs/android/BUILD.gn b/chromium/components/javascript_dialogs/android/BUILD.gn
index 6fe6f1d561b..4d2b3ce9125 100644
--- a/chromium/components/javascript_dialogs/android/BUILD.gn
+++ b/chromium/components/javascript_dialogs/android/BUILD.gn
@@ -24,7 +24,7 @@ android_library("java") {
"//base:jni_java",
"//components/browser_ui/styles/android:java",
"//components/browser_ui/widget/android:java",
- "//third_party/android_deps:androidx_annotation_annotation_java",
+ "//third_party/androidx:androidx_annotation_annotation_java",
"//ui/android:ui_java",
]
}
diff --git a/chromium/components/javascript_dialogs/android/javascript_dialogs_android_strings.grd b/chromium/components/javascript_dialogs/android/javascript_dialogs_android_strings.grd
index 497ed16e271..6068d52e8b1 100644
--- a/chromium/components/javascript_dialogs/android/javascript_dialogs_android_strings.grd
+++ b/chromium/components/javascript_dialogs/android/javascript_dialogs_android_strings.grd
@@ -167,7 +167,7 @@
<file lang="zh-TW" path="translations/javascript_dialogs_android_strings_zh-TW.xtb" />
<file lang="zu" path="translations/javascript_dialogs_android_strings_zu.xtb" />
</translations>
- <release allow_pseudo="false" seq="1">
+ <release seq="1">
<messages fallback_to_english="true">
<!-- These are copied from javascript_dialogs_strings.grdp. It would be better to share, but javascript_dialogs_strings.grdp are part of the monolithic components_strings_grd target, and depending on that pulls in lots of unnecessary strings, causing UnusedResource errors. -->
<message name="IDS_LEAVE" desc="Dialog button to leave the current page and navigate to a new page. [CHAR-LIMIT=20]">
diff --git a/chromium/components/javascript_dialogs/android/translations/javascript_dialogs_android_strings_nl.xtb b/chromium/components/javascript_dialogs/android/translations/javascript_dialogs_android_strings_nl.xtb
index 49a230cc35c..b0cdca4cbc5 100644
--- a/chromium/components/javascript_dialogs/android/translations/javascript_dialogs_android_strings_nl.xtb
+++ b/chromium/components/javascript_dialogs/android/translations/javascript_dialogs_android_strings_nl.xtb
@@ -1,6 +1,6 @@
<?xml version="1.0" ?>
<!DOCTYPE translationbundle>
<translationbundle lang="nl">
-<translation id="1623104350909869708">Voorkomen dat deze pagina extra dialoogvensters weergeeft</translation>
+<translation id="1623104350909869708">Voorkomen dat deze pagina extra dialoogvensters toont</translation>
<translation id="2677748264148917807">Verlaten</translation>
</translationbundle> \ No newline at end of file
diff --git a/chromium/components/javascript_dialogs/app_modal_dialog_manager.cc b/chromium/components/javascript_dialogs/app_modal_dialog_manager.cc
index 16967487c28..723b95bbb65 100644
--- a/chromium/components/javascript_dialogs/app_modal_dialog_manager.cc
+++ b/chromium/components/javascript_dialogs/app_modal_dialog_manager.cc
@@ -240,7 +240,7 @@ void AppModalDialogManager::RunBeforeUnloadDialogWithOptions(
ShouldDisplaySuppressCheckbox(extra_data),
true, // is_before_unload_dialog
is_reload,
- base::BindOnce(&AppModalDialogManager::OnBeforeUnloadDialogClosed,
+ base::BindOnce(&AppModalDialogManager::OnDialogClosed,
base::Unretained(this), web_contents,
std::move(callback))));
}
@@ -290,24 +290,6 @@ void AppModalDialogManager::CancelDialogs(content::WebContents* web_contents,
javascript_dialog_extra_data_.erase(web_contents);
}
-void AppModalDialogManager::OnBeforeUnloadDialogClosed(
- content::WebContents* web_contents,
- DialogClosedCallback callback,
- bool success,
- const base::string16& user_input) {
- enum class StayVsLeave {
- STAY = 0,
- LEAVE = 1,
- MAX,
- };
- UMA_HISTOGRAM_ENUMERATION(
- "JSDialogs.OnBeforeUnloadStayVsLeave",
- static_cast<int>(success ? StayVsLeave::LEAVE : StayVsLeave::STAY),
- static_cast<int>(StayVsLeave::MAX));
-
- OnDialogClosed(web_contents, std::move(callback), success, user_input);
-}
-
void AppModalDialogManager::OnDialogClosed(content::WebContents* web_contents,
DialogClosedCallback callback,
bool success,
diff --git a/chromium/components/javascript_dialogs/app_modal_dialog_manager.h b/chromium/components/javascript_dialogs/app_modal_dialog_manager.h
index 97bb6b52360..b21870ddced 100644
--- a/chromium/components/javascript_dialogs/app_modal_dialog_manager.h
+++ b/chromium/components/javascript_dialogs/app_modal_dialog_manager.h
@@ -77,12 +77,6 @@ class AppModalDialogManager : public content::JavaScriptDialogManager {
AppModalDialogManager();
~AppModalDialogManager() override;
- // Wrapper around OnDialogClosed; logs UMA stats before continuing on.
- void OnBeforeUnloadDialogClosed(content::WebContents* web_contents,
- DialogClosedCallback callback,
- bool success,
- const base::string16& user_input);
-
// Wrapper around a DialogClosedCallback so that we can intercept it before
// passing it onto the original callback.
void OnDialogClosed(content::WebContents* web_contents,
diff --git a/chromium/components/javascript_dialogs/tab_modal_dialog_manager.cc b/chromium/components/javascript_dialogs/tab_modal_dialog_manager.cc
index 64996961891..e4f89656166 100644
--- a/chromium/components/javascript_dialogs/tab_modal_dialog_manager.cc
+++ b/chromium/components/javascript_dialogs/tab_modal_dialog_manager.cc
@@ -111,17 +111,6 @@ DialogOriginRelationship GetDialogOriginRelationship(
} // namespace
-// static
-void TabModalDialogManager::CreateForWebContents(
- content::WebContents* web_contents,
- std::unique_ptr<TabModalDialogManagerDelegate> delegate) {
- if (!FromWebContents(web_contents)) {
- web_contents->SetUserData(UserDataKey(),
- base::WrapUnique(new TabModalDialogManager(
- web_contents, std::move(delegate))));
- }
-}
-
TabModalDialogManager::~TabModalDialogManager() {
CloseDialog(DismissalCause::kTabHelperDestroyed, false, base::string16());
}
diff --git a/chromium/components/javascript_dialogs/tab_modal_dialog_manager.h b/chromium/components/javascript_dialogs/tab_modal_dialog_manager.h
index 2333a045be8..d91bf5698ca 100644
--- a/chromium/components/javascript_dialogs/tab_modal_dialog_manager.h
+++ b/chromium/components/javascript_dialogs/tab_modal_dialog_manager.h
@@ -91,10 +91,6 @@ class TabModalDialogManager
kMaxValue = kDialogClosed,
};
- static void CreateForWebContents(
- content::WebContents* web_contents,
- std::unique_ptr<TabModalDialogManagerDelegate> delegate);
-
~TabModalDialogManager() override;
void BrowserActiveStateChanged();
@@ -133,10 +129,6 @@ class TabModalDialogManager
private:
friend class content::WebContentsUserData<TabModalDialogManager>;
- // This is here to hide the normal WebContentsUserData factory function in
- // favor of that which takes a delegate.
- static void CreateForWebContents(content::WebContents* web_contents);
-
TabModalDialogManager(
content::WebContents* web_contents,
std::unique_ptr<TabModalDialogManagerDelegate> delegate);
diff --git a/chromium/components/javascript_dialogs/views/DIR_METADATA b/chromium/components/javascript_dialogs/views/DIR_METADATA
new file mode 100644
index 00000000000..2cf1ad6b2f8
--- /dev/null
+++ b/chromium/components/javascript_dialogs/views/DIR_METADATA
@@ -0,0 +1,3 @@
+monorail {
+ component: "Internals>Views>Desktop"
+}
diff --git a/chromium/components/javascript_dialogs/views/OWNERS b/chromium/components/javascript_dialogs/views/OWNERS
index 82163ec7ad4..e69de29bb2d 100644
--- a/chromium/components/javascript_dialogs/views/OWNERS
+++ b/chromium/components/javascript_dialogs/views/OWNERS
@@ -1 +0,0 @@
-# COMPONENT: Internals>Views>Desktop
diff --git a/chromium/components/javascript_dialogs/views/app_modal_dialog_view_views.cc b/chromium/components/javascript_dialogs/views/app_modal_dialog_view_views.cc
index 510c1f5e390..fb043e844de 100644
--- a/chromium/components/javascript_dialogs/views/app_modal_dialog_view_views.cc
+++ b/chromium/components/javascript_dialogs/views/app_modal_dialog_view_views.cc
@@ -6,6 +6,7 @@
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
+#include "build/chromeos_buildflags.h"
#include "components/javascript_dialogs/app_modal_dialog_controller.h"
#include "components/strings/grit/components_strings.h"
#include "ui/base/l10n/l10n_util.h"
@@ -107,7 +108,7 @@ base::string16 AppModalDialogViewViews::GetWindowTitle() const {
}
ui::ModalType AppModalDialogViewViews::GetModalType() const {
-#if defined(OS_CHROMEOS)
+#if BUILDFLAG(IS_CHROMEOS_ASH)
// TODO(https://crbug.com/1127133): Remove this hack. This works around the
// linked bug. This dialog should be window-modal on ChromeOS as well.
return ui::MODAL_TYPE_SYSTEM;