Chromium Code Reviews| Index: chrome/browser/ui/content_settings/content_setting_bubble_model.cc |
| diff --git a/chrome/browser/ui/content_settings/content_setting_bubble_model.cc b/chrome/browser/ui/content_settings/content_setting_bubble_model.cc |
| index bfd711a8d0e036d125082fc931d49a5f7ec52133..f6a7b1498856247a72c94b9bbfcbfb7892b8a9c8 100644 |
| --- a/chrome/browser/ui/content_settings/content_setting_bubble_model.cc |
| +++ b/chrome/browser/ui/content_settings/content_setting_bubble_model.cc |
| @@ -35,6 +35,7 @@ |
| #include "components/content_settings/core/common/content_settings.h" |
| #include "components/prefs/pref_service.h" |
| #include "components/rappor/rappor_utils.h" |
| +#include "components/subresource_filter/content/browser/content_subresource_filter_driver_factory.h" |
|
msramek
2016/07/27 09:46:21
nit: Unused (you just left a TODO)
melandory
2016/07/27 12:53:40
Done.
|
| #include "components/url_formatter/elide_url.h" |
| #include "content/public/browser/notification_service.h" |
| #include "content/public/browser/render_frame_host.h" |
| @@ -1338,3 +1339,45 @@ ContentSettingMediaStreamBubbleModel* |
| // In general, bubble models might not inherit from the media bubble model. |
| return nullptr; |
| } |
| + |
| +ContentSettingSubresourceFilterBubbleModel* |
| +ContentSettingBubbleModel::AsSubresourceFilterBubbleModel() { |
| + return nullptr; |
|
msramek
2016/07/27 09:46:21
nit: Also copy-paste the comment? :)
melandory
2016/07/27 12:53:40
https://codereview.chromium.org/2171713002/diff/80
|
| +} |
| + |
| +// ContentSettingSubresourceFilterBubbleModel ---------------------------------- |
|
msramek
2016/07/27 09:46:21
Please move this higher up. The most general secti
melandory
2016/07/27 12:53:40
Done.
|
| + |
| +ContentSettingSubresourceFilterBubbleModel:: |
| + ContentSettingSubresourceFilterBubbleModel(Delegate* delegate, |
| + WebContents* web_contents, |
| + Profile* profile) |
| + : ContentSettingBubbleModel(delegate, web_contents, profile) { |
| + SetTitle(); |
| + SetManageLink(); |
| +} |
| + |
| +ContentSettingSubresourceFilterBubbleModel:: |
| + ~ContentSettingSubresourceFilterBubbleModel() {} |
| + |
| +void ContentSettingSubresourceFilterBubbleModel::SetTitle() { |
| + // TODO(melandory): For this bubble we need to introduce ability to have a |
| + // caption (something which appears above title and has bigger font). |
| + set_title(l10n_util::GetStringUTF8( |
| + IDS_FILTERED_DECEPTIVE_CONTENT_PROMPT_EXPLANATION)); |
| +} |
| + |
| +void ContentSettingSubresourceFilterBubbleModel::SetManageLink() { |
| + // TODO(melandory): introduce the button instead of link. |
| + set_manage_link( |
| + l10n_util::GetStringUTF8(IDS_FILTERED_DECEPTIVE_CONTENT_PROMPT_RELOAD)); |
| +} |
| + |
| +void ContentSettingSubresourceFilterBubbleModel::OnManageLinkClicked() { |
| + // TODO(melandory): Notify ContentSubresourceFilterDriverFactory page reload |
| + // was requested. |
| +} |
| + |
| +ContentSettingSubresourceFilterBubbleModel* |
| +ContentSettingSubresourceFilterBubbleModel::AsSubresourceFilterBubbleModel() { |
| + return this; |
| +} |