OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_INFOBARS_CORE_INFOBAR_DELEGATE_H_ | 5 #ifndef COMPONENTS_INFOBARS_CORE_INFOBAR_DELEGATE_H_ |
6 #define COMPONENTS_INFOBARS_CORE_INFOBAR_DELEGATE_H_ | 6 #define COMPONENTS_INFOBARS_CORE_INFOBAR_DELEGATE_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 enum InfoBarAutomationType { | 56 enum InfoBarAutomationType { |
57 CONFIRM_INFOBAR, | 57 CONFIRM_INFOBAR, |
58 PASSWORD_INFOBAR, | 58 PASSWORD_INFOBAR, |
59 RPH_INFOBAR, | 59 RPH_INFOBAR, |
60 UNKNOWN_INFOBAR, | 60 UNKNOWN_INFOBAR, |
61 }; | 61 }; |
62 | 62 |
63 // Unique identifier for every InfoBarDelegate subclass. | 63 // Unique identifier for every InfoBarDelegate subclass. |
64 // KEEP IN SYNC WITH THE InfoBarIdentifier ENUM IN histograms.xml. | 64 // KEEP IN SYNC WITH THE InfoBarIdentifier ENUM IN histograms.xml. |
65 // NEW VALUES MUST BE APPENDED AND AVOID CHANGING ANY PRE-EXISTING VALUES. | 65 // NEW VALUES MUST BE APPENDED AND AVOID CHANGING ANY PRE-EXISTING VALUES. |
| 66 // A Java counterpart will be generated for this enum. |
| 67 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.infobar |
66 enum InfoBarIdentifier { | 68 enum InfoBarIdentifier { |
67 INVALID = -1, | 69 INVALID = -1, |
68 TEST_INFOBAR = 0, | 70 TEST_INFOBAR = 0, |
69 APP_BANNER_INFOBAR_DELEGATE_ANDROID = 1, | 71 APP_BANNER_INFOBAR_DELEGATE_ANDROID = 1, |
70 APP_BANNER_INFOBAR_DELEGATE_DESKTOP = 2, | 72 APP_BANNER_INFOBAR_DELEGATE_DESKTOP = 2, |
71 ANDROID_DOWNLOAD_MANAGER_OVERWRITE_INFOBAR_DELEGATE = 3, | 73 ANDROID_DOWNLOAD_MANAGER_OVERWRITE_INFOBAR_DELEGATE = 3, |
72 CHROME_DOWNLOAD_MANAGER_OVERWRITE_INFOBAR_DELEGATE = 4, | 74 CHROME_DOWNLOAD_MANAGER_OVERWRITE_INFOBAR_DELEGATE = 4, |
73 DOWNLOAD_REQUEST_INFOBAR_DELEGATE_ANDROID = 5, | 75 DOWNLOAD_REQUEST_INFOBAR_DELEGATE_ANDROID = 5, |
74 FULLSCREEN_INFOBAR_DELEGATE = 6, | 76 FULLSCREEN_INFOBAR_DELEGATE = 6, |
75 HUNG_PLUGIN_INFOBAR_DELEGATE = 7, | 77 HUNG_PLUGIN_INFOBAR_DELEGATE = 7, |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 AUTOFILL_CC_INFOBAR_DELEGATE = 49, | 119 AUTOFILL_CC_INFOBAR_DELEGATE = 49, |
118 TRANSLATE_INFOBAR_DELEGATE = 50, | 120 TRANSLATE_INFOBAR_DELEGATE = 50, |
119 IOS_CHROME_SAVE_PASSWORD_INFOBAR_DELEGATE = 51, | 121 IOS_CHROME_SAVE_PASSWORD_INFOBAR_DELEGATE = 51, |
120 NATIVE_APP_INSTALLER_INFOBAR_DELEGATE = 52, | 122 NATIVE_APP_INSTALLER_INFOBAR_DELEGATE = 52, |
121 NATIVE_APP_LAUNCHER_INFOBAR_DELEGATE = 53, | 123 NATIVE_APP_LAUNCHER_INFOBAR_DELEGATE = 53, |
122 NATIVE_APP_OPEN_POLICY_INFOBAR_DELEGATE = 54, | 124 NATIVE_APP_OPEN_POLICY_INFOBAR_DELEGATE = 54, |
123 RE_SIGN_IN_INFOBAR_DELEGATE = 55, | 125 RE_SIGN_IN_INFOBAR_DELEGATE = 55, |
124 SHOW_PASSKIT_INFOBAR_ERROR_DELEGATE = 56, | 126 SHOW_PASSKIT_INFOBAR_ERROR_DELEGATE = 56, |
125 READER_MODE_INFOBAR_DELEGATE = 57, | 127 READER_MODE_INFOBAR_DELEGATE = 57, |
126 SYNC_ERROR_INFOBAR_DELEGATE = 58, | 128 SYNC_ERROR_INFOBAR_DELEGATE = 58, |
127 UPGRADE_INFOBAR_DELEGATE = 59 | 129 UPGRADE_INFOBAR_DELEGATE = 59, |
| 130 CHROME_WINDOW_ERROR = 60, |
| 131 CONFIRM_DANGEROUS_DOWNLOAD = 61, |
128 }; | 132 }; |
129 | 133 |
130 // Describes navigation events, used to decide whether infobars should be | 134 // Describes navigation events, used to decide whether infobars should be |
131 // dismissed. | 135 // dismissed. |
132 struct NavigationDetails { | 136 struct NavigationDetails { |
133 // Unique identifier for the entry. | 137 // Unique identifier for the entry. |
134 int entry_id; | 138 int entry_id; |
135 // True if it is a navigation to a different page (as opposed to in-page). | 139 // True if it is a navigation to a different page (as opposed to in-page). |
136 bool is_navigation_to_different_page; | 140 bool is_navigation_to_different_page; |
137 // True if the entry replaced the existing one. | 141 // True if the entry replaced the existing one. |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 | 230 |
227 // The ID of the active navigation entry at the time we became owned. | 231 // The ID of the active navigation entry at the time we became owned. |
228 int nav_entry_id_; | 232 int nav_entry_id_; |
229 | 233 |
230 DISALLOW_COPY_AND_ASSIGN(InfoBarDelegate); | 234 DISALLOW_COPY_AND_ASSIGN(InfoBarDelegate); |
231 }; | 235 }; |
232 | 236 |
233 } // namespace infobars | 237 } // namespace infobars |
234 | 238 |
235 #endif // COMPONENTS_INFOBARS_CORE_INFOBAR_DELEGATE_H_ | 239 #endif // COMPONENTS_INFOBARS_CORE_INFOBAR_DELEGATE_H_ |
OLD | NEW |