| 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_request_impl.h" | 5 #include "chrome/browser/permissions/permission_request_impl.h" |
| 6 | 6 |
| 7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 #include "chrome/browser/permissions/permission_decision_auto_blocker.h" | 8 #include "chrome/browser/permissions/permission_decision_auto_blocker.h" |
| 9 #include "chrome/browser/permissions/permission_uma_util.h" | 9 #include "chrome/browser/permissions/permission_uma_util.h" |
| 10 #include "chrome/browser/permissions/permission_util.h" | 10 #include "chrome/browser/permissions/permission_util.h" |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 return ui::kVideocamIcon; | 95 return ui::kVideocamIcon; |
| 96 default: | 96 default: |
| 97 NOTREACHED(); | 97 NOTREACHED(); |
| 98 return kExtensionIcon; | 98 return kExtensionIcon; |
| 99 } | 99 } |
| 100 #endif | 100 #endif |
| 101 } | 101 } |
| 102 | 102 |
| 103 #if defined(OS_ANDROID) | 103 #if defined(OS_ANDROID) |
| 104 base::string16 PermissionRequestImpl::GetMessageText() const { | 104 base::string16 PermissionRequestImpl::GetMessageText() const { |
| 105 // This is currently only used for modal dialogs on Android. | |
| 106 int message_id; | 105 int message_id; |
| 107 switch (content_settings_type_) { | 106 switch (content_settings_type_) { |
| 108 case CONTENT_SETTINGS_TYPE_GEOLOCATION: | 107 case CONTENT_SETTINGS_TYPE_GEOLOCATION: |
| 109 message_id = IDS_GEOLOCATION_INFOBAR_QUESTION; | 108 message_id = IDS_GEOLOCATION_INFOBAR_QUESTION; |
| 110 break; | 109 break; |
| 111 case CONTENT_SETTINGS_TYPE_NOTIFICATIONS: | 110 case CONTENT_SETTINGS_TYPE_NOTIFICATIONS: |
| 112 case CONTENT_SETTINGS_TYPE_PUSH_MESSAGING: | 111 case CONTENT_SETTINGS_TYPE_PUSH_MESSAGING: |
| 113 message_id = IDS_NOTIFICATION_PERMISSIONS; | 112 message_id = IDS_NOTIFICATION_PERMISSIONS; |
| 114 break; | 113 break; |
| 115 case CONTENT_SETTINGS_TYPE_MIDI_SYSEX: | 114 case CONTENT_SETTINGS_TYPE_MIDI_SYSEX: |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 } | 202 } |
| 204 | 203 |
| 205 PermissionRequestGestureType PermissionRequestImpl::GetGestureType() | 204 PermissionRequestGestureType PermissionRequestImpl::GetGestureType() |
| 206 const { | 205 const { |
| 207 return PermissionUtil::GetGestureType(has_gesture_); | 206 return PermissionUtil::GetGestureType(has_gesture_); |
| 208 } | 207 } |
| 209 | 208 |
| 210 ContentSettingsType PermissionRequestImpl::GetContentSettingsType() const { | 209 ContentSettingsType PermissionRequestImpl::GetContentSettingsType() const { |
| 211 return content_settings_type_; | 210 return content_settings_type_; |
| 212 } | 211 } |
| OLD | NEW |