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

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: First round of feedback 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..89c6fc4ca455c5e834186cbaced32cbecff12f1b 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 anchor point used in the absence of an anchor view. This
+ // (or set_anchor_view) must be set before calling CreateBubble or Show.
+ void set_anchor_point(gfx::Point anchor_point) {
+ anchor_point_ = anchor_point;
+ }
+
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,9 @@ class VIEWS_EXPORT BubbleDelegateView : public WidgetDelegateView,
View* anchor_view_;
Widget* anchor_widget_;
+ // The anchor point used in the absence of an anchor view.
+ 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