Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Unified Diff: components/app_modal/javascript_dialog_manager.cc

Issue 2421943002: Make JavaScript dialogs auto-dismiss on tab switch. (Closed)
Patch Set: fix Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/app_modal/javascript_dialog_manager.cc
diff --git a/components/app_modal/javascript_dialog_manager.cc b/components/app_modal/javascript_dialog_manager.cc
index 7628f213971b00f14c59ec058dd2c1b7dc228e99..fbe828a0403a4dc88de7dda84dc59af2c36d733b 100644
--- a/components/app_modal/javascript_dialog_manager.cc
+++ b/components/app_modal/javascript_dialog_manager.cc
@@ -150,8 +150,7 @@ void JavaScriptDialogManager::RunJavaScriptDialog(
last_close_time_ = base::TimeTicks();
}
- bool is_alert = message_type == content::JAVASCRIPT_MESSAGE_TYPE_ALERT;
- base::string16 dialog_title = GetTitle(web_contents, origin_url, is_alert);
+ base::string16 dialog_title = GetTitle(web_contents, origin_url);
extensions_client_->OnDialogOpened(web_contents);
@@ -243,8 +242,7 @@ bool JavaScriptDialogManager::HandleJavaScriptDialog(
base::string16 JavaScriptDialogManager::GetTitle(
content::WebContents* web_contents,
- const GURL& origin_url,
- bool is_alert) {
+ const GURL& origin_url) {
// For extensions, show the extension name, but only if the origin of
// the alert matches the top-level WebContents.
std::string name;

Powered by Google App Engine
This is Rietveld 408576698