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

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

Issue 319553008: Updated Plugin bubble model to add "learn more" link and to appear with a sliding yellow thing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated so that the yellow thing occurs only when the content setting is set to allow Created 6 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 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 2acc49698b1cf1f11cbe5ec009093b2ccdbdab24..16277600014bda5aedd97dc91ab21116f7165c93 100644
--- a/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
+++ b/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
@@ -95,6 +95,7 @@ ContentSettingTitleAndLinkModel::ContentSettingTitleAndLinkModel(
DCHECK_NE(content_type, CONTENT_SETTINGS_TYPE_NOTIFICATIONS);
SetTitle();
SetManageLink();
+ SetLearnMoreLink();
}
void ContentSettingTitleAndLinkModel::SetTitle() {
@@ -156,6 +157,22 @@ void ContentSettingTitleAndLinkModel::OnManageLinkClicked() {
delegate_->ShowContentSettingsPage(content_type());
}
+void ContentSettingTitleAndLinkModel::SetLearnMoreLink() {
+ static const ContentSettingsTypeIdEntry kLearnMoreIDs[] = {
+ {CONTENT_SETTINGS_TYPE_PLUGINS, IDS_LEARN_MORE},
+ };
+ int learn_more_id =
+ GetIdForContentType(kLearnMoreIDs, arraysize(kLearnMoreIDs),
+ content_type());
+ if (learn_more_id)
+ set_learn_more_link(l10n_util::GetStringUTF8(learn_more_id));
+}
+
+void ContentSettingTitleAndLinkModel::OnLearnMoreLinkClicked() {
+ if (delegate_)
+ delegate_->ShowLearnMorePage(content_type());
+}
+
class ContentSettingTitleLinkAndCustomModel
: public ContentSettingTitleAndLinkModel {
public:

Powered by Google App Engine
This is Rietveld 408576698