| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_DIALOG_DELEGATE_H_ | 5 #ifndef UI_VIEWS_BUBBLE_BUBBLE_DIALOG_DELEGATE_H_ |
| 6 #define UI_VIEWS_BUBBLE_BUBBLE_DIALOG_DELEGATE_H_ | 6 #define UI_VIEWS_BUBBLE_BUBBLE_DIALOG_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "base/gtest_prod_util.h" | 8 #include "base/gtest_prod_util.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.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 // Sets |margins_| to a default picked for smaller bubbles. | 106 // Sets |margins_| to a default picked for smaller bubbles. |
| 107 void UseCompactMargins(); | 107 void UseCompactMargins(); |
| 108 | 108 |
| 109 // Sets the bubble alignment relative to the anchor. This may only be called | 109 // Sets the bubble alignment relative to the anchor. This may only be called |
| 110 // after calling CreateBubble. | 110 // after calling CreateBubble. |
| 111 void SetAlignment(BubbleBorder::BubbleAlignment alignment); | 111 void SetAlignment(BubbleBorder::BubbleAlignment alignment); |
| 112 | 112 |
| 113 // Sets the bubble arrow paint type. | 113 // Sets the bubble arrow paint type. |
| 114 void SetArrowPaintType(BubbleBorder::ArrowPaintType paint_type); | 114 void SetArrowPaintType(BubbleBorder::ArrowPaintType paint_type); |
| 115 | 115 |
| 116 // Sets the bubble border interior thickness. |
| 117 void SetBorderInteriorThickness(int thickness); |
| 118 |
| 116 // Call this method when the anchor bounds have changed to reposition the | 119 // Call this method when the anchor bounds have changed to reposition the |
| 117 // bubble. The bubble is automatically repositioned when the anchor view | 120 // bubble. The bubble is automatically repositioned when the anchor view |
| 118 // bounds change as a result of the widget's bounds changing. | 121 // bounds change as a result of the widget's bounds changing. |
| 119 void OnAnchorBoundsChanged(); | 122 void OnAnchorBoundsChanged(); |
| 120 | 123 |
| 121 protected: | 124 protected: |
| 122 BubbleDialogDelegateView(); | 125 BubbleDialogDelegateView(); |
| 123 BubbleDialogDelegateView(View* anchor_view, BubbleBorder::Arrow arrow); | 126 BubbleDialogDelegateView(View* anchor_view, BubbleBorder::Arrow arrow); |
| 124 | 127 |
| 125 // Get bubble bounds from the anchor rect and client view's preferred size. | 128 // Get bubble bounds from the anchor rect and client view's preferred size. |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 | 204 |
| 202 // Parent native window of the bubble. | 205 // Parent native window of the bubble. |
| 203 gfx::NativeView parent_window_; | 206 gfx::NativeView parent_window_; |
| 204 | 207 |
| 205 DISALLOW_COPY_AND_ASSIGN(BubbleDialogDelegateView); | 208 DISALLOW_COPY_AND_ASSIGN(BubbleDialogDelegateView); |
| 206 }; | 209 }; |
| 207 | 210 |
| 208 } // namespace views | 211 } // namespace views |
| 209 | 212 |
| 210 #endif // UI_VIEWS_BUBBLE_BUBBLE_DELEGATE2_H_ | 213 #endif // UI_VIEWS_BUBBLE_BUBBLE_DELEGATE2_H_ |
| OLD | NEW |