| 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 CHROME_BROWSER_UI_BROWSER_DIALOGS_H_ | 5 #ifndef CHROME_BROWSER_UI_BROWSER_DIALOGS_H_ |
| 6 #define CHROME_BROWSER_UI_BROWSER_DIALOGS_H_ | 6 #define CHROME_BROWSER_UI_BROWSER_DIALOGS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 }; | 183 }; |
| 184 | 184 |
| 185 #endif // OS_MACOSX | 185 #endif // OS_MACOSX |
| 186 | 186 |
| 187 #endif // TOOLKIT_VIEWS | 187 #endif // TOOLKIT_VIEWS |
| 188 | 188 |
| 189 // Values used in the Dialog.Creation UMA metric. Each value represents a | 189 // Values used in the Dialog.Creation UMA metric. Each value represents a |
| 190 // different type of dialog box. | 190 // different type of dialog box. |
| 191 // These values are written to logs. New enum values can be added, but existing | 191 // These values are written to logs. New enum values can be added, but existing |
| 192 // enums must never be renumbered or deleted and reused. | 192 // enums must never be renumbered or deleted and reused. |
| 193 enum class DialogIdentifier { UNKNOWN = 0, TRANSLATE = 1, MAX_VALUE }; | 193 enum class DialogIdentifier { |
| 194 UNKNOWN = 0, |
| 195 TRANSLATE = 1, |
| 196 BOOKMARK = 2, |
| 197 BOOKMARK_EDITOR = 3, |
| 198 SCREENSHARE = 4, |
| 199 OUTDATED_UPGRADE = 5, |
| 200 ONE_CLICK_SIGNIN = 6, |
| 201 LINK_CHROME_DATA = 7, |
| 202 HUNG_RENDERER = 8, |
| 203 SESSION_CRASHED = 9, |
| 204 ASK_GOOGLE_FOR_SUGGESTIONS = 10, |
| 205 UPDATE_RECOMMENDED = 11, |
| 206 CRYPTO_PASSWORD = 12, |
| 207 SAFE_BROWSING_DOWNLOAD_FEEDBACK = 13, |
| 208 FIRST_RUN = 14, |
| 209 NETWORK_SHARE_PROFILE_WARNING = 15, |
| 210 CONFLICTING_MODULE = 16, |
| 211 CRITICAL_UPGRADE_INSTALLED = 17, |
| 212 IME_ACTIVATION = 18, |
| 213 MAX_VALUE |
| 214 }; |
| 194 | 215 |
| 195 // Record an UMA metric counting the creation of a dialog box of this type. | 216 // Record an UMA metric counting the creation of a dialog box of this type. |
| 196 void RecordDialogCreation(DialogIdentifier identifier); | 217 void RecordDialogCreation(DialogIdentifier identifier); |
| 197 | 218 |
| 198 } // namespace chrome | 219 } // namespace chrome |
| 199 | 220 |
| 200 #if defined(OS_CHROMEOS) | 221 #if defined(OS_CHROMEOS) |
| 201 | 222 |
| 202 // This callback informs the package name of the app selected by the user, along | 223 // This callback informs the package name of the app selected by the user, along |
| 203 // with the reason why the Bubble was closed. The string param must have a valid | 224 // with the reason why the Bubble was closed. The string param must have a valid |
| 204 // package name, except when the CloseReason is ERROR or DIALOG_DEACTIVATED, for | 225 // package name, except when the CloseReason is ERROR or DIALOG_DEACTIVATED, for |
| 205 // these cases we return a dummy value which won't be used at all and has no | 226 // these cases we return a dummy value which won't be used at all and has no |
| 206 // significance. | 227 // significance. |
| 207 using IntentPickerResponse = | 228 using IntentPickerResponse = |
| 208 base::Callback<void(const std::string&, | 229 base::Callback<void(const std::string&, |
| 209 arc::ArcNavigationThrottle::CloseReason)>; | 230 arc::ArcNavigationThrottle::CloseReason)>; |
| 210 | 231 |
| 211 // Return a pointer to the IntentPickerBubbleView::ShowBubble method. | 232 // Return a pointer to the IntentPickerBubbleView::ShowBubble method. |
| 212 using BubbleShowPtr = | 233 using BubbleShowPtr = |
| 213 void (*)(content::WebContents*, | 234 void (*)(content::WebContents*, |
| 214 const std::vector<arc::ArcNavigationThrottle::AppInfo>&, | 235 const std::vector<arc::ArcNavigationThrottle::AppInfo>&, |
| 215 const IntentPickerResponse&); | 236 const IntentPickerResponse&); |
| 216 | 237 |
| 217 BubbleShowPtr ShowIntentPickerBubble(); | 238 BubbleShowPtr ShowIntentPickerBubble(); |
| 218 | 239 |
| 219 #endif // OS_CHROMEOS | 240 #endif // OS_CHROMEOS |
| 220 | 241 |
| 221 #endif // CHROME_BROWSER_UI_BROWSER_DIALOGS_H_ | 242 #endif // CHROME_BROWSER_UI_BROWSER_DIALOGS_H_ |
| OLD | NEW |