[email protected] | c5e22aee5 | 2012-01-19 16:10:51 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
[email protected] | c96531e8 | 2011-01-26 03:11:14 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef CHROME_BROWSER_UI_BROWSER_DIALOGS_H_ |
| 6 | #define CHROME_BROWSER_UI_BROWSER_DIALOGS_H_ |
[email protected] | c96531e8 | 2011-01-26 03:11:14 | [diff] [blame] | 7 | |
djacobo | 21e56e0 | 2016-07-02 01:14:31 | [diff] [blame] | 8 | #include <string> |
| 9 | #include <utility> |
| 10 | #include <vector> |
| 11 | |
[email protected] | 6684dc816 | 2013-06-03 14:05:08 | [diff] [blame] | 12 | #include "base/callback.h" |
David Benjamin | 9a5ca91 | 2018-03-01 23:23:29 | [diff] [blame] | 13 | #include "base/memory/scoped_refptr.h" |
constantina | e4c513e7 | 2017-02-07 02:14:10 | [diff] [blame] | 14 | #include "base/optional.h" |
| 15 | #include "base/strings/string16.h" |
avi | 655876a | 2015-12-25 07:18:15 | [diff] [blame] | 16 | #include "build/build_config.h" |
jackhou | b42a1f3d | 2015-08-24 05:53:28 | [diff] [blame] | 17 | #include "chrome/browser/ui/bookmarks/bookmark_editor.h" |
Mark Pilgrim | 7cfcd11 | 2018-05-08 00:07:56 | [diff] [blame] | 18 | #include "content/public/browser/content_browser_client.h" |
Jun Cai | bc561f41 | 2018-02-28 18:41:39 | [diff] [blame] | 19 | #include "content/public/browser/resource_request_info.h" |
[email protected] | cb80545 | 2013-05-22 15:16:21 | [diff] [blame] | 20 | #include "third_party/skia/include/core/SkColor.h" |
[email protected] | 08397d5 | 2011-02-05 01:53:38 | [diff] [blame] | 21 | #include "ui/gfx/native_widget_types.h" |
[email protected] | c96531e8 | 2011-01-26 03:11:14 | [diff] [blame] | 22 | |
[email protected] | c60e248 | 2011-02-11 23:46:32 | [diff] [blame] | 23 | class Browser; |
tapted | 081286e | 2015-08-10 06:36:30 | [diff] [blame] | 24 | class LoginHandler; |
[email protected] | 6684dc816 | 2013-06-03 14:05:08 | [diff] [blame] | 25 | class Profile; |
Giovanni Ortuño Urquidi | 97f8bd52 | 2017-06-16 04:04:37 | [diff] [blame] | 26 | class WebShareTarget; |
tapted | 712c1b8 | 2017-06-08 03:10:05 | [diff] [blame] | 27 | struct WebApplicationInfo; |
[email protected] | eb2d790 | 2011-02-02 18:19:56 | [diff] [blame] | 28 | |
Peter Boström | 2a02a69 | 2018-02-22 22:25:46 | [diff] [blame] | 29 | namespace base { |
| 30 | class FilePath; |
| 31 | } |
| 32 | |
[email protected] | 2a6bc3e | 2011-12-28 23:51:33 | [diff] [blame] | 33 | namespace content { |
[email protected] | 6ae4f14 | 2012-06-13 19:48:20 | [diff] [blame] | 34 | class BrowserContext; |
[email protected] | 2a6bc3e | 2011-12-28 23:51:33 | [diff] [blame] | 35 | class WebContents; |
Josh Pratt | f80ffb8 | 2019-01-22 07:13:51 | [diff] [blame] | 36 | } // namespace content |
[email protected] | 2a6bc3e | 2011-12-28 23:51:33 | [diff] [blame] | 37 | |
[email protected] | 1c321ee | 2012-05-21 03:02:34 | [diff] [blame] | 38 | namespace extensions { |
| 39 | class Extension; |
| 40 | } |
| 41 | |
tapted | 081286e | 2015-08-10 06:36:30 | [diff] [blame] | 42 | namespace net { |
| 43 | class AuthChallengeInfo; |
tapted | 081286e | 2015-08-10 06:36:30 | [diff] [blame] | 44 | } |
| 45 | |
anthonyvd | 3d7f972 | 2016-12-07 18:43:54 | [diff] [blame] | 46 | namespace payments { |
mathp | f709499d | 2017-01-09 20:48:36 | [diff] [blame] | 47 | class PaymentRequest; |
mathp | f4bc50e | 2017-01-24 05:17:50 | [diff] [blame] | 48 | class PaymentRequestDialog; |
Josh Pratt | f80ffb8 | 2019-01-22 07:13:51 | [diff] [blame] | 49 | } // namespace payments |
anthonyvd | 3d7f972 | 2016-12-07 18:43:54 | [diff] [blame] | 50 | |
alito | e82b14b | 2017-04-06 23:11:29 | [diff] [blame] | 51 | namespace safe_browsing { |
Ali Tofigh | f5baba98 | 2017-07-21 23:15:23 | [diff] [blame] | 52 | class ChromeCleanerController; |
alito | f8f753f6 | 2017-04-28 23:04:10 | [diff] [blame] | 53 | class ChromeCleanerDialogController; |
Fabio Tirelo | 8825aab4 | 2017-10-19 13:23:31 | [diff] [blame] | 54 | class ChromeCleanerRebootDialogController; |
Ali Tofigh | 525f78bdd | 2017-09-15 15:37:20 | [diff] [blame] | 55 | class SettingsResetPromptController; |
Josh Pratt | f80ffb8 | 2019-01-22 07:13:51 | [diff] [blame] | 56 | } // namespace safe_browsing |
alito | e82b14b | 2017-04-06 23:11:29 | [diff] [blame] | 57 | |
avi | 24d693f | 2016-08-06 18:03:52 | [diff] [blame] | 58 | namespace task_manager { |
nick | bb57d2ca | 2016-07-25 23:08:04 | [diff] [blame] | 59 | class TaskManagerTableModel; |
| 60 | } |
| 61 | |
[email protected] | 20c07f8e | 2012-05-31 08:43:14 | [diff] [blame] | 62 | namespace ui { |
| 63 | class WebDialogDelegate; |
Peter Boström | 2a02a69 | 2018-02-22 22:25:46 | [diff] [blame] | 64 | struct SelectedFileInfo; |
Josh Pratt | f80ffb8 | 2019-01-22 07:13:51 | [diff] [blame] | 65 | } // namespace ui |
[email protected] | 20c07f8e | 2012-05-31 08:43:14 | [diff] [blame] | 66 | |
[email protected] | 87586fb7 | 2012-07-02 13:15:02 | [diff] [blame] | 67 | namespace chrome { |
[email protected] | c96531e8 | 2011-01-26 03:11:14 | [diff] [blame] | 68 | |
tapted | e0eec37 | 2016-01-28 02:45:33 | [diff] [blame] | 69 | // Shows or hides the Task Manager. |browser| can be NULL when called from Ash. |
nick | 399f1066 | 2016-05-06 16:20:26 | [diff] [blame] | 70 | // Returns a pointer to the underlying TableModel, which can be ignored, or used |
| 71 | // for testing. |
avi | 24d693f | 2016-08-06 18:03:52 | [diff] [blame] | 72 | task_manager::TaskManagerTableModel* ShowTaskManager(Browser* browser); |
tapted | e0eec37 | 2016-01-28 02:45:33 | [diff] [blame] | 73 | void HideTaskManager(); |
| 74 | |
| 75 | #if !defined(OS_MACOSX) |
[email protected] | d7db4cd | 2012-06-27 04:58:44 | [diff] [blame] | 76 | // Creates and shows an HTML dialog with the given delegate and context. |
| 77 | // The window is automatically destroyed when it is closed. |
[email protected] | eb2d790 | 2011-02-02 18:19:56 | [diff] [blame] | 78 | // Returns the created window. |
| 79 | // |
| 80 | // Make sure to use the returned window only when you know it is safe |
| 81 | // to do so, i.e. before OnDialogClosed() is called on the delegate. |
andresantoso | ba3ef5d7 | 2014-12-15 20:30:08 | [diff] [blame] | 82 | gfx::NativeWindow ShowWebDialog(gfx::NativeView parent, |
[email protected] | 6ae4f14 | 2012-06-13 19:48:20 | [diff] [blame] | 83 | content::BrowserContext* context, |
[email protected] | 20c07f8e | 2012-05-31 08:43:14 | [diff] [blame] | 84 | ui::WebDialogDelegate* delegate); |
jamescook | 1c6343d | 2016-10-25 16:58:50 | [diff] [blame] | 85 | #endif // !defined(OS_MACOSX) |
[email protected] | eb2d790 | 2011-02-02 18:19:56 | [diff] [blame] | 86 | |
[email protected] | 497783c | 2013-10-17 15:54:57 | [diff] [blame] | 87 | // Shows the create chrome app shortcut dialog box. |
[email protected] | 497783c | 2013-10-17 15:54:57 | [diff] [blame] | 88 | // |close_callback| may be null. |
[email protected] | 1148990bb | 2014-05-02 10:04:02 | [diff] [blame] | 89 | void ShowCreateChromeAppShortcutsDialog( |
| 90 | gfx::NativeWindow parent_window, |
| 91 | Profile* profile, |
| 92 | const extensions::Extension* app, |
| 93 | const base::Callback<void(bool /* created */)>& close_callback); |
[email protected] | 497783c | 2013-10-17 15:54:57 | [diff] [blame] | 94 | |
Michael McGreevy | 556227a5 | 2017-11-16 07:47:24 | [diff] [blame] | 95 | // Callback used to indicate whether a user has accepted the installation of a |
| 96 | // web app. The boolean parameter is true when the user accepts the dialog. The |
| 97 | // WebApplicationInfo parameter contains the information about the app, |
| 98 | // possibly modified by the user. |
| 99 | using AppInstallationAcceptanceCallback = |
tapted | 712c1b8 | 2017-06-08 03:10:05 | [diff] [blame] | 100 | base::OnceCallback<void(bool, const WebApplicationInfo&)>; |
| 101 | |
| 102 | // Shows the Bookmark App bubble. |
| 103 | // See Extension::InitFromValueFlags::FROM_BOOKMARK for a description of |
| 104 | // bookmark apps. |
| 105 | // |
| 106 | // |web_app_info| is the WebApplicationInfo being converted into an app. |
Michael McGreevy | 556227a5 | 2017-11-16 07:47:24 | [diff] [blame] | 107 | void ShowBookmarkAppDialog(content::WebContents* web_contents, |
tapted | 712c1b8 | 2017-06-08 03:10:05 | [diff] [blame] | 108 | const WebApplicationInfo& web_app_info, |
Michael McGreevy | 556227a5 | 2017-11-16 07:47:24 | [diff] [blame] | 109 | AppInstallationAcceptanceCallback callback); |
| 110 | |
Alan Cutter | 81ac72668 | 2018-09-25 00:18:36 | [diff] [blame] | 111 | // Sets whether |ShowBookmarkAppDialog| should accept immediately without any |
| 112 | // user interaction. |
| 113 | void SetAutoAcceptBookmarkAppDialogForTesting(bool auto_accept); |
| 114 | |
Michael McGreevy | 556227a5 | 2017-11-16 07:47:24 | [diff] [blame] | 115 | // Shows the PWA installation confirmation bubble. |
| 116 | // |
| 117 | // |web_app_info| is the WebApplicationInfo to be installed. |
| 118 | void ShowPWAInstallDialog(content::WebContents* web_contents, |
| 119 | const WebApplicationInfo& web_app_info, |
| 120 | AppInstallationAcceptanceCallback callback); |
tapted | 712c1b8 | 2017-06-08 03:10:05 | [diff] [blame] | 121 | |
Alan Cutter | 81ac72668 | 2018-09-25 00:18:36 | [diff] [blame] | 122 | // Sets whether |ShowPWAInstallDialog| should accept immediately without any |
| 123 | // user interaction. |
| 124 | void SetAutoAcceptPWAInstallDialogForTesting(bool auto_accept); |
| 125 | |
tapted | 081286e | 2015-08-10 06:36:30 | [diff] [blame] | 126 | #if defined(OS_MACOSX) |
| 127 | |
spqchan | d33344a | 2016-04-13 02:10:51 | [diff] [blame] | 128 | // Bridging methods that show/hide the toolkit-views based Task Manager on Mac. |
avi | 24d693f | 2016-08-06 18:03:52 | [diff] [blame] | 129 | task_manager::TaskManagerTableModel* ShowTaskManagerViews(Browser* browser); |
spqchan | d33344a | 2016-04-13 02:10:51 | [diff] [blame] | 130 | void HideTaskManagerViews(); |
| 131 | |
kerrnel | 28a279f9 | 2017-01-27 05:22:26 | [diff] [blame] | 132 | // Show the Views "Chrome Update" dialog. |
| 133 | void ShowUpdateChromeDialogViews(gfx::NativeWindow parent); |
| 134 | |
tapted | 081286e | 2015-08-10 06:36:30 | [diff] [blame] | 135 | #endif // OS_MACOSX |
| 136 | |
| 137 | #if defined(TOOLKIT_VIEWS) |
| 138 | |
| 139 | // Creates a toolkit-views based LoginHandler (e.g. HTTP-Auth dialog). |
David Benjamin | 9a5ca91 | 2018-03-01 23:23:29 | [diff] [blame] | 140 | scoped_refptr<LoginHandler> CreateLoginHandlerViews( |
Jun Cai | bc561f41 | 2018-02-28 18:41:39 | [diff] [blame] | 141 | net::AuthChallengeInfo* auth_info, |
| 142 | content::ResourceRequestInfo::WebContentsGetter web_contents_getter, |
Mark Pilgrim | 7cfcd11 | 2018-05-08 00:07:56 | [diff] [blame] | 143 | LoginAuthRequiredCallback auth_required_callback); |
tapted | 081286e | 2015-08-10 06:36:30 | [diff] [blame] | 144 | |
jackhou | b42a1f3d | 2015-08-24 05:53:28 | [diff] [blame] | 145 | // Shows the toolkit-views based BookmarkEditor. |
| 146 | void ShowBookmarkEditorViews(gfx::NativeWindow parent_window, |
| 147 | Profile* profile, |
| 148 | const BookmarkEditor::EditDetails& details, |
| 149 | BookmarkEditor::Configuration configuration); |
| 150 | |
mathp | f4bc50e | 2017-01-24 05:17:50 | [diff] [blame] | 151 | payments::PaymentRequestDialog* CreatePaymentRequestDialog( |
| 152 | payments::PaymentRequest* request); |
anthonyvd | 3d7f972 | 2016-12-07 18:43:54 | [diff] [blame] | 153 | |
Giovanni Ortuño Urquidi | 97f8bd52 | 2017-06-16 04:04:37 | [diff] [blame] | 154 | // Used to return the target the user picked or nullptr if the user cancelled |
ortuno | 928d1410 | 2017-05-02 00:09:05 | [diff] [blame] | 155 | // the share. |
| 156 | using WebShareTargetPickerCallback = |
Giovanni Ortuño Urquidi | 97f8bd52 | 2017-06-16 04:04:37 | [diff] [blame] | 157 | base::OnceCallback<void(const WebShareTarget*)>; |
ortuno | 928d1410 | 2017-05-02 00:09:05 | [diff] [blame] | 158 | |
mgiuca | 39e4067 | 2017-01-31 04:16:49 | [diff] [blame] | 159 | // Shows the dialog to choose a share target app. |targets| is a list of app |
constantina | e4c513e7 | 2017-02-07 02:14:10 | [diff] [blame] | 160 | // title and manifest URL pairs that will be shown in a list. If the user picks |
| 161 | // a target, this calls |callback| with the manifest URL of the chosen target, |
| 162 | // or supplies null if the user cancelled the share. |
Giovanni Ortuño Urquidi | 97f8bd52 | 2017-06-16 04:04:37 | [diff] [blame] | 163 | void ShowWebShareTargetPickerDialog(gfx::NativeWindow parent_window, |
| 164 | std::vector<WebShareTarget> targets, |
| 165 | WebShareTargetPickerCallback callback); |
mgiuca | 39e4067 | 2017-01-31 04:16:49 | [diff] [blame] | 166 | |
tapted | 081286e | 2015-08-10 06:36:30 | [diff] [blame] | 167 | #endif // TOOLKIT_VIEWS |
| 168 | |
pdyson | 7872d6c0 | 2017-04-05 23:12:31 | [diff] [blame] | 169 | // Values used in the Dialog.Creation UMA metric. Each value represents a |
| 170 | // different type of dialog box. |
| 171 | // These values are written to logs. New enum values can be added, but existing |
| 172 | // enums must never be renumbered or deleted and reused. |
pdyson | a8a9ea0 | 2017-04-20 00:00:15 | [diff] [blame] | 173 | enum class DialogIdentifier { |
| 174 | UNKNOWN = 0, |
| 175 | TRANSLATE = 1, |
| 176 | BOOKMARK = 2, |
| 177 | BOOKMARK_EDITOR = 3, |
| 178 | DESKTOP_MEDIA_PICKER = 4, |
| 179 | OUTDATED_UPGRADE = 5, |
| 180 | ONE_CLICK_SIGNIN = 6, |
| 181 | PROFILE_SIGNIN_CONFIRMATION = 7, |
| 182 | HUNG_RENDERER = 8, |
| 183 | SESSION_CRASHED = 9, |
| 184 | CONFIRM_BUBBLE = 10, |
| 185 | UPDATE_RECOMMENDED = 11, |
| 186 | CRYPTO_PASSWORD = 12, |
| 187 | SAFE_BROWSING_DOWNLOAD_FEEDBACK = 13, |
| 188 | FIRST_RUN = 14, |
| 189 | NETWORK_SHARE_PROFILE_WARNING = 15, |
Patrick Monette | 66e935a | 2018-06-12 19:16:10 | [diff] [blame] | 190 | // CONFLICTING_MODULE = 16, Deprecated |
pdyson | a8a9ea0 | 2017-04-20 00:00:15 | [diff] [blame] | 191 | CRITICAL_NOTIFICATION = 17, |
| 192 | IME_WARNING = 18, |
pdyson | 106455b2 | 2017-04-26 01:21:31 | [diff] [blame] | 193 | TOOLBAR_ACTIONS_BAR = 19, |
| 194 | GLOBAL_ERROR = 20, |
| 195 | EXTENSION_INSTALL = 21, |
| 196 | EXTENSION_UNINSTALL = 22, |
| 197 | EXTENSION_INSTALLED = 23, |
| 198 | PAYMENT_REQUEST = 24, |
| 199 | SAVE_CARD = 25, |
| 200 | CARD_UNMASK = 26, |
pdyson | 918928e | 2017-05-04 03:50:12 | [diff] [blame] | 201 | SIGN_IN = 27, |
| 202 | SIGN_IN_SYNC_CONFIRMATION = 28, |
| 203 | SIGN_IN_ERROR = 29, |
| 204 | SIGN_IN_EMAIL_CONFIRMATION = 30, |
| 205 | PROFILE_CHOOSER = 31, |
pdyson | 7fa1d03 | 2017-05-17 23:54:45 | [diff] [blame] | 206 | ACCOUNT_CHOOSER = 32, |
| 207 | ARC_APP = 33, |
| 208 | AUTO_SIGNIN_FIRST_RUN = 34, |
| 209 | BOOKMARK_APP_CONFIRMATION = 35, |
| 210 | CHOOSER_UI = 36, |
| 211 | CHOOSER = 37, |
| 212 | COLLECTED_COOKIES = 38, |
| 213 | CONSTRAINED_WEB = 39, |
| 214 | CONTENT_SETTING_CONTENTS = 40, |
| 215 | CREATE_CHROME_APPLICATION_SHORTCUT = 41, |
| 216 | DOWNLOAD_DANGER_PROMPT = 42, |
| 217 | DOWNLOAD_IN_PROGRESS = 43, |
| 218 | ECHO = 44, |
| 219 | ENROLLMENT = 45, |
| 220 | EXTENSION = 46, |
| 221 | EXTENSION_POPUP_AURA = 47, |
| 222 | EXTERNAL_PROTOCOL = 48, |
| 223 | EXTERNAL_PROTOCOL_CHROMEOS = 49, |
| 224 | FIRST_RUN_DIALOG = 50, |
| 225 | HOME_PAGE_UNDO = 51, |
| 226 | IDLE_ACTION_WARNING = 52, |
| 227 | IMPORT_LOCK = 53, |
| 228 | INTENT_PICKER = 54, |
| 229 | INVERT = 55, |
| 230 | JAVA_SCRIPT = 56, |
| 231 | JAVA_SCRIPT_APP_MODAL_X11 = 57, |
| 232 | LOGIN_HANDLER = 58, |
| 233 | MANAGE_PASSWORDS = 59, |
| 234 | MEDIA_GALLERIES = 60, |
| 235 | MULTIPROFILES_INTRO = 61, |
| 236 | MULTIPROFILES_SESSION_ABORTED = 62, |
| 237 | NATIVE_CONTAINER = 63, |
| 238 | NETWORK_CONFIG = 64, |
| 239 | PERMISSIONS = 65, |
| 240 | PLATFORM_KEYS_CERTIFICATE_SELECTOR = 66, |
| 241 | PLATFORM_VERIFICATION = 67, |
| 242 | PROXIMITY_AUTH_ERROR = 68, |
| 243 | REQUEST_PIN = 69, |
| 244 | SSL_CLIENT_CERTIFICATE_SELECTOR = 70, |
| 245 | SIMPLE_MESSAGE_BOX = 71, |
| 246 | TAB_MODAL_CONFIRM = 72, |
| 247 | TASK_MANAGER = 73, |
| 248 | TELEPORT_WARNING = 74, |
| 249 | USER_MANAGER = 75, |
| 250 | USER_MANAGER_PROFILE = 76, |
| 251 | VALIDATION_MESSAGE = 77, |
| 252 | WEB_SHARE_TARGET_PICKER = 78, |
| 253 | ZOOM = 79, |
Toni Barzic | 06919754 | 2017-10-17 22:08:01 | [diff] [blame] | 254 | LOCK_SCREEN_NOTE_APP_TOAST = 80, |
Michael McGreevy | 556227a5 | 2017-11-16 07:47:24 | [diff] [blame] | 255 | PWA_CONFIRMATION = 81, |
Greg Thompson | 875403e0 | 2018-02-27 16:22:52 | [diff] [blame] | 256 | RELAUNCH_RECOMMENDED = 82, |
Timothy Loh | 74cf13c2 | 2018-03-01 06:56:24 | [diff] [blame] | 257 | CROSTINI_INSTALLER = 83, |
Greg Thompson | 27aef5f | 2018-03-05 22:10:37 | [diff] [blame] | 258 | RELAUNCH_REQUIRED = 84, |
Thomas Tangl | 9e916b23 | 2018-04-18 13:07:48 | [diff] [blame] | 259 | UNITY_SYNC_CONSENT_BUMP = 85, |
Nicholas Verne | 26965d8 | 2018-05-01 02:07:03 | [diff] [blame] | 260 | CROSTINI_UNINSTALLER = 86, |
Min Qin | 7b7cbbbf | 2018-06-04 21:49:31 | [diff] [blame] | 261 | DOWNLOAD_OPEN_CONFIRMATION = 87, |
[email protected] | ef49be4 | 2018-07-12 17:54:12 | [diff] [blame] | 262 | ARC_DATA_REMOVAL_CONFIRMATION = 88, |
Nicholas Verne | bc9185c | 2018-09-13 06:16:01 | [diff] [blame] | 263 | CROSTINI_UPGRADE = 89, |
Jeffrey Cohen | 2e9d01a | 2018-10-11 17:30:39 | [diff] [blame] | 264 | HATS_BUBBLE = 90, |
Tim Zheng | c36d6a5 | 2018-10-27 01:05:38 | [diff] [blame] | 265 | CROSTINI_APP_RESTART = 91, |
Ramin Halavati | 83d91ec0 | 2018-10-30 08:10:10 | [diff] [blame] | 266 | INCOGNITO_WINDOW_COUNTER = 92, |
Ian Barkley-Yeung | 42f06e96 | 2018-12-14 03:00:41 | [diff] [blame] | 267 | CROSTINI_APP_UNINSTALLER = 93, |
Josh Pratt | f80ffb8 | 2019-01-22 07:13:51 | [diff] [blame] | 268 | CROSTINI_CONTAINER_UPGRADE = 94, |
| 269 | // Add values above this line with a corresponding label in |
| 270 | // tools/metrics/histograms/enums.xml |
pdyson | a8a9ea0 | 2017-04-20 00:00:15 | [diff] [blame] | 271 | MAX_VALUE |
| 272 | }; |
pdyson | 7872d6c0 | 2017-04-05 23:12:31 | [diff] [blame] | 273 | |
| 274 | // Record an UMA metric counting the creation of a dialog box of this type. |
| 275 | void RecordDialogCreation(DialogIdentifier identifier); |
| 276 | |
alito | e82b14b | 2017-04-06 23:11:29 | [diff] [blame] | 277 | #if defined(OS_WIN) |
| 278 | |
Ali Tofigh | 525f78bdd | 2017-09-15 15:37:20 | [diff] [blame] | 279 | // Shows the settings reset prompt dialog asking the user if they want to reset |
| 280 | // some of their settings. |
| 281 | void ShowSettingsResetPrompt( |
| 282 | Browser* browser, |
| 283 | safe_browsing::SettingsResetPromptController* controller); |
| 284 | |
alito | e82b14b | 2017-04-06 23:11:29 | [diff] [blame] | 285 | // Shows the Chrome Cleanup dialog asking the user if they want to clean their |
| 286 | // system from unwanted software. This is called when unwanted software has been |
| 287 | // detected on the system. |
alito | f8f753f6 | 2017-04-28 23:04:10 | [diff] [blame] | 288 | void ShowChromeCleanerPrompt( |
| 289 | Browser* browser, |
Ali Tofigh | f5baba98 | 2017-07-21 23:15:23 | [diff] [blame] | 290 | safe_browsing::ChromeCleanerDialogController* dialog_controller, |
| 291 | safe_browsing::ChromeCleanerController* cleaner_controller); |
alito | e82b14b | 2017-04-06 23:11:29 | [diff] [blame] | 292 | |
Fabio Tirelo | 8825aab4 | 2017-10-19 13:23:31 | [diff] [blame] | 293 | // Shows the Chrome Cleanup reboot dialog asking the user if they want to |
| 294 | // restart their computer once a cleanup has finished. This is called when the |
| 295 | // Chrome Cleanup ends in a reboot required state. |
| 296 | void ShowChromeCleanerRebootPrompt( |
| 297 | Browser* browser, |
| 298 | safe_browsing::ChromeCleanerRebootDialogController* dialog_controller); |
| 299 | |
alito | e82b14b | 2017-04-06 23:11:29 | [diff] [blame] | 300 | #endif // OS_WIN |
| 301 | |
[email protected] | 87586fb7 | 2012-07-02 13:15:02 | [diff] [blame] | 302 | } // namespace chrome |
[email protected] | c96531e8 | 2011-01-26 03:11:14 | [diff] [blame] | 303 | |
Peter Boström | 2a02a69 | 2018-02-22 22:25:46 | [diff] [blame] | 304 | void ShowFolderUploadConfirmationDialog( |
| 305 | const base::FilePath& path, |
| 306 | base::OnceCallback<void(const std::vector<ui::SelectedFileInfo>&)> callback, |
| 307 | std::vector<ui::SelectedFileInfo> selected_files, |
| 308 | content::WebContents* web_contents); |
| 309 | |
[email protected] | c96531e8 | 2011-01-26 03:11:14 | [diff] [blame] | 310 | #endif // CHROME_BROWSER_UI_BROWSER_DIALOGS_H_ |