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 1197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1208 | 1208 |
1209 void ContentSettingSubresourceFilterBubbleModel::SetTitle() { | 1209 void ContentSettingSubresourceFilterBubbleModel::SetTitle() { |
1210 set_title( | 1210 set_title( |
1211 l10n_util::GetStringUTF16(IDS_FILTERED_DECEPTIVE_CONTENT_PROMPT_TITLE)); | 1211 l10n_util::GetStringUTF16(IDS_FILTERED_DECEPTIVE_CONTENT_PROMPT_TITLE)); |
1212 } | 1212 } |
1213 | 1213 |
1214 void ContentSettingSubresourceFilterBubbleModel::SetManageLink() { | 1214 void ContentSettingSubresourceFilterBubbleModel::SetManageLink() { |
1215 // TODO(melandory): introduce the button instead of link. | 1215 // TODO(melandory): introduce the button instead of link. |
1216 set_manage_link( | 1216 set_manage_link( |
1217 l10n_util::GetStringUTF8(IDS_FILTERED_DECEPTIVE_CONTENT_PROMPT_RELOAD)); | 1217 l10n_util::GetStringUTF8(IDS_FILTERED_DECEPTIVE_CONTENT_PROMPT_RELOAD)); |
| 1218 set_manage_link_as_button(true); |
1218 } | 1219 } |
1219 | 1220 |
1220 void ContentSettingSubresourceFilterBubbleModel::SetMessage() { | 1221 void ContentSettingSubresourceFilterBubbleModel::SetMessage() { |
1221 set_message(l10n_util::GetStringUTF16( | 1222 set_message(l10n_util::GetStringUTF16( |
1222 IDS_FILTERED_DECEPTIVE_CONTENT_PROMPT_EXPLANATION)); | 1223 IDS_FILTERED_DECEPTIVE_CONTENT_PROMPT_EXPLANATION)); |
1223 } | 1224 } |
1224 | 1225 |
1225 void ContentSettingSubresourceFilterBubbleModel::OnManageLinkClicked() { | 1226 void ContentSettingSubresourceFilterBubbleModel::OnManageLinkClicked() { |
1226 subresource_filter::ContentSubresourceFilterDriverFactory* driver_factory = | 1227 subresource_filter::ContentSubresourceFilterDriverFactory* driver_factory = |
1227 subresource_filter::ContentSubresourceFilterDriverFactory:: | 1228 subresource_filter::ContentSubresourceFilterDriverFactory:: |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1398 | 1399 |
1399 ContentSettingBubbleModel::MediaMenu::MediaMenu() : disabled(false) {} | 1400 ContentSettingBubbleModel::MediaMenu::MediaMenu() : disabled(false) {} |
1400 | 1401 |
1401 ContentSettingBubbleModel::MediaMenu::MediaMenu(const MediaMenu& other) = | 1402 ContentSettingBubbleModel::MediaMenu::MediaMenu(const MediaMenu& other) = |
1402 default; | 1403 default; |
1403 | 1404 |
1404 ContentSettingBubbleModel::MediaMenu::~MediaMenu() {} | 1405 ContentSettingBubbleModel::MediaMenu::~MediaMenu() {} |
1405 | 1406 |
1406 ContentSettingBubbleModel::BubbleContent::BubbleContent() | 1407 ContentSettingBubbleModel::BubbleContent::BubbleContent() |
1407 : radio_group_enabled(false), | 1408 : radio_group_enabled(false), |
1408 custom_link_enabled(false) { | 1409 custom_link_enabled(false), |
1409 } | 1410 manage_link_as_button(false) {} |
1410 | 1411 |
1411 ContentSettingBubbleModel::BubbleContent::~BubbleContent() {} | 1412 ContentSettingBubbleModel::BubbleContent::~BubbleContent() {} |
1412 | 1413 |
1413 void ContentSettingBubbleModel::Observe( | 1414 void ContentSettingBubbleModel::Observe( |
1414 int type, | 1415 int type, |
1415 const content::NotificationSource& source, | 1416 const content::NotificationSource& source, |
1416 const content::NotificationDetails& details) { | 1417 const content::NotificationDetails& details) { |
1417 if (type == content::NOTIFICATION_WEB_CONTENTS_DESTROYED) { | 1418 if (type == content::NOTIFICATION_WEB_CONTENTS_DESTROYED) { |
1418 DCHECK_EQ(web_contents_, | 1419 DCHECK_EQ(web_contents_, |
1419 content::Source<WebContents>(source).ptr()); | 1420 content::Source<WebContents>(source).ptr()); |
(...skipping 14 matching lines...) Expand all Loading... |
1434 ContentSettingMediaStreamBubbleModel* | 1435 ContentSettingMediaStreamBubbleModel* |
1435 ContentSettingBubbleModel::AsMediaStreamBubbleModel() { | 1436 ContentSettingBubbleModel::AsMediaStreamBubbleModel() { |
1436 // In general, bubble models might not inherit from the media bubble model. | 1437 // In general, bubble models might not inherit from the media bubble model. |
1437 return nullptr; | 1438 return nullptr; |
1438 } | 1439 } |
1439 | 1440 |
1440 ContentSettingSubresourceFilterBubbleModel* | 1441 ContentSettingSubresourceFilterBubbleModel* |
1441 ContentSettingBubbleModel::AsSubresourceFilterBubbleModel() { | 1442 ContentSettingBubbleModel::AsSubresourceFilterBubbleModel() { |
1442 return nullptr; | 1443 return nullptr; |
1443 } | 1444 } |
OLD | NEW |