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/content_settings/content_setting_image_model.h" | 5 #include "chrome/browser/ui/content_settings/content_setting_image_model.h" |
6 | 6 |
7 #include "chrome/browser/content_settings/host_content_settings_map.h" | 7 #include "chrome/browser/content_settings/host_content_settings_map.h" |
8 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 8 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
9 #include "chrome/browser/prerender/prerender_manager.h" | 9 #include "chrome/browser/prerender/prerender_manager.h" |
10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 {CONTENT_SETTINGS_TYPE_JAVASCRIPT, IDS_BLOCKED_JAVASCRIPT_TITLE}, | 105 {CONTENT_SETTINGS_TYPE_JAVASCRIPT, IDS_BLOCKED_JAVASCRIPT_TITLE}, |
106 {CONTENT_SETTINGS_TYPE_PLUGINS, IDS_BLOCKED_PLUGINS_MESSAGE}, | 106 {CONTENT_SETTINGS_TYPE_PLUGINS, IDS_BLOCKED_PLUGINS_MESSAGE}, |
107 {CONTENT_SETTINGS_TYPE_POPUPS, IDS_BLOCKED_POPUPS_TOOLTIP}, | 107 {CONTENT_SETTINGS_TYPE_POPUPS, IDS_BLOCKED_POPUPS_TOOLTIP}, |
108 {CONTENT_SETTINGS_TYPE_MIXEDSCRIPT, | 108 {CONTENT_SETTINGS_TYPE_MIXEDSCRIPT, |
109 IDS_BLOCKED_DISPLAYING_INSECURE_CONTENT}, | 109 IDS_BLOCKED_DISPLAYING_INSECURE_CONTENT}, |
110 {CONTENT_SETTINGS_TYPE_PPAPI_BROKER, IDS_BLOCKED_PPAPI_BROKER_TITLE}, | 110 {CONTENT_SETTINGS_TYPE_PPAPI_BROKER, IDS_BLOCKED_PPAPI_BROKER_TITLE}, |
111 {CONTENT_SETTINGS_TYPE_AUTOMATIC_DOWNLOADS, IDS_BLOCKED_DOWNLOAD_TITLE}, | 111 {CONTENT_SETTINGS_TYPE_AUTOMATIC_DOWNLOADS, IDS_BLOCKED_DOWNLOAD_TITLE}, |
112 }; | 112 }; |
113 static const ContentSettingsTypeIdEntry kBlockedExplanatoryTextIDs[] = { | 113 static const ContentSettingsTypeIdEntry kBlockedExplanatoryTextIDs[] = { |
114 {CONTENT_SETTINGS_TYPE_POPUPS, IDS_BLOCKED_POPUPS_EXPLANATORY_TEXT}, | 114 {CONTENT_SETTINGS_TYPE_POPUPS, IDS_BLOCKED_POPUPS_EXPLANATORY_TEXT}, |
| 115 {CONTENT_SETTINGS_TYPE_PLUGINS, IDS_BLOCKED_PLUGIN_EXPLANATORY_TEXT}, |
115 {CONTENT_SETTINGS_TYPE_AUTOMATIC_DOWNLOADS, | 116 {CONTENT_SETTINGS_TYPE_AUTOMATIC_DOWNLOADS, |
116 IDS_BLOCKED_DOWNLOADS_EXPLANATION}, | 117 IDS_BLOCKED_DOWNLOADS_EXPLANATION}, |
117 }; | 118 }; |
118 | 119 |
119 ContentSettingsType type = get_content_settings_type(); | 120 ContentSettingsType type = get_content_settings_type(); |
120 int icon_id = GetIdForContentType( | 121 int icon_id = GetIdForContentType( |
121 kBlockedIconIDs, arraysize(kBlockedIconIDs), type); | 122 kBlockedIconIDs, arraysize(kBlockedIconIDs), type); |
122 int tooltip_id = GetIdForContentType( | 123 int tooltip_id = GetIdForContentType( |
123 kBlockedTooltipIDs, arraysize(kBlockedTooltipIDs), type); | 124 kBlockedTooltipIDs, arraysize(kBlockedTooltipIDs), type); |
124 int explanation_id = GetIdForContentType( | 125 int explanation_id = GetIdForContentType( |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 case CONTENT_SETTINGS_TYPE_MEDIASTREAM: | 357 case CONTENT_SETTINGS_TYPE_MEDIASTREAM: |
357 case CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC: | 358 case CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC: |
358 case CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA: | 359 case CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA: |
359 return new ContentSettingMediaImageModel(content_settings_type); | 360 return new ContentSettingMediaImageModel(content_settings_type); |
360 case CONTENT_SETTINGS_TYPE_MIDI_SYSEX: | 361 case CONTENT_SETTINGS_TYPE_MIDI_SYSEX: |
361 return new ContentSettingMIDISysExImageModel(); | 362 return new ContentSettingMIDISysExImageModel(); |
362 default: | 363 default: |
363 return new ContentSettingBlockedImageModel(content_settings_type); | 364 return new ContentSettingBlockedImageModel(content_settings_type); |
364 } | 365 } |
365 } | 366 } |
OLD | NEW |