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

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

Issue 2711623003: Update infobars to use VectorIcon struct instead of VectorIconId. (Closed)
Patch Set: rebase Created 3 years, 9 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
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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/pepper_broker_infobar_delegate.cc ('k') | chrome/browser/plugins/plugin_infobar_delegates.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698