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

Unified Diff: chrome/browser/ui/views/website_settings/chooser_bubble_ui_view.cc

Issue 1530493002: Remove Close button for chooser bubble and call CloseBubble when Cancel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use std::move instead of .Pass() Created 5 years 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 | « no previous file | chrome/browser/usb/usb_chooser_bubble_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/website_settings/chooser_bubble_ui_view.cc
diff --git a/chrome/browser/ui/views/website_settings/chooser_bubble_ui_view.cc b/chrome/browser/ui/views/website_settings/chooser_bubble_ui_view.cc
index 15851bf48633194dcca349dd2d234725cfda7a3b..3330818fdfaaac7fe69c5001d6f82e62ff026135 100644
--- a/chrome/browser/ui/views/website_settings/chooser_bubble_ui_view.cc
+++ b/chrome/browser/ui/views/website_settings/chooser_bubble_ui_view.cc
@@ -74,7 +74,6 @@ class ChooserBubbleUiViewDelegate : public views::BubbleDelegateView,
void Close();
// BubbleDelegateView:
- bool ShouldShowCloseButton() const override;
bool ShouldShowWindowTitle() const override;
base::string16 GetWindowTitle() const override;
void OnWidgetDestroying(views::Widget* widget) override;
@@ -288,10 +287,6 @@ void ChooserBubbleUiViewDelegate::Close() {
GetWidget()->Close();
}
-bool ChooserBubbleUiViewDelegate::ShouldShowCloseButton() const {
- return true;
-}
-
bool ChooserBubbleUiViewDelegate::ShouldShowWindowTitle() const {
return true;
}
@@ -310,12 +305,17 @@ void ChooserBubbleUiViewDelegate::OnWidgetDestroying(views::Widget* widget) {
void ChooserBubbleUiViewDelegate::ButtonPressed(views::Button* button,
const ui::Event& event) {
+ button_pressed_ = true;
+
if (button == connect_button_)
chooser_bubble_delegate_->Select(table_view_->selection_model().active());
else
chooser_bubble_delegate_->Cancel();
- button_pressed_ = true;
- owner_->Close();
+
+ if (owner_) {
+ owner_->Close();
+ owner_ = nullptr;
+ }
}
void ChooserBubbleUiViewDelegate::OnSelectionChanged() {
« no previous file with comments | « no previous file | chrome/browser/usb/usb_chooser_bubble_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698