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

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: Remove resetPermission + Rebase Created 4 years 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 #if !defined(OS_ANDROID) 103 #if !defined(OS_ANDROID)
104 CONTENT_SETTINGS_TYPE_PLUGINS, 104 CONTENT_SETTINGS_TYPE_PLUGINS,
105 CONTENT_SETTINGS_TYPE_IMAGES, 105 CONTENT_SETTINGS_TYPE_IMAGES,
106 #endif 106 #endif
107 CONTENT_SETTINGS_TYPE_POPUPS, 107 CONTENT_SETTINGS_TYPE_POPUPS,
108 CONTENT_SETTINGS_TYPE_BACKGROUND_SYNC, 108 CONTENT_SETTINGS_TYPE_BACKGROUND_SYNC,
109 CONTENT_SETTINGS_TYPE_KEYGEN, 109 CONTENT_SETTINGS_TYPE_KEYGEN,
110 CONTENT_SETTINGS_TYPE_AUTOMATIC_DOWNLOADS, 110 CONTENT_SETTINGS_TYPE_AUTOMATIC_DOWNLOADS,
111 CONTENT_SETTINGS_TYPE_AUTOPLAY, 111 CONTENT_SETTINGS_TYPE_AUTOPLAY,
112 CONTENT_SETTINGS_TYPE_MIDI_SYSEX, 112 CONTENT_SETTINGS_TYPE_MIDI_SYSEX,
113 CONTENT_SETTINGS_TYPE_SENSORS,
113 }; 114 };
114 115
115 // Determines whether to show permission |type| in the Website Settings UI. Only 116 // Determines whether to show permission |type| in the Website Settings UI. Only
116 // applies to permissions listed in |kPermissionType|. 117 // applies to permissions listed in |kPermissionType|.
117 bool ShouldShowPermission(ContentSettingsType type) { 118 bool ShouldShowPermission(ContentSettingsType type) {
118 #if !defined(OS_ANDROID) 119 #if !defined(OS_ANDROID)
119 // Autoplay is Android-only at the moment. 120 // Autoplay is Android-only at the moment.
120 if (type == CONTENT_SETTINGS_TYPE_AUTOPLAY) 121 if (type == CONTENT_SETTINGS_TYPE_AUTOPLAY)
121 return false; 122 return false;
122 #endif 123 #endif
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after
791 info.connection_status = site_connection_status_; 792 info.connection_status = site_connection_status_;
792 info.connection_status_description = 793 info.connection_status_description =
793 UTF16ToUTF8(site_connection_details_); 794 UTF16ToUTF8(site_connection_details_);
794 info.identity_status = site_identity_status_; 795 info.identity_status = site_identity_status_;
795 info.identity_status_description = 796 info.identity_status_description =
796 UTF16ToUTF8(site_identity_details_); 797 UTF16ToUTF8(site_identity_details_);
797 info.certificate = certificate_; 798 info.certificate = certificate_;
798 info.show_ssl_decision_revoke_button = show_ssl_decision_revoke_button_; 799 info.show_ssl_decision_revoke_button = show_ssl_decision_revoke_button_;
799 ui_->SetIdentityInfo(info); 800 ui_->SetIdentityInfo(info);
800 } 801 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698