OLD | NEW |
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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 // Set the anchor view or rect; set these before CreateBubble or Show. | 143 // Set the anchor view or rect; set these before CreateBubble or Show. |
144 void set_anchor_view(View* anchor_view) { anchor_view_ = anchor_view; } | 144 void set_anchor_view(View* anchor_view) { anchor_view_ = anchor_view; } |
145 void set_anchor_rect(const gfx::Rect& rect) { anchor_rect_ = rect; } | 145 void set_anchor_rect(const gfx::Rect& rect) { anchor_rect_ = rect; } |
146 | 146 |
147 // Resize and potentially move the bubble to fit the content's preferred size. | 147 // Resize and potentially move the bubble to fit the content's preferred size. |
148 void SizeToContents(); | 148 void SizeToContents(); |
149 | 149 |
150 BubbleFrameView* GetBubbleFrameView() const; | 150 BubbleFrameView* GetBubbleFrameView() const; |
151 | 151 |
152 private: | 152 private: |
153 FRIEND_TEST_ALL_PREFIXES(BubbleFrameViewTest, NonClientHitTest); | |
154 FRIEND_TEST_ALL_PREFIXES(BubbleDelegateTest, CreateDelegate); | 153 FRIEND_TEST_ALL_PREFIXES(BubbleDelegateTest, CreateDelegate); |
| 154 FRIEND_TEST_ALL_PREFIXES(BubbleDelegateTest, NonClientHitTest); |
155 | 155 |
156 // Update the bubble color from |theme|, unless it was explicitly set. | 156 // Update the bubble color from |theme|, unless it was explicitly set. |
157 void UpdateColorsFromTheme(const ui::NativeTheme* theme); | 157 void UpdateColorsFromTheme(const ui::NativeTheme* theme); |
158 | 158 |
159 #if defined(OS_WIN) && !defined(USE_AURA) | 159 #if defined(OS_WIN) && !defined(USE_AURA) |
160 // Get bounds for the Windows-only widget that hosts the bubble's contents. | 160 // Get bounds for the Windows-only widget that hosts the bubble's contents. |
161 gfx::Rect GetBubbleClientBounds() const; | 161 gfx::Rect GetBubbleClientBounds() const; |
162 #endif | 162 #endif |
163 | 163 |
164 // Fade animation for bubble. | 164 // Fade animation for bubble. |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 | 213 |
214 // Parent native window of the bubble. | 214 // Parent native window of the bubble. |
215 gfx::NativeView parent_window_; | 215 gfx::NativeView parent_window_; |
216 | 216 |
217 DISALLOW_COPY_AND_ASSIGN(BubbleDelegateView); | 217 DISALLOW_COPY_AND_ASSIGN(BubbleDelegateView); |
218 }; | 218 }; |
219 | 219 |
220 } // namespace views | 220 } // namespace views |
221 | 221 |
222 #endif // UI_VIEWS_BUBBLE_BUBBLE_DELEGATE_H_ | 222 #endif // UI_VIEWS_BUBBLE_BUBBLE_DELEGATE_H_ |
OLD | NEW |