| 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/permissions/permission_manager.h" | 9 #include "chrome/browser/permissions/permission_manager.h" |
| 10 #include "chrome/browser/permissions/permission_result.h" | 10 #include "chrome/browser/permissions/permission_result.h" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 IDR_BLOCKED_MIC, IDR_ALLOWED_MIC}, | 80 IDR_BLOCKED_MIC, IDR_ALLOWED_MIC}, |
| 81 {CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA, IDS_PAGE_INFO_TYPE_CAMERA, | 81 {CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA, IDS_PAGE_INFO_TYPE_CAMERA, |
| 82 IDR_BLOCKED_CAMERA, IDR_ALLOWED_CAMERA}, | 82 IDR_BLOCKED_CAMERA, IDR_ALLOWED_CAMERA}, |
| 83 {CONTENT_SETTINGS_TYPE_AUTOMATIC_DOWNLOADS, | 83 {CONTENT_SETTINGS_TYPE_AUTOMATIC_DOWNLOADS, |
| 84 IDS_AUTOMATIC_DOWNLOADS_TAB_LABEL, IDR_BLOCKED_DOWNLOADS, | 84 IDS_AUTOMATIC_DOWNLOADS_TAB_LABEL, IDR_BLOCKED_DOWNLOADS, |
| 85 IDR_ALLOWED_DOWNLOADS}, | 85 IDR_ALLOWED_DOWNLOADS}, |
| 86 {CONTENT_SETTINGS_TYPE_MIDI_SYSEX, IDS_PAGE_INFO_TYPE_MIDI_SYSEX, | 86 {CONTENT_SETTINGS_TYPE_MIDI_SYSEX, IDS_PAGE_INFO_TYPE_MIDI_SYSEX, |
| 87 IDR_BLOCKED_MIDI_SYSEX, IDR_ALLOWED_MIDI_SYSEX}, | 87 IDR_BLOCKED_MIDI_SYSEX, IDR_ALLOWED_MIDI_SYSEX}, |
| 88 {CONTENT_SETTINGS_TYPE_BACKGROUND_SYNC, IDS_PAGE_INFO_TYPE_BACKGROUND_SYNC, | 88 {CONTENT_SETTINGS_TYPE_BACKGROUND_SYNC, IDS_PAGE_INFO_TYPE_BACKGROUND_SYNC, |
| 89 IDR_BLOCKED_BACKGROUND_SYNC, IDR_ALLOWED_BACKGROUND_SYNC}, | 89 IDR_BLOCKED_BACKGROUND_SYNC, IDR_ALLOWED_BACKGROUND_SYNC}, |
| 90 // Autoplay is Android-only at the moment, and the Origin Info bubble in | 90 // Autoplay is Android-only at the moment, and the Page Info popup on |
| 91 // Android ignores these block/allow icon pairs, so we can specify 0 there. | 91 // Android ignores these block/allow icon pairs, so we can specify 0 there. |
| 92 {CONTENT_SETTINGS_TYPE_AUTOPLAY, IDS_PAGE_INFO_TYPE_AUTOPLAY, 0, 0}, | 92 {CONTENT_SETTINGS_TYPE_AUTOPLAY, IDS_PAGE_INFO_TYPE_AUTOPLAY, 0, 0}, |
| 93 {CONTENT_SETTINGS_TYPE_SUBRESOURCE_FILTER, IDS_SUBRESOURCE_FILTER_HEADER, | 93 {CONTENT_SETTINGS_TYPE_SUBRESOURCE_FILTER, IDS_SUBRESOURCE_FILTER_HEADER, |
| 94 IDR_ALLOWED_SUBRESOURCE_FILTER, IDR_BLOCKED_SUBRESOURCE_FILTER}, | 94 IDR_ALLOWED_SUBRESOURCE_FILTER, IDR_BLOCKED_SUBRESOURCE_FILTER}, |
| 95 }; | 95 }; |
| 96 | 96 |
| 97 std::unique_ptr<PageInfoUI::SecurityDescription> CreateSecurityDescription( | 97 std::unique_ptr<PageInfoUI::SecurityDescription> CreateSecurityDescription( |
| 98 int summary_id, | 98 int summary_id, |
| 99 int details_id) { | 99 int details_id) { |
| 100 std::unique_ptr<PageInfoUI::SecurityDescription> security_description( | 100 std::unique_ptr<PageInfoUI::SecurityDescription> security_description( |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 } | 394 } |
| 395 return resource_id; | 395 return resource_id; |
| 396 } | 396 } |
| 397 | 397 |
| 398 // static | 398 // static |
| 399 const gfx::Image& PageInfoUI::GetConnectionIcon( | 399 const gfx::Image& PageInfoUI::GetConnectionIcon( |
| 400 PageInfo::SiteConnectionStatus status) { | 400 PageInfo::SiteConnectionStatus status) { |
| 401 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 401 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
| 402 return rb.GetNativeImageNamed(GetConnectionIconID(status)); | 402 return rb.GetNativeImageNamed(GetConnectionIconID(status)); |
| 403 } | 403 } |
| OLD | NEW |