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

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

Issue 2039803002: Unregister Images, Plugins and Mouselock content settings on android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@only_register_platform_used_contentsettingtypes
Patch Set: address review comments, minor change Created 4 years, 6 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 (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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 // security-dev@chromium.org. 98 // security-dev@chromium.org.
99 ContentSettingsType kPermissionType[] = { 99 ContentSettingsType kPermissionType[] = {
100 CONTENT_SETTINGS_TYPE_GEOLOCATION, 100 CONTENT_SETTINGS_TYPE_GEOLOCATION,
101 CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA, 101 CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA,
102 CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC, 102 CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC,
103 CONTENT_SETTINGS_TYPE_NOTIFICATIONS, 103 CONTENT_SETTINGS_TYPE_NOTIFICATIONS,
104 #if defined(OS_ANDROID) 104 #if defined(OS_ANDROID)
105 CONTENT_SETTINGS_TYPE_PUSH_MESSAGING, 105 CONTENT_SETTINGS_TYPE_PUSH_MESSAGING,
106 #endif 106 #endif
107 CONTENT_SETTINGS_TYPE_JAVASCRIPT, 107 CONTENT_SETTINGS_TYPE_JAVASCRIPT,
108 #if !defined(OS_ANDROID)
108 CONTENT_SETTINGS_TYPE_PLUGINS, 109 CONTENT_SETTINGS_TYPE_PLUGINS,
109 CONTENT_SETTINGS_TYPE_IMAGES, 110 CONTENT_SETTINGS_TYPE_IMAGES,
111 #endif
110 CONTENT_SETTINGS_TYPE_POPUPS, 112 CONTENT_SETTINGS_TYPE_POPUPS,
111 CONTENT_SETTINGS_TYPE_BACKGROUND_SYNC, 113 CONTENT_SETTINGS_TYPE_BACKGROUND_SYNC,
112 CONTENT_SETTINGS_TYPE_KEYGEN, 114 CONTENT_SETTINGS_TYPE_KEYGEN,
113 CONTENT_SETTINGS_TYPE_AUTOMATIC_DOWNLOADS, 115 CONTENT_SETTINGS_TYPE_AUTOMATIC_DOWNLOADS,
116 #if !defined(OS_ANDROID)
114 CONTENT_SETTINGS_TYPE_MOUSELOCK, 117 CONTENT_SETTINGS_TYPE_MOUSELOCK,
118 #endif
115 CONTENT_SETTINGS_TYPE_FULLSCREEN, 119 CONTENT_SETTINGS_TYPE_FULLSCREEN,
116 CONTENT_SETTINGS_TYPE_MIDI_SYSEX, 120 CONTENT_SETTINGS_TYPE_MIDI_SYSEX,
117 }; 121 };
118 122
119 // Determines whether to show permission |type| in the Website Settings UI. Only 123 // Determines whether to show permission |type| in the Website Settings UI. Only
120 // applies to permissions listed in |kPermissionType|. 124 // applies to permissions listed in |kPermissionType|.
121 bool ShouldShowPermission(ContentSettingsType type) { 125 bool ShouldShowPermission(ContentSettingsType type) {
122 // TODO(mgiuca): When simplified-fullscreen-ui is enabled permanently on 126 // TODO(mgiuca): When simplified-fullscreen-ui is enabled permanently on
123 // Android, remove these from kPermissionType, rather than having this check 127 // Android, remove these from kPermissionType, rather than having this check
124 // (http://crbug.com/577396). 128 // (http://crbug.com/577396).
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 info.connection_status = site_connection_status_; 762 info.connection_status = site_connection_status_;
759 info.connection_status_description = 763 info.connection_status_description =
760 UTF16ToUTF8(site_connection_details_); 764 UTF16ToUTF8(site_connection_details_);
761 info.identity_status = site_identity_status_; 765 info.identity_status = site_identity_status_;
762 info.identity_status_description = 766 info.identity_status_description =
763 UTF16ToUTF8(site_identity_details_); 767 UTF16ToUTF8(site_identity_details_);
764 info.cert_id = cert_id_; 768 info.cert_id = cert_id_;
765 info.show_ssl_decision_revoke_button = show_ssl_decision_revoke_button_; 769 info.show_ssl_decision_revoke_button = show_ssl_decision_revoke_button_;
766 ui_->SetIdentityInfo(info); 770 ui_->SetIdentityInfo(info);
767 } 771 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698