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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
119 | 119 |
120 // Call this method when the anchor view bounds have changed to reposition | 120 // Call this method when the anchor view bounds have changed to reposition |
121 // the bubble. The bubble is automatically repositioned when the anchor view | 121 // the bubble. The bubble is automatically repositioned when the anchor view |
122 // bounds change as a result of the widget's bounds changing. | 122 // bounds change as a result of the widget's bounds changing. |
123 void OnAnchorViewBoundsChanged(); | 123 void OnAnchorViewBoundsChanged(); |
124 | 124 |
125 protected: | 125 protected: |
126 // Get bubble bounds from the anchor rect and client view's preferred size. | 126 // Get bubble bounds from the anchor rect and client view's preferred size. |
127 virtual gfx::Rect GetBubbleBounds(); | 127 virtual gfx::Rect GetBubbleBounds(); |
128 | 128 |
129 // Get the preferred size of a bubble that matches it's title's width. | |
msw
2013/08/08 21:56:52
nit: s/it's/its/
Dan Beam
2013/08/09 01:47:58
Done.
| |
130 virtual gfx::Size GetPreferredSizeForTitle(); | |
131 | |
129 // Returns the duration in milliseconds for the fade animation. | 132 // Returns the duration in milliseconds for the fade animation. |
130 virtual int GetFadeDuration(); | 133 virtual int GetFadeDuration(); |
131 | 134 |
132 // View overrides: | 135 // View overrides: |
133 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE; | 136 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE; |
134 virtual void OnNativeThemeChanged(const ui::NativeTheme* theme) OVERRIDE; | 137 virtual void OnNativeThemeChanged(const ui::NativeTheme* theme) OVERRIDE; |
135 | 138 |
136 // ui::AnimationDelegate overrides: | 139 // ui::AnimationDelegate overrides: |
137 virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE; | 140 virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE; |
138 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; | 141 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
213 | 216 |
214 // Parent native window of the bubble. | 217 // Parent native window of the bubble. |
215 gfx::NativeView parent_window_; | 218 gfx::NativeView parent_window_; |
216 | 219 |
217 DISALLOW_COPY_AND_ASSIGN(BubbleDelegateView); | 220 DISALLOW_COPY_AND_ASSIGN(BubbleDelegateView); |
218 }; | 221 }; |
219 | 222 |
220 } // namespace views | 223 } // namespace views |
221 | 224 |
222 #endif // UI_VIEWS_BUBBLE_BUBBLE_DELEGATE_H_ | 225 #endif // UI_VIEWS_BUBBLE_BUBBLE_DELEGATE_H_ |
OLD | NEW |