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

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

Issue 10900018: Introduce App Launcher for Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup Created 8 years, 4 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/bubble_delegate.h
diff --git a/ui/views/bubble/bubble_delegate.h b/ui/views/bubble/bubble_delegate.h
index 04cac9cff95c6c7741ac9da12cf7a369435f4ef2..9d32d65a0ea61e578eb785d5a59417e7e60e1a55 100644
--- a/ui/views/bubble/bubble_delegate.h
+++ b/ui/views/bubble/bubble_delegate.h
@@ -122,9 +122,16 @@ class VIEWS_EXPORT BubbleDelegateView : public WidgetDelegateView,
// Perform view initialization on the contents for bubble sizing.
virtual void Init();
- // Set the anchor view, this must be done before calling CreateBubble or Show.
+ // Set the anchor view, this (or set_anchor_point) must be done before
+ // calling CreateBubble or Show.
void set_anchor_view(View* anchor_view) { anchor_view_ = anchor_view; }
+ // Sets the point to anchor to, in the absence of a view to anchor to. This
msw 2012/08/29 08:02:35 nit: consider "Sets the anchor point used in absen
benwells 2012/08/30 06:51:30 Done.
+ // (or set_anchor_view) be set before calling CreateBubble or Show.
+ void set_anchor_point(gfx::Point anchor_point) {
+ anchor_point_ = anchor_point;
msw 2012/08/29 08:02:35 nit: fits on the line above.
benwells 2012/08/30 06:51:30 It's two characters over with the closing }, unles
+ }
+
bool move_with_anchor() const { return move_with_anchor_; }
void set_move_with_anchor(bool move_with_anchor) {
move_with_anchor_ = move_with_anchor;
@@ -156,6 +163,10 @@ class VIEWS_EXPORT BubbleDelegateView : public WidgetDelegateView,
View* anchor_view_;
Widget* anchor_widget_;
+ // If there is no view or widget the bubble should be anchored to, it can be
msw 2012/08/29 08:02:35 nit: consider "The anchor point used in absence of
benwells 2012/08/30 06:51:30 Done.
+ // anchored to a fixed point instead.
+ gfx::Point anchor_point_;
+
// If true, the bubble will re-anchor (and may resize) with |anchor_widget_|.
bool move_with_anchor_;

Powered by Google App Engine
This is Rietveld 408576698