Index: chrome/browser/ui/javascript_dialogs/javascript_dialog_tab_helper.h |
diff --git a/chrome/browser/ui/javascript_dialogs/javascript_dialog_tab_helper.h b/chrome/browser/ui/javascript_dialogs/javascript_dialog_tab_helper.h |
index 839f0116fcb05be10563f340a7c125e50b76c3c5..f1ab74ba40859e5ba85c36710d4d3e45623810c5 100644 |
--- a/chrome/browser/ui/javascript_dialogs/javascript_dialog_tab_helper.h |
+++ b/chrome/browser/ui/javascript_dialogs/javascript_dialog_tab_helper.h |
@@ -66,6 +66,9 @@ class JavaScriptDialogTabHelper |
private: |
friend class content::WebContentsUserData<JavaScriptDialogTabHelper>; |
+ enum class DismissalCause; |
+ |
+ void LogDialogDismissalCause(DismissalCause cause); |
// Wrapper around a DialogClosedCallback so that we can intercept it before |
// passing it onto the original callback. |
@@ -75,13 +78,18 @@ class JavaScriptDialogTabHelper |
void CloseDialog(bool suppress_callback, |
bool success, |
- const base::string16& user_input); |
+ const base::string16& user_input, |
+ DismissalCause cause); |
void ClearDialogInfo(); |
// The dialog being displayed on the observed WebContents. |
base::WeakPtr<JavaScriptDialog> dialog_; |
+ // The type of dialog being displayed. Only valid when |dialog_| is non-null. |
+ content::JavaScriptMessageType message_type_ = |
+ content::JavaScriptMessageType::JAVASCRIPT_MESSAGE_TYPE_ALERT; |
+ |
// The callback provided for when the dialog is closed. Usually the dialog |
// itself calls it, but in the cases where the dialog is closed not by the |
// user's input but by a call to |CloseDialog|, this class will call it. |