summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/content_blocked_bubble_contents.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/views/content_blocked_bubble_contents.cc')
-rw-r--r--chrome/browser/views/content_blocked_bubble_contents.cc22
1 files changed, 21 insertions, 1 deletions
diff --git a/chrome/browser/views/content_blocked_bubble_contents.cc b/chrome/browser/views/content_blocked_bubble_contents.cc
index ab7675a..bef80be 100644
--- a/chrome/browser/views/content_blocked_bubble_contents.cc
+++ b/chrome/browser/views/content_blocked_bubble_contents.cc
@@ -102,7 +102,8 @@ ContentSettingBubbleContents::ContentSettingBubbleContents(
info_bubble_(NULL),
close_button_(NULL),
manage_link_(NULL),
- clear_link_(NULL) {
+ clear_link_(NULL),
+ info_link_(NULL) {
registrar_.Add(this, NotificationType::TAB_CONTENTS_DESTROYED,
Source<TabContents>(tab_contents));
}
@@ -150,6 +151,12 @@ void ContentSettingBubbleContents::LinkActivated(views::Link* source,
info_bubble_->Close(); // CAREFUL: This deletes us.
return;
}
+ if (source == info_link_) {
+ content_setting_bubble_model_->OnInfoLinkClicked();
+ info_bubble_->set_fade_away_on_close(true);
+ info_bubble_->Close(); // CAREFUL: This deletes us.
+ return;
+ }
PopupLinks::const_iterator i(popup_links_.find(source));
DCHECK(i != popup_links_.end());
@@ -283,6 +290,19 @@ void ContentSettingBubbleContents::InitControlLayout() {
layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
}
+ if (!bubble_content.info_link.empty()) {
+ info_link_ = new views::Link(UTF8ToWide(bubble_content.info_link));
+ info_link_->SetController(this);
+ layout->StartRow(0, single_column_set_id);
+ layout->AddView(info_link_);
+
+ layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
+ layout->StartRow(0, single_column_set_id);
+ layout->AddView(new views::Separator, 1, 1,
+ GridLayout::FILL, GridLayout::FILL);
+ layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
+ }
+
const int double_column_set_id = 1;
views::ColumnSet* double_column_set =
layout->AddColumnSet(double_column_set_id);