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

Side by Side Diff: chrome/browser/ui/website_settings/website_settings.cc

Issue 2458453002: [sensors] Add Permission guard to the generic sensor apis.
Patch Set: Fix mikhail's comments Created 4 years, 1 month 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ui/website_settings/website_settings.h" 5 #include "chrome/browser/ui/website_settings/website_settings.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 #if !defined(OS_ANDROID) 105 #if !defined(OS_ANDROID)
106 CONTENT_SETTINGS_TYPE_PLUGINS, 106 CONTENT_SETTINGS_TYPE_PLUGINS,
107 CONTENT_SETTINGS_TYPE_IMAGES, 107 CONTENT_SETTINGS_TYPE_IMAGES,
108 #endif 108 #endif
109 CONTENT_SETTINGS_TYPE_POPUPS, 109 CONTENT_SETTINGS_TYPE_POPUPS,
110 CONTENT_SETTINGS_TYPE_BACKGROUND_SYNC, 110 CONTENT_SETTINGS_TYPE_BACKGROUND_SYNC,
111 CONTENT_SETTINGS_TYPE_KEYGEN, 111 CONTENT_SETTINGS_TYPE_KEYGEN,
112 CONTENT_SETTINGS_TYPE_AUTOMATIC_DOWNLOADS, 112 CONTENT_SETTINGS_TYPE_AUTOMATIC_DOWNLOADS,
113 CONTENT_SETTINGS_TYPE_AUTOPLAY, 113 CONTENT_SETTINGS_TYPE_AUTOPLAY,
114 CONTENT_SETTINGS_TYPE_MIDI_SYSEX, 114 CONTENT_SETTINGS_TYPE_MIDI_SYSEX,
115 CONTENT_SETTINGS_TYPE_SENSORS,
115 }; 116 };
116 117
117 // Determines whether to show permission |type| in the Website Settings UI. Only 118 // Determines whether to show permission |type| in the Website Settings UI. Only
118 // applies to permissions listed in |kPermissionType|. 119 // applies to permissions listed in |kPermissionType|.
119 bool ShouldShowPermission(ContentSettingsType type) { 120 bool ShouldShowPermission(ContentSettingsType type) {
120 #if !defined(OS_ANDROID) 121 #if !defined(OS_ANDROID)
121 // Autoplay is Android-only at the moment. 122 // Autoplay is Android-only at the moment.
122 if (type == CONTENT_SETTINGS_TYPE_AUTOPLAY) 123 if (type == CONTENT_SETTINGS_TYPE_AUTOPLAY)
123 return false; 124 return false;
124 #endif 125 #endif
(...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after
827 info.connection_status = site_connection_status_; 828 info.connection_status = site_connection_status_;
828 info.connection_status_description = 829 info.connection_status_description =
829 UTF16ToUTF8(site_connection_details_); 830 UTF16ToUTF8(site_connection_details_);
830 info.identity_status = site_identity_status_; 831 info.identity_status = site_identity_status_;
831 info.identity_status_description = 832 info.identity_status_description =
832 UTF16ToUTF8(site_identity_details_); 833 UTF16ToUTF8(site_identity_details_);
833 info.certificate = certificate_; 834 info.certificate = certificate_;
834 info.show_ssl_decision_revoke_button = show_ssl_decision_revoke_button_; 835 info.show_ssl_decision_revoke_button = show_ssl_decision_revoke_button_;
835 ui_->SetIdentityInfo(info); 836 ui_->SetIdentityInfo(info);
836 } 837 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698