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

Side by Side Diff: chrome/browser/ui/page_info/website_settings_ui.cc

Issue 2682293002: Add desktop UI for the subresource filter content setting. (Closed)
Patch Set: comments Created 3 years, 9 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/page_info/website_settings_ui.h" 5 #include "chrome/browser/ui/page_info/website_settings_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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 IDS_AUTOMATIC_DOWNLOADS_TAB_LABEL, IDR_BLOCKED_DOWNLOADS, 108 IDS_AUTOMATIC_DOWNLOADS_TAB_LABEL, IDR_BLOCKED_DOWNLOADS,
109 IDR_ALLOWED_DOWNLOADS}, 109 IDR_ALLOWED_DOWNLOADS},
110 {CONTENT_SETTINGS_TYPE_MIDI_SYSEX, IDS_WEBSITE_SETTINGS_TYPE_MIDI_SYSEX, 110 {CONTENT_SETTINGS_TYPE_MIDI_SYSEX, IDS_WEBSITE_SETTINGS_TYPE_MIDI_SYSEX,
111 IDR_BLOCKED_MIDI_SYSEX, IDR_ALLOWED_MIDI_SYSEX}, 111 IDR_BLOCKED_MIDI_SYSEX, IDR_ALLOWED_MIDI_SYSEX},
112 {CONTENT_SETTINGS_TYPE_BACKGROUND_SYNC, 112 {CONTENT_SETTINGS_TYPE_BACKGROUND_SYNC,
113 IDS_WEBSITE_SETTINGS_TYPE_BACKGROUND_SYNC, IDR_BLOCKED_BACKGROUND_SYNC, 113 IDS_WEBSITE_SETTINGS_TYPE_BACKGROUND_SYNC, IDR_BLOCKED_BACKGROUND_SYNC,
114 IDR_ALLOWED_BACKGROUND_SYNC}, 114 IDR_ALLOWED_BACKGROUND_SYNC},
115 // Autoplay is Android-only at the moment, and the Origin Info bubble in 115 // Autoplay is Android-only at the moment, and the Origin Info bubble in
116 // Android ignores these block/allow icon pairs, so we can specify 0 there. 116 // Android ignores these block/allow icon pairs, so we can specify 0 there.
117 {CONTENT_SETTINGS_TYPE_AUTOPLAY, IDS_WEBSITE_SETTINGS_TYPE_AUTOPLAY, 0, 0}, 117 {CONTENT_SETTINGS_TYPE_AUTOPLAY, IDS_WEBSITE_SETTINGS_TYPE_AUTOPLAY, 0, 0},
118 }; 118 {CONTENT_SETTINGS_TYPE_SUBRESOURCE_FILTER, IDS_SUBRESOURCE_FILTER_HEADER,
119 IDR_ALLOWED_SUBRESOURCE_FILTER, IDR_BLOCKED_SUBRESOURCE_FILTER}};
119 120
120 std::unique_ptr<WebsiteSettingsUI::SecurityDescription> 121 std::unique_ptr<WebsiteSettingsUI::SecurityDescription>
121 CreateSecurityDescription(int summary_id, int details_id) { 122 CreateSecurityDescription(int summary_id, int details_id) {
122 std::unique_ptr<WebsiteSettingsUI::SecurityDescription> security_description( 123 std::unique_ptr<WebsiteSettingsUI::SecurityDescription> security_description(
123 new WebsiteSettingsUI::SecurityDescription()); 124 new WebsiteSettingsUI::SecurityDescription());
124 security_description->summary = l10n_util::GetStringUTF16(summary_id); 125 security_description->summary = l10n_util::GetStringUTF16(summary_id);
125 security_description->details = l10n_util::GetStringUTF16(details_id); 126 security_description->details = l10n_util::GetStringUTF16(details_id);
126 return security_description; 127 return security_description;
127 } 128 }
128 } // namespace 129 } // namespace
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 } 380 }
380 return resource_id; 381 return resource_id;
381 } 382 }
382 383
383 // static 384 // static
384 const gfx::Image& WebsiteSettingsUI::GetConnectionIcon( 385 const gfx::Image& WebsiteSettingsUI::GetConnectionIcon(
385 WebsiteSettings::SiteConnectionStatus status) { 386 WebsiteSettings::SiteConnectionStatus status) {
386 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 387 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
387 return rb.GetNativeImageNamed(GetConnectionIconID(status)); 388 return rb.GetNativeImageNamed(GetConnectionIconID(status));
388 } 389 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698