| 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_factory.h" | 7 #include "chrome/browser/content_settings/host_content_settings_map_factory.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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 0, | 132 0, |
| 133 0, | 133 0, |
| 134 0}, | 134 0}, |
| 135 {CONTENT_SETTINGS_TYPE_JAVASCRIPT, | 135 {CONTENT_SETTINGS_TYPE_JAVASCRIPT, |
| 136 IDR_BLOCKED_JAVASCRIPT, | 136 IDR_BLOCKED_JAVASCRIPT, |
| 137 gfx::VectorIconId::CODE, | 137 gfx::VectorIconId::CODE, |
| 138 IDS_BLOCKED_JAVASCRIPT_TITLE, | 138 IDS_BLOCKED_JAVASCRIPT_TITLE, |
| 139 0, | 139 0, |
| 140 0, | 140 0, |
| 141 0}, | 141 0}, |
| 142 {CONTENT_SETTINGS_TYPE_KEYGEN, |
| 143 IDR_BLOCKED_KEYGEN, |
| 144 gfx::VectorIconId::CODE, |
| 145 IDS_BLOCKED_KEYGEN_TITLE, |
| 146 0, |
| 147 0, |
| 148 0}, |
| 142 {CONTENT_SETTINGS_TYPE_PLUGINS, | 149 {CONTENT_SETTINGS_TYPE_PLUGINS, |
| 143 IDR_BLOCKED_PLUGINS, | 150 IDR_BLOCKED_PLUGINS, |
| 144 gfx::VectorIconId::EXTENSION, | 151 gfx::VectorIconId::EXTENSION, |
| 145 IDS_BLOCKED_PLUGINS_MESSAGE, | 152 IDS_BLOCKED_PLUGINS_MESSAGE, |
| 146 IDS_BLOCKED_PLUGIN_EXPLANATORY_TEXT, | 153 IDS_BLOCKED_PLUGIN_EXPLANATORY_TEXT, |
| 147 0, | 154 0, |
| 148 0}, | 155 0}, |
| 149 {CONTENT_SETTINGS_TYPE_POPUPS, | 156 {CONTENT_SETTINGS_TYPE_POPUPS, |
| 150 IDR_BLOCKED_POPUPS, | 157 IDR_BLOCKED_POPUPS, |
| 151 gfx::VectorIconId::WEB, | 158 gfx::VectorIconId::WEB, |
| (...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 573 result.push_back( | 580 result.push_back( |
| 574 new ContentSettingBlockedImageModel(CONTENT_SETTINGS_TYPE_IMAGES)); | 581 new ContentSettingBlockedImageModel(CONTENT_SETTINGS_TYPE_IMAGES)); |
| 575 result.push_back( | 582 result.push_back( |
| 576 new ContentSettingBlockedImageModel(CONTENT_SETTINGS_TYPE_JAVASCRIPT)); | 583 new ContentSettingBlockedImageModel(CONTENT_SETTINGS_TYPE_JAVASCRIPT)); |
| 577 result.push_back( | 584 result.push_back( |
| 578 new ContentSettingBlockedImageModel(CONTENT_SETTINGS_TYPE_PPAPI_BROKER)); | 585 new ContentSettingBlockedImageModel(CONTENT_SETTINGS_TYPE_PPAPI_BROKER)); |
| 579 result.push_back( | 586 result.push_back( |
| 580 new ContentSettingBlockedImageModel(CONTENT_SETTINGS_TYPE_PLUGINS)); | 587 new ContentSettingBlockedImageModel(CONTENT_SETTINGS_TYPE_PLUGINS)); |
| 581 result.push_back( | 588 result.push_back( |
| 582 new ContentSettingBlockedImageModel(CONTENT_SETTINGS_TYPE_POPUPS)); | 589 new ContentSettingBlockedImageModel(CONTENT_SETTINGS_TYPE_POPUPS)); |
| 590 result.push_back( |
| 591 new ContentSettingBlockedImageModel(CONTENT_SETTINGS_TYPE_KEYGEN)); |
| 583 result.push_back(new ContentSettingGeolocationImageModel()); | 592 result.push_back(new ContentSettingGeolocationImageModel()); |
| 584 result.push_back( | 593 result.push_back( |
| 585 new ContentSettingBlockedImageModel(CONTENT_SETTINGS_TYPE_MIXEDSCRIPT)); | 594 new ContentSettingBlockedImageModel(CONTENT_SETTINGS_TYPE_MIXEDSCRIPT)); |
| 586 result.push_back(new ContentSettingRPHImageModel()); | 595 result.push_back(new ContentSettingRPHImageModel()); |
| 587 result.push_back(new ContentSettingMediaImageModel()); | 596 result.push_back(new ContentSettingMediaImageModel()); |
| 588 result.push_back( | 597 result.push_back( |
| 589 new ContentSettingBlockedImageModel( | 598 new ContentSettingBlockedImageModel( |
| 590 CONTENT_SETTINGS_TYPE_AUTOMATIC_DOWNLOADS)); | 599 CONTENT_SETTINGS_TYPE_AUTOMATIC_DOWNLOADS)); |
| 591 result.push_back(new ContentSettingMIDISysExImageModel()); | 600 result.push_back(new ContentSettingMIDISysExImageModel()); |
| 592 | 601 |
| 593 return result.Pass(); | 602 return result.Pass(); |
| 594 } | 603 } |
| 595 | 604 |
| 596 void ContentSettingImageModel::SetIconByResourceId(int id) { | 605 void ContentSettingImageModel::SetIconByResourceId(int id) { |
| 597 icon_id_ = id; | 606 icon_id_ = id; |
| 598 icon_ = ui::ResourceBundle::GetSharedInstance().GetNativeImageNamed(id); | 607 icon_ = ui::ResourceBundle::GetSharedInstance().GetNativeImageNamed(id); |
| 599 } | 608 } |
| OLD | NEW |