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

Side by Side Diff: chrome/browser/permissions/permission_request_impl.cc

Issue 2339863002: Use vector of PermissionRequest instead of ContentSettingsTypes for GroupedPermissionInfoBarDelegate (Closed)
Patch Set: fix patch failure Created 4 years, 2 months 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
« no previous file with comments | « chrome/browser/permissions/permission_request_impl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 NOTREACHED(); 143 NOTREACHED();
144 return PermissionRequestType::UNKNOWN; 144 return PermissionRequestType::UNKNOWN;
145 } 145 }
146 } 146 }
147 147
148 PermissionRequestGestureType PermissionRequestImpl::GetGestureType() 148 PermissionRequestGestureType PermissionRequestImpl::GetGestureType()
149 const { 149 const {
150 return has_gesture_ ? PermissionRequestGestureType::GESTURE 150 return has_gesture_ ? PermissionRequestGestureType::GESTURE
151 : PermissionRequestGestureType::NO_GESTURE; 151 : PermissionRequestGestureType::NO_GESTURE;
152 } 152 }
153
154 ContentSettingsType PermissionRequestImpl::GetContentSettingsType() const {
155 switch (permission_type_) {
156 case content::PermissionType::GEOLOCATION:
157 return CONTENT_SETTINGS_TYPE_GEOLOCATION;
158 case content::PermissionType::PUSH_MESSAGING:
159 #if defined(ENABLE_NOTIFICATIONS)
160 case content::PermissionType::NOTIFICATIONS:
161 #endif
162 return CONTENT_SETTINGS_TYPE_NOTIFICATIONS;
163 case content::PermissionType::MIDI_SYSEX:
164 return CONTENT_SETTINGS_TYPE_MIDI_SYSEX;
165 #if defined(OS_CHROMEOS)
166 case content::PermissionType::PROTECTED_MEDIA_IDENTIFIER:
167 return CONTENT_SETTINGS_TYPE_PROTECTED_MEDIA_IDENTIFIER;
168 #endif
169 case content::PermissionType::FLASH:
170 return CONTENT_SETTINGS_TYPE_PLUGINS;
171 default:
172 NOTREACHED();
173 return CONTENT_SETTINGS_TYPE_DEFAULT;
174 }
175 }
OLDNEW
« no previous file with comments | « chrome/browser/permissions/permission_request_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698