| OLD | NEW |
| 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 #include "chrome/browser/permissions/permission_infobar_delegate.h" | 5 #include "chrome/browser/permissions/permission_infobar_delegate.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 #include "chrome/browser/geolocation/geolocation_infobar_delegate_android.h" | 10 #include "chrome/browser/geolocation/geolocation_infobar_delegate_android.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 switch (type) { | 50 switch (type) { |
| 51 case content::PermissionType::GEOLOCATION: | 51 case content::PermissionType::GEOLOCATION: |
| 52 return std::unique_ptr<PermissionInfoBarDelegate>( | 52 return std::unique_ptr<PermissionInfoBarDelegate>( |
| 53 new GeolocationInfoBarDelegateAndroid( | 53 new GeolocationInfoBarDelegateAndroid( |
| 54 requesting_frame, user_gesture, profile, callback)); | 54 requesting_frame, user_gesture, profile, callback)); |
| 55 #if defined(ENABLE_NOTIFICATIONS) | 55 #if defined(ENABLE_NOTIFICATIONS) |
| 56 case content::PermissionType::NOTIFICATIONS: | 56 case content::PermissionType::NOTIFICATIONS: |
| 57 case content::PermissionType::PUSH_MESSAGING: | 57 case content::PermissionType::PUSH_MESSAGING: |
| 58 return std::unique_ptr<PermissionInfoBarDelegate>( | 58 return std::unique_ptr<PermissionInfoBarDelegate>( |
| 59 new NotificationPermissionInfoBarDelegate( | 59 new NotificationPermissionInfoBarDelegate( |
| 60 requesting_frame, user_gesture, profile, callback)); | 60 type, requesting_frame, user_gesture, profile, callback)); |
| 61 #endif // ENABLE_NOTIFICATIONS | 61 #endif // ENABLE_NOTIFICATIONS |
| 62 case content::PermissionType::MIDI_SYSEX: | 62 case content::PermissionType::MIDI_SYSEX: |
| 63 return std::unique_ptr<PermissionInfoBarDelegate>( | 63 return std::unique_ptr<PermissionInfoBarDelegate>( |
| 64 new MidiPermissionInfoBarDelegateAndroid( | 64 new MidiPermissionInfoBarDelegateAndroid( |
| 65 requesting_frame, user_gesture, profile, callback)); | 65 requesting_frame, user_gesture, profile, callback)); |
| 66 case content::PermissionType::PROTECTED_MEDIA_IDENTIFIER: | 66 case content::PermissionType::PROTECTED_MEDIA_IDENTIFIER: |
| 67 return std::unique_ptr<PermissionInfoBarDelegate>( | 67 return std::unique_ptr<PermissionInfoBarDelegate>( |
| 68 new ProtectedMediaIdentifierInfoBarDelegateAndroid( | 68 new ProtectedMediaIdentifierInfoBarDelegateAndroid( |
| 69 requesting_frame, user_gesture, profile, callback)); | 69 requesting_frame, user_gesture, profile, callback)); |
| 70 default: | 70 default: |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 PermissionInfoBarDelegate* | 160 PermissionInfoBarDelegate* |
| 161 PermissionInfoBarDelegate::AsPermissionInfoBarDelegate() { | 161 PermissionInfoBarDelegate::AsPermissionInfoBarDelegate() { |
| 162 return this; | 162 return this; |
| 163 } | 163 } |
| 164 | 164 |
| 165 void PermissionInfoBarDelegate::SetPermission(bool update_content_setting, | 165 void PermissionInfoBarDelegate::SetPermission(bool update_content_setting, |
| 166 PermissionAction decision) { | 166 PermissionAction decision) { |
| 167 action_taken_ = true; | 167 action_taken_ = true; |
| 168 callback_.Run(update_content_setting, decision); | 168 callback_.Run(update_content_setting, decision); |
| 169 } | 169 } |
| OLD | NEW |