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

Unified Diff: chrome/browser/ui/content_settings/content_setting_bubble_model.cc

Issue 2171713002: Safe browsing subresource filter bubble UI skeleton. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: xib with osx 10.9 Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
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;
+}

Powered by Google App Engine
This is Rietveld 408576698