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

Side by Side 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, 3 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
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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 // View overrides: 115 // View overrides:
116 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE; 116 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE;
117 117
118 // ui::AnimationDelegate overrides: 118 // ui::AnimationDelegate overrides:
119 virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE; 119 virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE;
120 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; 120 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE;
121 121
122 // Perform view initialization on the contents for bubble sizing. 122 // Perform view initialization on the contents for bubble sizing.
123 virtual void Init(); 123 virtual void Init();
124 124
125 // Set the anchor view, this must be done before calling CreateBubble or Show. 125 // Set the anchor view, this (or set_anchor_point) must be done before
126 // calling CreateBubble or Show.
126 void set_anchor_view(View* anchor_view) { anchor_view_ = anchor_view; } 127 void set_anchor_view(View* anchor_view) { anchor_view_ = anchor_view; }
127 128
129 // 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.
130 // (or set_anchor_view) be set before calling CreateBubble or Show.
131 void set_anchor_point(gfx::Point anchor_point) {
132 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
133 }
134
128 bool move_with_anchor() const { return move_with_anchor_; } 135 bool move_with_anchor() const { return move_with_anchor_; }
129 void set_move_with_anchor(bool move_with_anchor) { 136 void set_move_with_anchor(bool move_with_anchor) {
130 move_with_anchor_ = move_with_anchor; 137 move_with_anchor_ = move_with_anchor;
131 } 138 }
132 139
133 // Resizes and potentially moves the Bubble to best accommodate the 140 // Resizes and potentially moves the Bubble to best accommodate the
134 // contents preferred size. 141 // contents preferred size.
135 void SizeToContents(); 142 void SizeToContents();
136 143
137 BubbleFrameView* GetBubbleFrameView() const; 144 BubbleFrameView* GetBubbleFrameView() const;
(...skipping 11 matching lines...) Expand all
149 scoped_ptr<ui::SlideAnimation> fade_animation_; 156 scoped_ptr<ui::SlideAnimation> fade_animation_;
150 157
151 // Flags controlling bubble closure on the escape key and deactivation. 158 // Flags controlling bubble closure on the escape key and deactivation.
152 bool close_on_esc_; 159 bool close_on_esc_;
153 bool close_on_deactivate_; 160 bool close_on_deactivate_;
154 161
155 // The view and widget to which this bubble is anchored. 162 // The view and widget to which this bubble is anchored.
156 View* anchor_view_; 163 View* anchor_view_;
157 Widget* anchor_widget_; 164 Widget* anchor_widget_;
158 165
166 // 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.
167 // anchored to a fixed point instead.
168 gfx::Point anchor_point_;
169
159 // If true, the bubble will re-anchor (and may resize) with |anchor_widget_|. 170 // If true, the bubble will re-anchor (and may resize) with |anchor_widget_|.
160 bool move_with_anchor_; 171 bool move_with_anchor_;
161 172
162 // The arrow's location on the bubble. 173 // The arrow's location on the bubble.
163 BubbleBorder::ArrowLocation arrow_location_; 174 BubbleBorder::ArrowLocation arrow_location_;
164 175
165 // The background color of the bubble. 176 // The background color of the bubble.
166 SkColor color_; 177 SkColor color_;
167 178
168 // The margins between the content and the inside of the border. 179 // The margins between the content and the inside of the border.
(...skipping 21 matching lines...) Expand all
190 201
191 // Parent native window of the bubble. 202 // Parent native window of the bubble.
192 gfx::NativeView parent_window_; 203 gfx::NativeView parent_window_;
193 204
194 DISALLOW_COPY_AND_ASSIGN(BubbleDelegateView); 205 DISALLOW_COPY_AND_ASSIGN(BubbleDelegateView);
195 }; 206 };
196 207
197 } // namespace views 208 } // namespace views
198 209
199 #endif // UI_VIEWS_BUBBLE_BUBBLE_DELEGATE_H_ 210 #endif // UI_VIEWS_BUBBLE_BUBBLE_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698