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_uma_util.h" | 8 #include "chrome/browser/permissions/permission_uma_util.h" |
9 #include "chrome/browser/permissions/permission_util.h" | 9 #include "chrome/browser/permissions/permission_util.h" |
10 #include "chrome/grit/generated_resources.h" | 10 #include "chrome/grit/generated_resources.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 case CONTENT_SETTINGS_TYPE_PUSH_MESSAGING: | 69 case CONTENT_SETTINGS_TYPE_PUSH_MESSAGING: |
70 return ui::kNotificationsIcon; | 70 return ui::kNotificationsIcon; |
71 #if defined(OS_CHROMEOS) | 71 #if defined(OS_CHROMEOS) |
72 // TODO(xhwang): fix this icon, see crrev.com/863263007 | 72 // TODO(xhwang): fix this icon, see crrev.com/863263007 |
73 case CONTENT_SETTINGS_TYPE_PROTECTED_MEDIA_IDENTIFIER: | 73 case CONTENT_SETTINGS_TYPE_PROTECTED_MEDIA_IDENTIFIER: |
74 return kProductIcon; | 74 return kProductIcon; |
75 #endif | 75 #endif |
76 case CONTENT_SETTINGS_TYPE_MIDI_SYSEX: | 76 case CONTENT_SETTINGS_TYPE_MIDI_SYSEX: |
77 return ui::kMidiIcon; | 77 return ui::kMidiIcon; |
78 case CONTENT_SETTINGS_TYPE_PLUGINS: | 78 case CONTENT_SETTINGS_TYPE_PLUGINS: |
79 return ui::kExtensionIcon; | 79 return kExtensionIcon; |
80 default: | 80 default: |
81 NOTREACHED(); | 81 NOTREACHED(); |
82 return ui::kExtensionIcon; | 82 return kExtensionIcon; |
83 } | 83 } |
84 #endif | 84 #endif |
85 } | 85 } |
86 | 86 |
87 base::string16 PermissionRequestImpl::GetMessageTextFragment() const { | 87 base::string16 PermissionRequestImpl::GetMessageTextFragment() const { |
88 int message_id; | 88 int message_id; |
89 switch (content_settings_type_) { | 89 switch (content_settings_type_) { |
90 case CONTENT_SETTINGS_TYPE_GEOLOCATION: | 90 case CONTENT_SETTINGS_TYPE_GEOLOCATION: |
91 message_id = IDS_GEOLOCATION_INFOBAR_PERMISSION_FRAGMENT; | 91 message_id = IDS_GEOLOCATION_INFOBAR_PERMISSION_FRAGMENT; |
92 break; | 92 break; |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 | 143 |
144 PermissionRequestType PermissionRequestImpl::GetPermissionRequestType() | 144 PermissionRequestType PermissionRequestImpl::GetPermissionRequestType() |
145 const { | 145 const { |
146 return PermissionUtil::GetRequestType(content_settings_type_); | 146 return PermissionUtil::GetRequestType(content_settings_type_); |
147 } | 147 } |
148 | 148 |
149 PermissionRequestGestureType PermissionRequestImpl::GetGestureType() | 149 PermissionRequestGestureType PermissionRequestImpl::GetGestureType() |
150 const { | 150 const { |
151 return PermissionUtil::GetGestureType(has_gesture_); | 151 return PermissionUtil::GetGestureType(has_gesture_); |
152 } | 152 } |
OLD | NEW |