| OLD | NEW |
| 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 Loading... |
| 103 CONTENT_SETTINGS_TYPE_NOTIFICATIONS, | 103 CONTENT_SETTINGS_TYPE_NOTIFICATIONS, |
| 104 CONTENT_SETTINGS_TYPE_JAVASCRIPT, | 104 CONTENT_SETTINGS_TYPE_JAVASCRIPT, |
| 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 #if !defined(OS_ANDROID) | |
| 114 CONTENT_SETTINGS_TYPE_MOUSELOCK, | |
| 115 #endif | |
| 116 CONTENT_SETTINGS_TYPE_FULLSCREEN, | |
| 117 CONTENT_SETTINGS_TYPE_AUTOPLAY, | 113 CONTENT_SETTINGS_TYPE_AUTOPLAY, |
| 118 CONTENT_SETTINGS_TYPE_MIDI_SYSEX, | 114 CONTENT_SETTINGS_TYPE_MIDI_SYSEX, |
| 119 }; | 115 }; |
| 120 | 116 |
| 121 // Determines whether to show permission |type| in the Website Settings UI. Only | 117 // Determines whether to show permission |type| in the Website Settings UI. Only |
| 122 // applies to permissions listed in |kPermissionType|. | 118 // applies to permissions listed in |kPermissionType|. |
| 123 bool ShouldShowPermission(ContentSettingsType type) { | 119 bool ShouldShowPermission(ContentSettingsType type) { |
| 124 // TODO(mgiuca): When simplified-fullscreen-ui is enabled permanently on | |
| 125 // Android, remove these from kPermissionType, rather than having this check | |
| 126 // (http://crbug.com/577396). | |
| 127 #if !defined(OS_ANDROID) | 120 #if !defined(OS_ANDROID) |
| 128 // Fullscreen and mouselock settings are no longer shown (always allow). | |
| 129 // Autoplay is Android-only at the moment. | 121 // Autoplay is Android-only at the moment. |
| 130 if (type == CONTENT_SETTINGS_TYPE_AUTOPLAY || | 122 if (type == CONTENT_SETTINGS_TYPE_AUTOPLAY) |
| 131 type == CONTENT_SETTINGS_TYPE_FULLSCREEN || | |
| 132 type == CONTENT_SETTINGS_TYPE_MOUSELOCK) { | |
| 133 return false; | 123 return false; |
| 134 } | |
| 135 #endif | 124 #endif |
| 136 | 125 |
| 137 return true; | 126 return true; |
| 138 } | 127 } |
| 139 | 128 |
| 140 void CheckContentStatus(SecurityStateModel::ContentStatus content_status, | 129 void CheckContentStatus(SecurityStateModel::ContentStatus content_status, |
| 141 bool* displayed, | 130 bool* displayed, |
| 142 bool* ran) { | 131 bool* ran) { |
| 143 switch (content_status) { | 132 switch (content_status) { |
| 144 case SecurityStateModel::CONTENT_STATUS_DISPLAYED: | 133 case SecurityStateModel::CONTENT_STATUS_DISPLAYED: |
| (...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 838 info.connection_status = site_connection_status_; | 827 info.connection_status = site_connection_status_; |
| 839 info.connection_status_description = | 828 info.connection_status_description = |
| 840 UTF16ToUTF8(site_connection_details_); | 829 UTF16ToUTF8(site_connection_details_); |
| 841 info.identity_status = site_identity_status_; | 830 info.identity_status = site_identity_status_; |
| 842 info.identity_status_description = | 831 info.identity_status_description = |
| 843 UTF16ToUTF8(site_identity_details_); | 832 UTF16ToUTF8(site_identity_details_); |
| 844 info.certificate = certificate_; | 833 info.certificate = certificate_; |
| 845 info.show_ssl_decision_revoke_button = show_ssl_decision_revoke_button_; | 834 info.show_ssl_decision_revoke_button = show_ssl_decision_revoke_button_; |
| 846 ui_->SetIdentityInfo(info); | 835 ui_->SetIdentityInfo(info); |
| 847 } | 836 } |
| OLD | NEW |