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

Side by Side Diff: ui/views/bubble/tray_bubble_view.h

Issue 1887273002: Revert of mash: Close system tray bubble on click outside its bounds, part 1 (patchset #4 id:60001 … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « ash/system/tray/system_tray.cc ('k') | ui/views/bubble/tray_bubble_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_VIEWS_BUBBLE_TRAY_BUBBLE_VIEW_H_ 5 #ifndef UI_VIEWS_BUBBLE_TRAY_BUBBLE_VIEW_H_
6 #define UI_VIEWS_BUBBLE_TRAY_BUBBLE_VIEW_H_ 6 #define UI_VIEWS_BUBBLE_TRAY_BUBBLE_VIEW_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 int min_width, 97 int min_width,
98 int max_width); 98 int max_width);
99 InitParams(const InitParams& other); 99 InitParams(const InitParams& other);
100 AnchorType anchor_type; 100 AnchorType anchor_type;
101 AnchorAlignment anchor_alignment; 101 AnchorAlignment anchor_alignment;
102 int min_width; 102 int min_width;
103 int max_width; 103 int max_width;
104 int max_height; 104 int max_height;
105 bool can_activate; 105 bool can_activate;
106 bool close_on_deactivate; 106 bool close_on_deactivate;
107 // When true the bubble starts event capture when it opens and closes itself
108 // on mouse events outside its bounds. Used on mus. Can be combined with
109 // close_on_deactivate. Defaults to false.
110 bool close_via_capture;
111 SkColor arrow_color; 107 SkColor arrow_color;
112 bool first_item_has_no_margin; 108 bool first_item_has_no_margin;
113 views::BubbleBorder::Arrow arrow; 109 views::BubbleBorder::Arrow arrow;
114 int arrow_offset; 110 int arrow_offset;
115 views::BubbleBorder::ArrowPaintType arrow_paint_type; 111 views::BubbleBorder::ArrowPaintType arrow_paint_type;
116 views::BubbleBorder::Shadow shadow; 112 views::BubbleBorder::Shadow shadow;
117 views::BubbleBorder::BubbleAlignment arrow_alignment; 113 views::BubbleBorder::BubbleAlignment arrow_alignment;
118 }; 114 };
119 115
120 // Constructs and returns a TrayBubbleView. init_params may be modified. 116 // Constructs and returns a TrayBubbleView. init_params may be modified.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 bool WidgetHasHitTestMask() const override; 155 bool WidgetHasHitTestMask() const override;
160 void GetWidgetHitTestMask(gfx::Path* mask) const override; 156 void GetWidgetHitTestMask(gfx::Path* mask) const override;
161 157
162 // Overridden from views::BubbleDelegateView. 158 // Overridden from views::BubbleDelegateView.
163 gfx::Rect GetAnchorRect() const override; 159 gfx::Rect GetAnchorRect() const override;
164 160
165 // Overridden from views::View. 161 // Overridden from views::View.
166 gfx::Size GetPreferredSize() const override; 162 gfx::Size GetPreferredSize() const override;
167 gfx::Size GetMaximumSize() const override; 163 gfx::Size GetMaximumSize() const override;
168 int GetHeightForWidth(int width) const override; 164 int GetHeightForWidth(int width) const override;
169 bool OnMousePressed(const ui::MouseEvent& event) override;
170 void OnMouseCaptureLost() override;
171 void OnMouseEntered(const ui::MouseEvent& event) override; 165 void OnMouseEntered(const ui::MouseEvent& event) override;
172 void OnMouseExited(const ui::MouseEvent& event) override; 166 void OnMouseExited(const ui::MouseEvent& event) override;
173 void GetAccessibleState(ui::AXViewState* state) override; 167 void GetAccessibleState(ui::AXViewState* state) override;
174 168
175 // Overridden from MouseWatcherListener 169 // Overridden from MouseWatcherListener
176 void MouseMovedOutOfHost() override; 170 void MouseMovedOutOfHost() override;
177 171
178 protected: 172 protected:
179 TrayBubbleView(gfx::NativeView parent_window, 173 TrayBubbleView(gfx::NativeView parent_window,
180 views::View* anchor, 174 views::View* anchor,
(...skipping 25 matching lines...) Expand all
206 200
207 // Used to find any mouse movements. 201 // Used to find any mouse movements.
208 std::unique_ptr<MouseWatcher> mouse_watcher_; 202 std::unique_ptr<MouseWatcher> mouse_watcher_;
209 203
210 DISALLOW_COPY_AND_ASSIGN(TrayBubbleView); 204 DISALLOW_COPY_AND_ASSIGN(TrayBubbleView);
211 }; 205 };
212 206
213 } // namespace views 207 } // namespace views
214 208
215 #endif // UI_VIEWS_BUBBLE_TRAY_BUBBLE_VIEW_H_ 209 #endif // UI_VIEWS_BUBBLE_TRAY_BUBBLE_VIEW_H_
OLDNEW
« no previous file with comments | « ash/system/tray/system_tray.cc ('k') | ui/views/bubble/tray_bubble_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698