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

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

Issue 10937008: Position apps list on Windows near the cursor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: removed xml file accidentally added Created 8 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « ui/app_list/app_list_view.cc ('k') | no next file » | 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_BUBBLE_DELEGATE_H_ 5 #ifndef UI_VIEWS_BUBBLE_BUBBLE_DELEGATE_H_
6 #define UI_VIEWS_BUBBLE_BUBBLE_DELEGATE_H_ 6 #define UI_VIEWS_BUBBLE_BUBBLE_DELEGATE_H_
7 7
8 #include "base/gtest_prod_util.h" 8 #include "base/gtest_prod_util.h"
9 #include "ui/base/animation/animation_delegate.h" 9 #include "ui/base/animation/animation_delegate.h"
10 #include "ui/views/bubble/bubble_border.h" 10 #include "ui/views/bubble/bubble_border.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 void set_close_on_esc(bool close_on_esc) { close_on_esc_ = close_on_esc; } 55 void set_close_on_esc(bool close_on_esc) { close_on_esc_ = close_on_esc; }
56 56
57 bool close_on_deactivate() const { return close_on_deactivate_; } 57 bool close_on_deactivate() const { return close_on_deactivate_; }
58 void set_close_on_deactivate(bool close_on_deactivate) { 58 void set_close_on_deactivate(bool close_on_deactivate) {
59 close_on_deactivate_ = close_on_deactivate; 59 close_on_deactivate_ = close_on_deactivate;
60 } 60 }
61 61
62 View* anchor_view() const { return anchor_view_; } 62 View* anchor_view() const { return anchor_view_; }
63 Widget* anchor_widget() const { return anchor_widget_; } 63 Widget* anchor_widget() const { return anchor_widget_; }
64 64
65 // The anchor point is used in the absence of an anchor view.
66 const gfx::Point& anchor_point() const { return anchor_point_; }
67
65 BubbleBorder::ArrowLocation arrow_location() const { return arrow_location_; } 68 BubbleBorder::ArrowLocation arrow_location() const { return arrow_location_; }
66 void set_arrow_location(BubbleBorder::ArrowLocation arrow_location) { 69 void set_arrow_location(BubbleBorder::ArrowLocation arrow_location) {
67 arrow_location_ = arrow_location; 70 arrow_location_ = arrow_location;
68 } 71 }
69 72
70 SkColor color() const { return color_; } 73 SkColor color() const { return color_; }
71 void set_color(SkColor color) { color_ = color; } 74 void set_color(SkColor color) { color_ = color; }
72 75
73 const gfx::Insets& margins() const { return margins_; } 76 const gfx::Insets& margins() const { return margins_; }
74 void set_margins(const gfx::Insets& margins) { margins_ = margins; } 77 void set_margins(const gfx::Insets& margins) { margins_ = margins; }
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE; 123 virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE;
121 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; 124 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE;
122 125
123 // Perform view initialization on the contents for bubble sizing. 126 // Perform view initialization on the contents for bubble sizing.
124 virtual void Init(); 127 virtual void Init();
125 128
126 // Set the anchor view, this (or set_anchor_point) must be done before 129 // Set the anchor view, this (or set_anchor_point) must be done before
127 // calling CreateBubble or Show. 130 // calling CreateBubble or Show.
128 void set_anchor_view(View* anchor_view) { anchor_view_ = anchor_view; } 131 void set_anchor_view(View* anchor_view) { anchor_view_ = anchor_view; }
129 132
130 // Sets the anchor point used in the absence of an anchor view. This 133 // The anchor point or anchor view must be set before calling CreateBubble or
131 // (or set_anchor_view) must be set before calling CreateBubble or Show. 134 // Show.
132 void set_anchor_point(gfx::Point anchor_point) { 135 void set_anchor_point(gfx::Point anchor_point) {
133 anchor_point_ = anchor_point; 136 anchor_point_ = anchor_point;
134 } 137 }
135 138
136 bool move_with_anchor() const { return move_with_anchor_; } 139 bool move_with_anchor() const { return move_with_anchor_; }
137 void set_move_with_anchor(bool move_with_anchor) { 140 void set_move_with_anchor(bool move_with_anchor) {
138 move_with_anchor_ = move_with_anchor; 141 move_with_anchor_ = move_with_anchor;
139 } 142 }
140 143
141 // Resizes and potentially moves the Bubble to best accommodate the 144 // Resizes and potentially moves the Bubble to best accommodate the
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 204
202 // Parent native window of the bubble. 205 // Parent native window of the bubble.
203 gfx::NativeView parent_window_; 206 gfx::NativeView parent_window_;
204 207
205 DISALLOW_COPY_AND_ASSIGN(BubbleDelegateView); 208 DISALLOW_COPY_AND_ASSIGN(BubbleDelegateView);
206 }; 209 };
207 210
208 } // namespace views 211 } // namespace views
209 212
210 #endif // UI_VIEWS_BUBBLE_BUBBLE_DELEGATE_H_ 213 #endif // UI_VIEWS_BUBBLE_BUBBLE_DELEGATE_H_
OLDNEW
« no previous file with comments | « ui/app_list/app_list_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698