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

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

Issue 2724903008: Force chooser bubbles to close synchronously. (Closed)
Patch Set: Address msw@'s nits. Created 3 years, 9 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 | « no previous file | chrome/browser/ui/views/website_settings/chooser_bubble_ui_view.cc » ('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.h
diff --git a/chrome/browser/ui/views/website_settings/chooser_bubble_ui_view.h b/chrome/browser/ui/views/website_settings/chooser_bubble_ui_view.h
index 596dbd344d3ca9c654bb02fcf49a2a83c81f0c33..44000891d8019efc15f281064d9bbcabb70f7dc0 100644
--- a/chrome/browser/ui/views/website_settings/chooser_bubble_ui_view.h
+++ b/chrome/browser/ui/views/website_settings/chooser_bubble_ui_view.h
@@ -10,6 +10,7 @@
#include "base/macros.h"
#include "components/bubble/bubble_ui.h"
#include "ui/views/bubble/bubble_border.h"
+#include "ui/views/widget/widget_observer.h"
namespace views {
class View;
@@ -24,7 +25,7 @@ class ChooserBubbleUiViewDelegate;
// for user to grant permission. It can be used by the WebUSB or WebBluetooth
// APIs. It is owned by the BubbleController, which is owned by the
// BubbleManager.
-class ChooserBubbleUiView : public BubbleUi {
+class ChooserBubbleUiView : public BubbleUi, public views::WidgetObserver {
public:
ChooserBubbleUiView(Browser* browser,
std::unique_ptr<ChooserController> chooser_controller);
@@ -35,13 +36,16 @@ class ChooserBubbleUiView : public BubbleUi {
void Close() override;
void UpdateAnchorPosition() override;
+ // views::WidgetObserver:
+ void OnWidgetClosing(views::Widget* widget) override;
+
private:
views::View* GetAnchorView();
views::BubbleBorder::Arrow GetAnchorArrow();
Browser* browser_; // Weak.
// Weak. Owned by its parent view.
- ChooserBubbleUiViewDelegate* chooser_bubble_ui_view_delegate_;
+ ChooserBubbleUiViewDelegate* bubble_view_ = nullptr;
DISALLOW_COPY_AND_ASSIGN(ChooserBubbleUiView);
};
« no previous file with comments | « no previous file | chrome/browser/ui/views/website_settings/chooser_bubble_ui_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698