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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 // Fade-in calls Widget::Show; fade-out calls Widget::Close upon completion. | 106 // Fade-in calls Widget::Show; fade-out calls Widget::Close upon completion. |
107 void StartFade(bool fade_in); | 107 void StartFade(bool fade_in); |
108 | 108 |
109 // Restores bubble opacity to its value before StartFade() was called. | 109 // Restores bubble opacity to its value before StartFade() was called. |
110 void ResetFade(); | 110 void ResetFade(); |
111 | 111 |
112 // Sets the bubble alignment relative to the anchor. This may only be called | 112 // Sets the bubble alignment relative to the anchor. This may only be called |
113 // after calling CreateBubble. | 113 // after calling CreateBubble. |
114 void SetAlignment(BubbleBorder::BubbleAlignment alignment); | 114 void SetAlignment(BubbleBorder::BubbleAlignment alignment); |
115 | 115 |
| 116 // Sets the bubble arrow paint type. |
| 117 void SetArrowPaintType(BubbleBorder::ArrowPaintType paint_type); |
| 118 |
116 protected: | 119 protected: |
117 // Get bubble bounds from the anchor rect and client view's preferred size. | 120 // Get bubble bounds from the anchor rect and client view's preferred size. |
118 virtual gfx::Rect GetBubbleBounds(); | 121 virtual gfx::Rect GetBubbleBounds(); |
119 | 122 |
120 // Returns the duration in milliseconds for the fade animation. | 123 // Returns the duration in milliseconds for the fade animation. |
121 virtual int GetFadeDuration(); | 124 virtual int GetFadeDuration(); |
122 | 125 |
123 // View overrides: | 126 // View overrides: |
124 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE; | 127 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE; |
125 virtual void OnNativeThemeChanged(const ui::NativeTheme* theme) OVERRIDE; | 128 virtual void OnNativeThemeChanged(const ui::NativeTheme* theme) OVERRIDE; |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 | 207 |
205 // Parent native window of the bubble. | 208 // Parent native window of the bubble. |
206 gfx::NativeView parent_window_; | 209 gfx::NativeView parent_window_; |
207 | 210 |
208 DISALLOW_COPY_AND_ASSIGN(BubbleDelegateView); | 211 DISALLOW_COPY_AND_ASSIGN(BubbleDelegateView); |
209 }; | 212 }; |
210 | 213 |
211 } // namespace views | 214 } // namespace views |
212 | 215 |
213 #endif // UI_VIEWS_BUBBLE_BUBBLE_DELEGATE_H_ | 216 #endif // UI_VIEWS_BUBBLE_BUBBLE_DELEGATE_H_ |
OLD | NEW |