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

Unified Diff: chrome/browser/ui/views/content_setting_bubble_contents.cc

Issue 2169453003: Hide protocol handler icon in location bar after user is done (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: also remove header include 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
« no previous file with comments | « chrome/browser/ui/views/content_setting_bubble_contents.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/content_setting_bubble_contents.cc
diff --git a/chrome/browser/ui/views/content_setting_bubble_contents.cc b/chrome/browser/ui/views/content_setting_bubble_contents.cc
index 0ed18bd5296d27a26212ac106eb55f49ae2bff47..da0754f3db9c9fb1f7932ea737b5f6cb7e290f75 100644
--- a/chrome/browser/ui/views/content_setting_bubble_contents.cc
+++ b/chrome/browser/ui/views/content_setting_bubble_contents.cc
@@ -29,7 +29,6 @@
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/font_list.h"
#include "ui/gfx/text_utils.h"
-#include "ui/views/controls/button/label_button.h"
#include "ui/views/controls/button/menu_button.h"
#include "ui/views/controls/button/radio_button.h"
#include "ui/views/controls/combobox/combobox.h"
@@ -162,8 +161,7 @@ ContentSettingBubbleContents::ContentSettingBubbleContents(
content_setting_bubble_model_(content_setting_bubble_model),
custom_link_(NULL),
manage_link_(NULL),
- learn_more_link_(NULL),
- close_button_(NULL) {
+ learn_more_link_(NULL) {
// Compensate for built-in vertical padding in the anchor view's image.
set_anchor_view_insets(gfx::Insets(
GetLayoutConstant(LOCATION_BAR_BUBBLE_ANCHOR_VERTICAL_INSET), 0));
@@ -380,6 +378,15 @@ views::View* ContentSettingBubbleContents::CreateExtraView() {
return manage_link_;
}
+bool ContentSettingBubbleContents::Accept() {
+ content_setting_bubble_model_->OnDoneClicked();
+ return true;
+}
+
+bool ContentSettingBubbleContents::Close() {
+ return true;
+}
+
int ContentSettingBubbleContents::GetDialogButtons() const {
return ui::DIALOG_BUTTON_OK;
}
@@ -394,7 +401,6 @@ void ContentSettingBubbleContents::DidNavigateMainFrame(
const content::FrameNavigateParams& params) {
// Content settings are based on the main frame, so if it switches then
// close up shop.
- content_setting_bubble_model_->OnDoneClicked();
GetWidget()->Close();
}
@@ -402,13 +408,8 @@ void ContentSettingBubbleContents::ButtonPressed(views::Button* sender,
const ui::Event& event) {
RadioGroup::const_iterator i(
std::find(radio_group_.begin(), radio_group_.end(), sender));
- if (i != radio_group_.end()) {
- content_setting_bubble_model_->OnRadioClicked(i - radio_group_.begin());
- return;
- }
- DCHECK_EQ(sender, close_button_);
- content_setting_bubble_model_->OnDoneClicked();
- GetWidget()->Close();
+ DCHECK(i != radio_group_.end());
+ content_setting_bubble_model_->OnRadioClicked(i - radio_group_.begin());
}
void ContentSettingBubbleContents::LinkClicked(views::Link* source,
« no previous file with comments | « chrome/browser/ui/views/content_setting_bubble_contents.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698