| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 CHROME_BROWSER_UI_JAVASCRIPT_DIALOGS_JAVASCRIPT_DIALOG_TAB_HELPER_H_ | 5 #ifndef CHROME_BROWSER_UI_JAVASCRIPT_DIALOGS_JAVASCRIPT_DIALOG_TAB_HELPER_H_ |
| 6 #define CHROME_BROWSER_UI_JAVASCRIPT_DIALOGS_JAVASCRIPT_DIALOG_TAB_HELPER_H_ | 6 #define CHROME_BROWSER_UI_JAVASCRIPT_DIALOGS_JAVASCRIPT_DIALOG_TAB_HELPER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 const DialogClosedCallback& callback) override; | 53 const DialogClosedCallback& callback) override; |
| 54 bool HandleJavaScriptDialog(content::WebContents* web_contents, | 54 bool HandleJavaScriptDialog(content::WebContents* web_contents, |
| 55 bool accept, | 55 bool accept, |
| 56 const base::string16* prompt_override) override; | 56 const base::string16* prompt_override) override; |
| 57 void CancelDialogs(content::WebContents* web_contents, | 57 void CancelDialogs(content::WebContents* web_contents, |
| 58 bool suppress_callbacks, | 58 bool suppress_callbacks, |
| 59 bool reset_state) override; | 59 bool reset_state) override; |
| 60 | 60 |
| 61 // WebContentsObserver: | 61 // WebContentsObserver: |
| 62 void WasHidden() override; | 62 void WasHidden() override; |
| 63 void DidStartNavigation( |
| 64 content::NavigationHandle* navigation_handle) override; |
| 65 void DidStartNavigationToPendingEntry( |
| 66 const GURL& url, |
| 67 content::ReloadType reload_type) override; |
| 63 | 68 |
| 64 // BrowserListObserver: | 69 // BrowserListObserver: |
| 65 void OnBrowserSetLastActive(Browser* browser) override; | 70 void OnBrowserSetLastActive(Browser* browser) override; |
| 66 | 71 |
| 67 private: | 72 private: |
| 68 friend class content::WebContentsUserData<JavaScriptDialogTabHelper>; | 73 friend class content::WebContentsUserData<JavaScriptDialogTabHelper>; |
| 69 enum class DismissalCause; | 74 enum class DismissalCause; |
| 70 | 75 |
| 71 void LogDialogDismissalCause(DismissalCause cause); | 76 void LogDialogDismissalCause(DismissalCause cause); |
| 72 | 77 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 94 // itself calls it, but in the cases where the dialog is closed not by the | 99 // itself calls it, but in the cases where the dialog is closed not by the |
| 95 // user's input but by a call to |CloseDialog|, this class will call it. | 100 // user's input but by a call to |CloseDialog|, this class will call it. |
| 96 content::JavaScriptDialogManager::DialogClosedCallback dialog_callback_; | 101 content::JavaScriptDialogManager::DialogClosedCallback dialog_callback_; |
| 97 | 102 |
| 98 base::Closure dialog_shown_; | 103 base::Closure dialog_shown_; |
| 99 | 104 |
| 100 DISALLOW_COPY_AND_ASSIGN(JavaScriptDialogTabHelper); | 105 DISALLOW_COPY_AND_ASSIGN(JavaScriptDialogTabHelper); |
| 101 }; | 106 }; |
| 102 | 107 |
| 103 #endif // CHROME_BROWSER_UI_JAVASCRIPT_DIALOGS_JAVASCRIPT_DIALOG_TAB_HELPER_H_ | 108 #endif // CHROME_BROWSER_UI_JAVASCRIPT_DIALOGS_JAVASCRIPT_DIALOG_TAB_HELPER_H_ |
| OLD | NEW |