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

Side by Side Diff: chrome/browser/ui/content_settings/content_setting_image_model.cc

Issue 10577028: Move the mixed scripting infobar to a page action icon / content setting. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 6 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 | Annotate | Revision Log
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/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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 virtual void UpdateFromWebContents(WebContents* web_contents) OVERRIDE; 47 virtual void UpdateFromWebContents(WebContents* web_contents) OVERRIDE;
48 }; 48 };
49 49
50 const int ContentSettingBlockedImageModel::kBlockedIconIDs[] = { 50 const int ContentSettingBlockedImageModel::kBlockedIconIDs[] = {
51 IDR_BLOCKED_COOKIES, 51 IDR_BLOCKED_COOKIES,
52 IDR_BLOCKED_IMAGES, 52 IDR_BLOCKED_IMAGES,
53 IDR_BLOCKED_JAVASCRIPT, 53 IDR_BLOCKED_JAVASCRIPT,
54 IDR_BLOCKED_PLUGINS, 54 IDR_BLOCKED_PLUGINS,
55 IDR_BLOCKED_POPUPS, 55 IDR_BLOCKED_POPUPS,
56 0,
57 0,
58 0,
59 0,
60 0,
61 0,
62 IDR_OMNIBOX_HTTPS_INVALID,
Tom Sepez 2012/06/20 04:16:07 Can we stick some COMPILE_ASSERTS here to catch t
Bernhard Bauer 2012/06/20 17:01:43 What we should do here is have a ContentSettingsTy
56 }; 63 };
57 64
58 const int ContentSettingBlockedImageModel::kAccessedIconIDs[] = { 65 const int ContentSettingBlockedImageModel::kAccessedIconIDs[] = {
59 IDR_ACCESSED_COOKIES, 66 IDR_ACCESSED_COOKIES,
60 0, 67 0,
61 0, 68 0,
62 0, 69 0,
63 0, 70 0,
71 0,
72 0,
73 0,
74 0,
75 0,
76 0,
77 0,
64 }; 78 };
65 79
66 const int ContentSettingBlockedImageModel::kBlockedExplanatoryTextIDs[] = { 80 const int ContentSettingBlockedImageModel::kBlockedExplanatoryTextIDs[] = {
67 0, 81 0,
68 0, 82 0,
69 0, 83 0,
70 0, 84 0,
71 IDS_BLOCKED_POPUPS_EXPLANATORY_TEXT, 85 IDS_BLOCKED_POPUPS_EXPLANATORY_TEXT,
86 0,
87 0,
88 0,
89 0,
90 0,
91 0,
92 0,
72 }; 93 };
73 94
74 const int ContentSettingBlockedImageModel::kAccessedExplanatoryTextIDs[] = { 95 const int ContentSettingBlockedImageModel::kAccessedExplanatoryTextIDs[] = {
75 0, 96 0,
76 0, 97 0,
77 0, 98 0,
78 0, 99 0,
79 0, 100 0,
101 0,
102 0,
103 0,
104 0,
105 0,
106 0,
107 0,
80 }; 108 };
81 109
82 110
83 const int ContentSettingBlockedImageModel::kBlockedTooltipIDs[] = { 111 const int ContentSettingBlockedImageModel::kBlockedTooltipIDs[] = {
84 IDS_BLOCKED_COOKIES_TITLE, 112 IDS_BLOCKED_COOKIES_TITLE,
85 IDS_BLOCKED_IMAGES_TITLE, 113 IDS_BLOCKED_IMAGES_TITLE,
86 IDS_BLOCKED_JAVASCRIPT_TITLE, 114 IDS_BLOCKED_JAVASCRIPT_TITLE,
87 IDS_BLOCKED_PLUGINS_MESSAGE, 115 IDS_BLOCKED_PLUGINS_MESSAGE,
88 IDS_BLOCKED_POPUPS_TOOLTIP, 116 IDS_BLOCKED_POPUPS_TOOLTIP,
117 0,
118 0,
119 0,
120 0,
121 0,
122 0,
123 IDS_BLOCKED_DISPLAYING_INSECURE_CONTENT,
89 }; 124 };
90 125
91 const int ContentSettingBlockedImageModel::kAccessedTooltipIDs[] = { 126 const int ContentSettingBlockedImageModel::kAccessedTooltipIDs[] = {
92 IDS_ACCESSED_COOKIES_TITLE, 127 IDS_ACCESSED_COOKIES_TITLE,
93 0, 128 0,
94 0, 129 0,
95 0, 130 0,
96 0, 131 0,
132 0,
133 0,
134 0,
135 0,
136 0,
137 0,
138 0,
97 }; 139 };
98 140
99 ContentSettingBlockedImageModel::ContentSettingBlockedImageModel( 141 ContentSettingBlockedImageModel::ContentSettingBlockedImageModel(
100 ContentSettingsType content_settings_type) 142 ContentSettingsType content_settings_type)
101 : ContentSettingImageModel(content_settings_type) { 143 : ContentSettingImageModel(content_settings_type) {
102 } 144 }
103 145
104 void ContentSettingBlockedImageModel::UpdateFromWebContents( 146 void ContentSettingBlockedImageModel::UpdateFromWebContents(
105 WebContents* web_contents) { 147 WebContents* web_contents) {
106 set_visible(false); 148 set_visible(false);
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 ContentSettingsType content_settings_type) { 228 ContentSettingsType content_settings_type) {
187 switch (content_settings_type) { 229 switch (content_settings_type) {
188 case CONTENT_SETTINGS_TYPE_GEOLOCATION: 230 case CONTENT_SETTINGS_TYPE_GEOLOCATION:
189 return new ContentSettingGeolocationImageModel(); 231 return new ContentSettingGeolocationImageModel();
190 case CONTENT_SETTINGS_TYPE_NOTIFICATIONS: 232 case CONTENT_SETTINGS_TYPE_NOTIFICATIONS:
191 return new ContentSettingNotificationsImageModel(); 233 return new ContentSettingNotificationsImageModel();
192 default: 234 default:
193 return new ContentSettingBlockedImageModel(content_settings_type); 235 return new ContentSettingBlockedImageModel(content_settings_type);
194 } 236 }
195 } 237 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698