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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 void set_border_accepts_events(bool accept) { | 101 void set_border_accepts_events(bool accept) { |
102 border_accepts_events_ = accept; | 102 border_accepts_events_ = accept; |
103 } | 103 } |
104 | 104 |
105 bool adjust_if_offscreen() const { return adjust_if_offscreen_; } | 105 bool adjust_if_offscreen() const { return adjust_if_offscreen_; } |
106 void set_adjust_if_offscreen(bool adjust) { adjust_if_offscreen_ = adjust; } | 106 void set_adjust_if_offscreen(bool adjust) { adjust_if_offscreen_ = adjust; } |
107 | 107 |
108 // Get the arrow's anchor rect in screen space. | 108 // Get the arrow's anchor rect in screen space. |
109 virtual gfx::Rect GetAnchorRect(); | 109 virtual gfx::Rect GetAnchorRect(); |
110 | 110 |
111 // Show the bubble's widget (and |border_widget_| on Windows). | |
112 void Show(); | |
113 | |
114 // Fade the bubble in or out via Widget transparency. | 111 // Fade the bubble in or out via Widget transparency. |
115 // Fade in calls Widget::Show; fade out calls Widget::Close upon completion. | 112 // Fade in calls Widget::Show; fade out calls Widget::Close upon completion. |
116 void StartFade(bool fade_in); | 113 void StartFade(bool fade_in); |
117 | 114 |
118 // Reset fade and opacity of bubble. Restore the opacity of the | 115 // Reset fade and opacity of bubble. Restore the opacity of the |
119 // bubble to the setting before StartFade() was called. | 116 // bubble to the setting before StartFade() was called. |
120 void ResetFade(); | 117 void ResetFade(); |
121 | 118 |
122 // Sets the bubble alignment relative to the anchor. This may only be called | 119 // Sets the bubble alignment relative to the anchor. This may only be called |
123 // after calling CreateBubble. | 120 // after calling CreateBubble. |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 | 224 |
228 // Parent native window of the bubble. | 225 // Parent native window of the bubble. |
229 gfx::NativeView parent_window_; | 226 gfx::NativeView parent_window_; |
230 | 227 |
231 DISALLOW_COPY_AND_ASSIGN(BubbleDelegateView); | 228 DISALLOW_COPY_AND_ASSIGN(BubbleDelegateView); |
232 }; | 229 }; |
233 | 230 |
234 } // namespace views | 231 } // namespace views |
235 | 232 |
236 #endif // UI_VIEWS_BUBBLE_BUBBLE_DELEGATE_H_ | 233 #endif // UI_VIEWS_BUBBLE_BUBBLE_DELEGATE_H_ |
OLD | NEW |