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

Side by Side Diff: components/infobars/core/infobar_delegate.h

Issue 2475213002: Update the Google Search geolocation disclosure to make it more obvious. (Closed)
Patch Set: Created 4 years, 1 month 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 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 16 matching lines...) Expand all
27 27
28 namespace offline_pages { 28 namespace offline_pages {
29 class OfflinePageInfoBarDelegate; 29 class OfflinePageInfoBarDelegate;
30 } 30 }
31 #endif 31 #endif
32 32
33 namespace translate { 33 namespace translate {
34 class TranslateInfoBarDelegate; 34 class TranslateInfoBarDelegate;
35 } 35 }
36 36
37 class SearchGeolocationDisclosureInfoBarDelegate;
38
37 namespace gfx { 39 namespace gfx {
38 class Image; 40 class Image;
39 enum class VectorIconId; 41 enum class VectorIconId;
40 } 42 }
41 43
42 namespace infobars { 44 namespace infobars {
43 45
44 class InfoBar; 46 class InfoBar;
45 47
46 // An interface implemented by objects wishing to control an InfoBar. 48 // An interface implemented by objects wishing to control an InfoBar.
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 // Removed: DESKTOP_SEARCH_REDIRECTION_INFOBAR_DELEGATE = 62, 138 // Removed: DESKTOP_SEARCH_REDIRECTION_INFOBAR_DELEGATE = 62,
137 UPDATE_PASSWORD_INFOBAR_DELEGATE = 63, 139 UPDATE_PASSWORD_INFOBAR_DELEGATE = 63,
138 DATA_REDUCTION_PROMO_INFOBAR_DELEGATE_ANDROID = 64, 140 DATA_REDUCTION_PROMO_INFOBAR_DELEGATE_ANDROID = 64,
139 AUTOFILL_CREDIT_CARD_FILLING_INFOBAR_DELEGATE_ANDROID = 65, 141 AUTOFILL_CREDIT_CARD_FILLING_INFOBAR_DELEGATE_ANDROID = 65,
140 SUBRESOURCE_FILTER_INFOBAR_DELEGATE_ANDROID = 66, 142 SUBRESOURCE_FILTER_INFOBAR_DELEGATE_ANDROID = 66,
141 INSTANT_APPS_INFOBAR_DELEGATE_ANDROID = 67, 143 INSTANT_APPS_INFOBAR_DELEGATE_ANDROID = 67,
142 DATA_REDUCTION_PROXY_PREVIEW_INFOBAR_DELEGATE = 68, 144 DATA_REDUCTION_PROXY_PREVIEW_INFOBAR_DELEGATE = 68,
143 SCREEN_CAPTURE_INFOBAR_DELEGATE_ANDROID = 69, 145 SCREEN_CAPTURE_INFOBAR_DELEGATE_ANDROID = 69,
144 GROUPED_PERMISSION_INFOBAR_DELEGATE_ANDROID = 70, 146 GROUPED_PERMISSION_INFOBAR_DELEGATE_ANDROID = 70,
145 OFFLINE_PAGE_INFOBAR_DELEGATE = 71, 147 OFFLINE_PAGE_INFOBAR_DELEGATE = 71,
148 SEARCH_GEOLOCATION_DISCLOSURE_INFOBAR_DELEGATE = 72,
gone 2016/11/04 23:21:49 You need to update histograms.xml.
benwells 2016/11/07 08:36:06 Done.
146 }; 149 };
147 150
148 // Describes navigation events, used to decide whether infobars should be 151 // Describes navigation events, used to decide whether infobars should be
149 // dismissed. 152 // dismissed.
150 struct NavigationDetails { 153 struct NavigationDetails {
151 // Unique identifier for the entry. 154 // Unique identifier for the entry.
152 int entry_id; 155 int entry_id;
153 // True if it is a navigation to a different page (as opposed to in-page). 156 // True if it is a navigation to a different page (as opposed to in-page).
154 bool is_navigation_to_different_page; 157 bool is_navigation_to_different_page;
155 // True if the entry replaced the existing one. 158 // True if the entry replaced the existing one.
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 virtual ScreenCaptureInfoBarDelegate* AsScreenCaptureInfoBarDelegate(); 225 virtual ScreenCaptureInfoBarDelegate* AsScreenCaptureInfoBarDelegate();
223 virtual ThemeInstalledInfoBarDelegate* AsThemePreviewInfobarDelegate(); 226 virtual ThemeInstalledInfoBarDelegate* AsThemePreviewInfobarDelegate();
224 virtual ThreeDAPIInfoBarDelegate* AsThreeDAPIInfoBarDelegate(); 227 virtual ThreeDAPIInfoBarDelegate* AsThreeDAPIInfoBarDelegate();
225 virtual translate::TranslateInfoBarDelegate* AsTranslateInfoBarDelegate(); 228 virtual translate::TranslateInfoBarDelegate* AsTranslateInfoBarDelegate();
226 #if defined(OS_ANDROID) 229 #if defined(OS_ANDROID)
227 virtual MediaStreamInfoBarDelegateAndroid* 230 virtual MediaStreamInfoBarDelegateAndroid*
228 AsMediaStreamInfoBarDelegateAndroid(); 231 AsMediaStreamInfoBarDelegateAndroid();
229 virtual MediaThrottleInfoBarDelegate* AsMediaThrottleInfoBarDelegate(); 232 virtual MediaThrottleInfoBarDelegate* AsMediaThrottleInfoBarDelegate();
230 virtual offline_pages::OfflinePageInfoBarDelegate* 233 virtual offline_pages::OfflinePageInfoBarDelegate*
231 AsOfflinePageInfoBarDelegate(); 234 AsOfflinePageInfoBarDelegate();
235 virtual SearchGeolocationDisclosureInfoBarDelegate*
236 AsSearchGeolocationDisclosureInfoBarDelegate();
232 #endif 237 #endif
233 238
234 void set_infobar(InfoBar* infobar) { infobar_ = infobar; } 239 void set_infobar(InfoBar* infobar) { infobar_ = infobar; }
235 void set_nav_entry_id(int nav_entry_id) { nav_entry_id_ = nav_entry_id; } 240 void set_nav_entry_id(int nav_entry_id) { nav_entry_id_ = nav_entry_id; }
236 241
237 protected: 242 protected:
238 InfoBarDelegate(); 243 InfoBarDelegate();
239 244
240 InfoBar* infobar() { return infobar_; } 245 InfoBar* infobar() { return infobar_; }
241 246
242 private: 247 private:
243 // The InfoBar associated with us. 248 // The InfoBar associated with us.
244 InfoBar* infobar_; 249 InfoBar* infobar_;
245 250
246 // The ID of the active navigation entry at the time we became owned. 251 // The ID of the active navigation entry at the time we became owned.
247 int nav_entry_id_; 252 int nav_entry_id_;
248 253
249 DISALLOW_COPY_AND_ASSIGN(InfoBarDelegate); 254 DISALLOW_COPY_AND_ASSIGN(InfoBarDelegate);
250 }; 255 };
251 256
252 } // namespace infobars 257 } // namespace infobars
253 258
254 #endif // COMPONENTS_INFOBARS_CORE_INFOBAR_DELEGATE_H_ 259 #endif // COMPONENTS_INFOBARS_CORE_INFOBAR_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698