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

Unified Diff: ui/views/bubble/tray_bubble_view.h

Issue 1876553002: mash: Close system tray bubble on click outside its bounds, part 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 4 years, 8 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: ui/views/bubble/tray_bubble_view.h
diff --git a/ui/views/bubble/tray_bubble_view.h b/ui/views/bubble/tray_bubble_view.h
index c0c0c7c28720ee8c14a6f419bd585a16fe485e66..079b474d5d4304f65104bbddf5e99bf28816bdb7 100644
--- a/ui/views/bubble/tray_bubble_view.h
+++ b/ui/views/bubble/tray_bubble_view.h
@@ -103,6 +103,10 @@ class VIEWS_EXPORT TrayBubbleView : public views::BubbleDelegateView,
int max_height;
bool can_activate;
bool close_on_deactivate;
+ // When true the bubble starts event capture when it opens and closes itself
+ // on mouse events outside its bounds. Used on mus. Can be combined with
+ // close_on_deactivate. Defaults to false.
+ bool close_via_capture;
SkColor arrow_color;
bool first_item_has_no_margin;
views::BubbleBorder::Arrow arrow;
@@ -161,6 +165,8 @@ class VIEWS_EXPORT TrayBubbleView : public views::BubbleDelegateView,
gfx::Size GetPreferredSize() const override;
gfx::Size GetMaximumSize() const override;
int GetHeightForWidth(int width) const override;
+ bool OnMousePressed(const ui::MouseEvent& event) override;
+ void OnMouseCaptureLost() override;
void OnMouseEntered(const ui::MouseEvent& event) override;
void OnMouseExited(const ui::MouseEvent& event) override;
void GetAccessibleState(ui::AXViewState* state) override;

Powered by Google App Engine
This is Rietveld 408576698