OLD | NEW |
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 Loading... |
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 } |
OLD | NEW |