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" |
11 #include "grit/generated_resources.h" | 11 #include "grit/generated_resources.h" |
12 | 12 |
13 // static | 13 // static |
14 infobars::InfoBar* GeolocationInfoBarDelegateAndroid::Create( | 14 infobars::InfoBar* GeolocationInfoBarDelegateAndroid::Create( |
15 InfoBarService* infobar_service, | 15 InfoBarService* infobar_service, |
16 const GURL& requesting_frame, | 16 const GURL& requesting_frame, |
17 bool user_gesture, | 17 bool user_gesture, |
18 Profile* profile, | 18 Profile* profile, |
19 const PermissionSetCallback& callback) { | 19 const PermissionSetCallback& callback) { |
20 return infobar_service->AddInfoBar(infobar_service->CreateConfirmInfoBar( | 20 return infobar_service->AddInfoBar( |
21 std::unique_ptr<ConfirmInfoBarDelegate>( | 21 CreatePermissionInfoBar(std::unique_ptr<PermissionInfobarDelegate>( |
22 new GeolocationInfoBarDelegateAndroid(requesting_frame, user_gesture, | 22 new GeolocationInfoBarDelegateAndroid(requesting_frame, user_gesture, |
23 profile, callback)))); | 23 profile, callback)))); |
24 } | 24 } |
25 | 25 |
26 GeolocationInfoBarDelegateAndroid::GeolocationInfoBarDelegateAndroid( | 26 GeolocationInfoBarDelegateAndroid::GeolocationInfoBarDelegateAndroid( |
27 const GURL& requesting_frame, | 27 const GURL& requesting_frame, |
28 bool user_gesture, | 28 bool user_gesture, |
29 Profile* profile, | 29 Profile* profile, |
30 const PermissionSetCallback& callback) | 30 const PermissionSetCallback& callback) |
31 : PermissionInfobarDelegate(requesting_frame, | 31 : PermissionInfobarDelegate(requesting_frame, |
(...skipping 11 matching lines...) Expand all Loading... |
43 return GEOLOCATION_INFOBAR_DELEGATE_ANDROID; | 43 return GEOLOCATION_INFOBAR_DELEGATE_ANDROID; |
44 } | 44 } |
45 | 45 |
46 int GeolocationInfoBarDelegateAndroid::GetIconId() const { | 46 int GeolocationInfoBarDelegateAndroid::GetIconId() const { |
47 return IDR_ANDROID_INFOBAR_GEOLOCATION; | 47 return IDR_ANDROID_INFOBAR_GEOLOCATION; |
48 } | 48 } |
49 | 49 |
50 int GeolocationInfoBarDelegateAndroid::GetMessageResourceId() const { | 50 int GeolocationInfoBarDelegateAndroid::GetMessageResourceId() const { |
51 return IDS_GEOLOCATION_INFOBAR_QUESTION; | 51 return IDS_GEOLOCATION_INFOBAR_QUESTION; |
52 } | 52 } |
OLD | NEW |