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

Side by Side Diff: chrome/browser/geolocation/geolocation_infobar_delegate_android.cc

Issue 1520543004: Add method for identifying different InfoBars (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nit again Created 4 years, 11 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 #include "chrome/browser/geolocation/geolocation_infobar_delegate_android.h" 5 #include "chrome/browser/geolocation/geolocation_infobar_delegate_android.h"
6 6
7 #include "chrome/browser/android/android_theme_resources.h" 7 #include "chrome/browser/android/android_theme_resources.h"
8 #include "chrome/browser/infobars/infobar_service.h" 8 #include "chrome/browser/infobars/infobar_service.h"
9 #include "chrome/grit/generated_resources.h" 9 #include "chrome/grit/generated_resources.h"
10 #include "components/infobars/core/infobar.h" 10 #include "components/infobars/core/infobar.h"
(...skipping 18 matching lines...) Expand all
29 const PermissionSetCallback& callback) 29 const PermissionSetCallback& callback)
30 : PermissionInfobarDelegate(requesting_frame, 30 : PermissionInfobarDelegate(requesting_frame,
31 content::PermissionType::GEOLOCATION, 31 content::PermissionType::GEOLOCATION,
32 CONTENT_SETTINGS_TYPE_GEOLOCATION, 32 CONTENT_SETTINGS_TYPE_GEOLOCATION,
33 callback), 33 callback),
34 requesting_frame_(requesting_frame), 34 requesting_frame_(requesting_frame),
35 display_languages_(display_languages) {} 35 display_languages_(display_languages) {}
36 36
37 GeolocationInfoBarDelegateAndroid::~GeolocationInfoBarDelegateAndroid() {} 37 GeolocationInfoBarDelegateAndroid::~GeolocationInfoBarDelegateAndroid() {}
38 38
39 infobars::InfoBarDelegate::InfoBarIdentifier
40 GeolocationInfoBarDelegateAndroid::GetIdentifier() const {
41 return GEOLOCATION_INFOBAR_DELEGATE_ANDROID;
42 }
43
39 int GeolocationInfoBarDelegateAndroid::GetIconId() const { 44 int GeolocationInfoBarDelegateAndroid::GetIconId() const {
40 return IDR_ANDROID_INFOBAR_GEOLOCATION; 45 return IDR_ANDROID_INFOBAR_GEOLOCATION;
41 } 46 }
42 47
43 base::string16 GeolocationInfoBarDelegateAndroid::GetMessageText() const { 48 base::string16 GeolocationInfoBarDelegateAndroid::GetMessageText() const {
44 return l10n_util::GetStringFUTF16(IDS_GEOLOCATION_INFOBAR_QUESTION, 49 return l10n_util::GetStringFUTF16(IDS_GEOLOCATION_INFOBAR_QUESTION,
45 url_formatter::FormatUrlForSecurityDisplay( 50 url_formatter::FormatUrlForSecurityDisplay(
46 requesting_frame_, display_languages_)); 51 requesting_frame_, display_languages_));
47 } 52 }
OLDNEW
« no previous file with comments | « chrome/browser/geolocation/geolocation_infobar_delegate_android.h ('k') | chrome/browser/gpu/three_d_api_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698