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

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

Issue 2846363004: Make extension callbacks with auto-dismissing dialogs (Closed)
Patch Set: reupload; no code change Created 3 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/javascript_dialogs/javascript_dialog_tab_helper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 84
85 void ClearDialogInfo(); 85 void ClearDialogInfo();
86 86
87 // The dialog being displayed on the observed WebContents. 87 // The dialog being displayed on the observed WebContents.
88 base::WeakPtr<JavaScriptDialog> dialog_; 88 base::WeakPtr<JavaScriptDialog> dialog_;
89 89
90 // The type of dialog being displayed. Only valid when |dialog_| is non-null. 90 // The type of dialog being displayed. Only valid when |dialog_| is non-null.
91 content::JavaScriptDialogType dialog_type_ = 91 content::JavaScriptDialogType dialog_type_ =
92 content::JavaScriptDialogType::JAVASCRIPT_DIALOG_TYPE_ALERT; 92 content::JavaScriptDialogType::JAVASCRIPT_DIALOG_TYPE_ALERT;
93 93
94 // The WebContents that was marked as showing the dialog.
95 content::WebContents* alerting_web_contents_ = nullptr;
96
94 // The callback provided for when the dialog is closed. Usually the dialog 97 // The callback provided for when the dialog is closed. Usually the dialog
95 // itself calls it, but in the cases where the dialog is closed not by the 98 // itself calls it, but in the cases where the dialog is closed not by the
96 // user's input but by a call to |CloseDialog|, this class will call it. 99 // user's input but by a call to |CloseDialog|, this class will call it.
97 content::JavaScriptDialogManager::DialogClosedCallback dialog_callback_; 100 content::JavaScriptDialogManager::DialogClosedCallback dialog_callback_;
98 101
99 base::Closure dialog_shown_; 102 base::Closure dialog_shown_;
100 103
101 DISALLOW_COPY_AND_ASSIGN(JavaScriptDialogTabHelper); 104 DISALLOW_COPY_AND_ASSIGN(JavaScriptDialogTabHelper);
102 }; 105 };
103 106
104 #endif // CHROME_BROWSER_UI_JAVASCRIPT_DIALOGS_JAVASCRIPT_DIALOG_TAB_HELPER_H_ 107 #endif // CHROME_BROWSER_UI_JAVASCRIPT_DIALOGS_JAVASCRIPT_DIALOG_TAB_HELPER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/javascript_dialogs/javascript_dialog_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698