| 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/page_info/page_info_ui.h" | 5 #include "chrome/browser/ui/page_info/page_info_ui.h" |
| 6 | 6 |
| 7 #include "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" | 8 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" |
| 9 #include "chrome/browser/plugins/plugin_utils.h" | 9 #include "chrome/browser/plugins/plugin_utils.h" |
| 10 #include "chrome/browser/plugins/plugins_field_trial.h" | 10 #include "chrome/browser/plugins/plugins_field_trial.h" |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 {CONTENT_SETTINGS_TYPE_AUTOMATIC_DOWNLOADS, | 106 {CONTENT_SETTINGS_TYPE_AUTOMATIC_DOWNLOADS, |
| 107 IDS_AUTOMATIC_DOWNLOADS_TAB_LABEL, IDR_BLOCKED_DOWNLOADS, | 107 IDS_AUTOMATIC_DOWNLOADS_TAB_LABEL, IDR_BLOCKED_DOWNLOADS, |
| 108 IDR_ALLOWED_DOWNLOADS}, | 108 IDR_ALLOWED_DOWNLOADS}, |
| 109 {CONTENT_SETTINGS_TYPE_MIDI_SYSEX, IDS_PAGE_INFO_TYPE_MIDI_SYSEX, | 109 {CONTENT_SETTINGS_TYPE_MIDI_SYSEX, IDS_PAGE_INFO_TYPE_MIDI_SYSEX, |
| 110 IDR_BLOCKED_MIDI_SYSEX, IDR_ALLOWED_MIDI_SYSEX}, | 110 IDR_BLOCKED_MIDI_SYSEX, IDR_ALLOWED_MIDI_SYSEX}, |
| 111 {CONTENT_SETTINGS_TYPE_BACKGROUND_SYNC, IDS_PAGE_INFO_TYPE_BACKGROUND_SYNC, | 111 {CONTENT_SETTINGS_TYPE_BACKGROUND_SYNC, IDS_PAGE_INFO_TYPE_BACKGROUND_SYNC, |
| 112 IDR_BLOCKED_BACKGROUND_SYNC, IDR_ALLOWED_BACKGROUND_SYNC}, | 112 IDR_BLOCKED_BACKGROUND_SYNC, IDR_ALLOWED_BACKGROUND_SYNC}, |
| 113 // Autoplay is Android-only at the moment, and the Origin Info bubble in | 113 // Autoplay is Android-only at the moment, and the Origin Info bubble in |
| 114 // Android ignores these block/allow icon pairs, so we can specify 0 there. | 114 // Android ignores these block/allow icon pairs, so we can specify 0 there. |
| 115 {CONTENT_SETTINGS_TYPE_AUTOPLAY, IDS_PAGE_INFO_TYPE_AUTOPLAY, 0, 0}, | 115 {CONTENT_SETTINGS_TYPE_AUTOPLAY, IDS_PAGE_INFO_TYPE_AUTOPLAY, 0, 0}, |
| 116 {CONTENT_SETTINGS_TYPE_SUBRESOURCE_FILTER, IDS_SUBRESOURCE_FILTER_HEADER, |
| 117 IDR_ALLOWED_SUBRESOURCE_FILTER, IDR_BLOCKED_SUBRESOURCE_FILTER}, |
| 116 }; | 118 }; |
| 117 | 119 |
| 118 std::unique_ptr<PageInfoUI::SecurityDescription> CreateSecurityDescription( | 120 std::unique_ptr<PageInfoUI::SecurityDescription> CreateSecurityDescription( |
| 119 int summary_id, | 121 int summary_id, |
| 120 int details_id) { | 122 int details_id) { |
| 121 std::unique_ptr<PageInfoUI::SecurityDescription> security_description( | 123 std::unique_ptr<PageInfoUI::SecurityDescription> security_description( |
| 122 new PageInfoUI::SecurityDescription()); | 124 new PageInfoUI::SecurityDescription()); |
| 123 security_description->summary = l10n_util::GetStringUTF16(summary_id); | 125 security_description->summary = l10n_util::GetStringUTF16(summary_id); |
| 124 security_description->details = l10n_util::GetStringUTF16(details_id); | 126 security_description->details = l10n_util::GetStringUTF16(details_id); |
| 125 return security_description; | 127 return security_description; |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 } | 377 } |
| 376 return resource_id; | 378 return resource_id; |
| 377 } | 379 } |
| 378 | 380 |
| 379 // static | 381 // static |
| 380 const gfx::Image& PageInfoUI::GetConnectionIcon( | 382 const gfx::Image& PageInfoUI::GetConnectionIcon( |
| 381 PageInfo::SiteConnectionStatus status) { | 383 PageInfo::SiteConnectionStatus status) { |
| 382 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 384 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
| 383 return rb.GetNativeImageNamed(GetConnectionIconID(status)); | 385 return rb.GetNativeImageNamed(GetConnectionIconID(status)); |
| 384 } | 386 } |
| OLD | NEW |