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

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: Rebasing Created 5 years 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 std::string GeolocationInfoBarDelegateAndroid::GetIdentifier() const {
40 return "GeolocationInfoBarDelegateAndroid";
41 }
42
39 int GeolocationInfoBarDelegateAndroid::GetIconId() const { 43 int GeolocationInfoBarDelegateAndroid::GetIconId() const {
40 return IDR_ANDROID_INFOBAR_GEOLOCATION; 44 return IDR_ANDROID_INFOBAR_GEOLOCATION;
41 } 45 }
42 46
43 base::string16 GeolocationInfoBarDelegateAndroid::GetMessageText() const { 47 base::string16 GeolocationInfoBarDelegateAndroid::GetMessageText() const {
44 return l10n_util::GetStringFUTF16(IDS_GEOLOCATION_INFOBAR_QUESTION, 48 return l10n_util::GetStringFUTF16(IDS_GEOLOCATION_INFOBAR_QUESTION,
45 url_formatter::FormatUrlForSecurityDisplay( 49 url_formatter::FormatUrlForSecurityDisplay(
46 requesting_frame_, display_languages_)); 50 requesting_frame_, display_languages_));
47 } 51 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698