Chromium Code Reviews| 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_bubble_model.h" | 5 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 1152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1163 } | 1163 } |
| 1164 | 1164 |
| 1165 // ContentSettingSubresourceFilterBubbleModel ---------------------------------- | 1165 // ContentSettingSubresourceFilterBubbleModel ---------------------------------- |
| 1166 | 1166 |
| 1167 ContentSettingSubresourceFilterBubbleModel:: | 1167 ContentSettingSubresourceFilterBubbleModel:: |
| 1168 ContentSettingSubresourceFilterBubbleModel(Delegate* delegate, | 1168 ContentSettingSubresourceFilterBubbleModel(Delegate* delegate, |
| 1169 WebContents* web_contents, | 1169 WebContents* web_contents, |
| 1170 Profile* profile) | 1170 Profile* profile) |
| 1171 : ContentSettingBubbleModel(delegate, web_contents, profile) { | 1171 : ContentSettingBubbleModel(delegate, web_contents, profile) { |
| 1172 SetTitle(); | 1172 SetTitle(); |
| 1173 SetMessage(); | |
| 1173 SetManageLink(); | 1174 SetManageLink(); |
| 1174 } | 1175 } |
| 1175 | 1176 |
| 1176 ContentSettingSubresourceFilterBubbleModel:: | 1177 ContentSettingSubresourceFilterBubbleModel:: |
| 1177 ~ContentSettingSubresourceFilterBubbleModel() {} | 1178 ~ContentSettingSubresourceFilterBubbleModel() {} |
| 1178 | 1179 |
| 1179 void ContentSettingSubresourceFilterBubbleModel::SetTitle() { | 1180 void ContentSettingSubresourceFilterBubbleModel::SetTitle() { |
| 1180 // TODO(melandory): For this bubble we need to introduce ability to have a | 1181 set_title( |
| 1181 // caption (something which appears above title and has bigger font). | 1182 l10n_util::GetStringUTF8(IDS_FILTERED_DECEPTIVE_CONTENT_PROMPT_TITLE)); |
|
grt (UTC plus 2)
2016/08/11 08:27:51
you're doing two string conversions here: UTF18->U
| |
| 1182 set_title(l10n_util::GetStringUTF8( | |
| 1183 IDS_FILTERED_DECEPTIVE_CONTENT_PROMPT_EXPLANATION)); | |
| 1184 } | 1183 } |
| 1185 | 1184 |
| 1186 void ContentSettingSubresourceFilterBubbleModel::SetManageLink() { | 1185 void ContentSettingSubresourceFilterBubbleModel::SetManageLink() { |
| 1187 // TODO(melandory): introduce the button instead of link. | 1186 // TODO(melandory): introduce the button instead of link. |
| 1188 set_manage_link( | 1187 set_manage_link( |
| 1189 l10n_util::GetStringUTF8(IDS_FILTERED_DECEPTIVE_CONTENT_PROMPT_RELOAD)); | 1188 l10n_util::GetStringUTF8(IDS_FILTERED_DECEPTIVE_CONTENT_PROMPT_RELOAD)); |
| 1190 } | 1189 } |
| 1191 | 1190 |
| 1191 void ContentSettingSubresourceFilterBubbleModel::SetMessage() { | |
| 1192 set_message(l10n_util::GetStringUTF8( | |
| 1193 IDS_FILTERED_DECEPTIVE_CONTENT_PROMPT_EXPLANATION)); | |
| 1194 } | |
| 1195 | |
| 1192 void ContentSettingSubresourceFilterBubbleModel::OnManageLinkClicked() { | 1196 void ContentSettingSubresourceFilterBubbleModel::OnManageLinkClicked() { |
| 1193 // TODO(melandory): Notify ContentSubresourceFilterDriverFactory page reload | 1197 // TODO(melandory): Notify ContentSubresourceFilterDriverFactory page reload |
| 1194 // was requested. | 1198 // was requested. |
| 1195 } | 1199 } |
| 1196 | 1200 |
| 1197 ContentSettingSubresourceFilterBubbleModel* | 1201 ContentSettingSubresourceFilterBubbleModel* |
| 1198 ContentSettingSubresourceFilterBubbleModel::AsSubresourceFilterBubbleModel() { | 1202 ContentSettingSubresourceFilterBubbleModel::AsSubresourceFilterBubbleModel() { |
| 1199 return this; | 1203 return this; |
| 1200 } | 1204 } |
| 1201 | 1205 |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1399 ContentSettingMediaStreamBubbleModel* | 1403 ContentSettingMediaStreamBubbleModel* |
| 1400 ContentSettingBubbleModel::AsMediaStreamBubbleModel() { | 1404 ContentSettingBubbleModel::AsMediaStreamBubbleModel() { |
| 1401 // In general, bubble models might not inherit from the media bubble model. | 1405 // In general, bubble models might not inherit from the media bubble model. |
| 1402 return nullptr; | 1406 return nullptr; |
| 1403 } | 1407 } |
| 1404 | 1408 |
| 1405 ContentSettingSubresourceFilterBubbleModel* | 1409 ContentSettingSubresourceFilterBubbleModel* |
| 1406 ContentSettingBubbleModel::AsSubresourceFilterBubbleModel() { | 1410 ContentSettingBubbleModel::AsSubresourceFilterBubbleModel() { |
| 1407 return nullptr; | 1411 return nullptr; |
| 1408 } | 1412 } |
| OLD | NEW |