| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef COMPONENTS_APP_MODAL_JAVASCRIPT_DIALOG_MANAGER_H_ | 5 #ifndef COMPONENTS_APP_MODAL_JAVASCRIPT_DIALOG_MANAGER_H_ |
| 6 #define COMPONENTS_APP_MODAL_JAVASCRIPT_DIALOG_MANAGER_H_ | 6 #define COMPONENTS_APP_MODAL_JAVASCRIPT_DIALOG_MANAGER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 const base::string16& message_text, | 50 const base::string16& message_text, |
| 51 const base::string16& default_prompt_text, | 51 const base::string16& default_prompt_text, |
| 52 const DialogClosedCallback& callback, | 52 const DialogClosedCallback& callback, |
| 53 bool* did_suppress_message) override; | 53 bool* did_suppress_message) override; |
| 54 void RunBeforeUnloadDialog(content::WebContents* web_contents, | 54 void RunBeforeUnloadDialog(content::WebContents* web_contents, |
| 55 bool is_reload, | 55 bool is_reload, |
| 56 const DialogClosedCallback& callback) override; | 56 const DialogClosedCallback& callback) override; |
| 57 bool HandleJavaScriptDialog(content::WebContents* web_contents, | 57 bool HandleJavaScriptDialog(content::WebContents* web_contents, |
| 58 bool accept, | 58 bool accept, |
| 59 const base::string16* prompt_override) override; | 59 const base::string16* prompt_override) override; |
| 60 void CancelActiveAndPendingDialogs( | 60 void CancelDialogs(content::WebContents* web_contents, |
| 61 content::WebContents* web_contents) override; | 61 bool suppress_callbacks, |
| 62 void ResetDialogState(content::WebContents* web_contents) override; | 62 bool reset_state) override; |
| 63 | 63 |
| 64 base::string16 GetTitle(content::WebContents* web_contents, | 64 base::string16 GetTitle(content::WebContents* web_contents, |
| 65 const GURL& origin_url, | 65 const GURL& origin_url, |
| 66 bool is_alert); | 66 bool is_alert); |
| 67 | 67 |
| 68 // Wrapper around OnDialogClosed; logs UMA stats before continuing on. | 68 // Wrapper around OnDialogClosed; logs UMA stats before continuing on. |
| 69 void OnBeforeUnloadDialogClosed(content::WebContents* web_contents, | 69 void OnBeforeUnloadDialogClosed(content::WebContents* web_contents, |
| 70 DialogClosedCallback callback, | 70 DialogClosedCallback callback, |
| 71 bool success, | 71 bool success, |
| 72 const base::string16& user_input); | 72 const base::string16& user_input); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 89 // dialogs. (Since Javascript dialogs are modal, this is even accurate!) | 89 // dialogs. (Since Javascript dialogs are modal, this is even accurate!) |
| 90 base::TimeTicks last_close_time_; | 90 base::TimeTicks last_close_time_; |
| 91 base::TimeTicks last_creation_time_; | 91 base::TimeTicks last_creation_time_; |
| 92 | 92 |
| 93 DISALLOW_COPY_AND_ASSIGN(JavaScriptDialogManager); | 93 DISALLOW_COPY_AND_ASSIGN(JavaScriptDialogManager); |
| 94 }; | 94 }; |
| 95 | 95 |
| 96 } // namespace app_modal | 96 } // namespace app_modal |
| 97 | 97 |
| 98 #endif // COMPONENTS_APP_MODAL_JAVASCRIPT_DIALOG_MANAGER_H_ | 98 #endif // COMPONENTS_APP_MODAL_JAVASCRIPT_DIALOG_MANAGER_H_ |
| OLD | NEW |