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

Side by Side Diff: chrome/browser/ui/javascript_dialogs/javascript_dialog_tab_helper.h

Issue 2541173003: Allow navigation while a JavaScript dialog is up. (Closed)
Patch Set: test cleaner Created 4 years 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 unified diff | Download patch
OLDNEW
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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 const DialogClosedCallback& callback) override; 51 const DialogClosedCallback& callback) override;
52 bool HandleJavaScriptDialog(content::WebContents* web_contents, 52 bool HandleJavaScriptDialog(content::WebContents* web_contents,
53 bool accept, 53 bool accept,
54 const base::string16* prompt_override) override; 54 const base::string16* prompt_override) override;
55 void CancelDialogs(content::WebContents* web_contents, 55 void CancelDialogs(content::WebContents* web_contents,
56 bool suppress_callbacks, 56 bool suppress_callbacks,
57 bool reset_state) override; 57 bool reset_state) override;
58 58
59 // WebContentsObserver: 59 // WebContentsObserver:
60 void WasHidden() override; 60 void WasHidden() override;
61 void DidStartNavigation(
62 content::NavigationHandle* navigation_handle) override;
63 void DidStartNavigationToPendingEntry(
64 const GURL& url,
65 content::ReloadType reload_type) override;
61 66
62 // BrowserListObserver: 67 // BrowserListObserver:
63 void OnBrowserSetLastActive(Browser* browser) override; 68 void OnBrowserSetLastActive(Browser* browser) override;
64 69
65 private: 70 private:
66 friend class content::WebContentsUserData<JavaScriptDialogTabHelper>; 71 friend class content::WebContentsUserData<JavaScriptDialogTabHelper>;
67 enum class DismissalCause; 72 enum class DismissalCause;
68 73
69 void LogDialogDismissalCause(DismissalCause cause); 74 void LogDialogDismissalCause(DismissalCause cause);
70 75
(...skipping 21 matching lines...) Expand all
92 // itself calls it, but in the cases where the dialog is closed not by the 97 // itself calls it, but in the cases where the dialog is closed not by the
93 // user's input but by a call to |CloseDialog|, this class will call it. 98 // user's input but by a call to |CloseDialog|, this class will call it.
94 content::JavaScriptDialogManager::DialogClosedCallback dialog_callback_; 99 content::JavaScriptDialogManager::DialogClosedCallback dialog_callback_;
95 100
96 base::Closure dialog_shown_; 101 base::Closure dialog_shown_;
97 102
98 DISALLOW_COPY_AND_ASSIGN(JavaScriptDialogTabHelper); 103 DISALLOW_COPY_AND_ASSIGN(JavaScriptDialogTabHelper);
99 }; 104 };
100 105
101 #endif // CHROME_BROWSER_UI_JAVASCRIPT_DIALOGS_JAVASCRIPT_DIALOG_TAB_HELPER_H_ 106 #endif // CHROME_BROWSER_UI_JAVASCRIPT_DIALOGS_JAVASCRIPT_DIALOG_TAB_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698