| 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 | 59 |
| 60 View* GetAnchorView() const; | 60 View* GetAnchorView() const; |
| 61 Widget* anchor_widget() const { return anchor_widget_; } | 61 Widget* anchor_widget() const { return anchor_widget_; } |
| 62 | 62 |
| 63 // The anchor rect is used in the absence of an assigned anchor view. | 63 // The anchor rect is used in the absence of an assigned anchor view. |
| 64 const gfx::Rect& anchor_rect() const { return anchor_rect_; } | 64 const gfx::Rect& anchor_rect() const { return anchor_rect_; } |
| 65 | 65 |
| 66 BubbleBorder::Arrow arrow() const { return arrow_; } | 66 BubbleBorder::Arrow arrow() const { return arrow_; } |
| 67 void set_arrow(BubbleBorder::Arrow arrow) { arrow_ = arrow; } | 67 void set_arrow(BubbleBorder::Arrow arrow) { arrow_ = arrow; } |
| 68 | 68 |
| 69 void set_mirror_arrow_in_rtl(bool mirror) { mirror_arrow_in_rtl_ = mirror; } |
| 70 |
| 69 BubbleBorder::Shadow shadow() const { return shadow_; } | 71 BubbleBorder::Shadow shadow() const { return shadow_; } |
| 70 void set_shadow(BubbleBorder::Shadow shadow) { shadow_ = shadow; } | 72 void set_shadow(BubbleBorder::Shadow shadow) { shadow_ = shadow; } |
| 71 | 73 |
| 72 SkColor color() const { return color_; } | 74 SkColor color() const { return color_; } |
| 73 void set_color(SkColor color) { | 75 void set_color(SkColor color) { |
| 74 color_ = color; | 76 color_ = color; |
| 75 color_explicitly_set_ = true; | 77 color_explicitly_set_ = true; |
| 76 } | 78 } |
| 77 | 79 |
| 78 const gfx::Insets& margins() const { return margins_; } | 80 const gfx::Insets& margins() const { return margins_; } |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 // it from there. It will make sure that the view is still valid. | 167 // it from there. It will make sure that the view is still valid. |
| 166 const int anchor_view_storage_id_; | 168 const int anchor_view_storage_id_; |
| 167 Widget* anchor_widget_; | 169 Widget* anchor_widget_; |
| 168 | 170 |
| 169 // The anchor rect used in the absence of an anchor view. | 171 // The anchor rect used in the absence of an anchor view. |
| 170 mutable gfx::Rect anchor_rect_; | 172 mutable gfx::Rect anchor_rect_; |
| 171 | 173 |
| 172 // The arrow's location on the bubble. | 174 // The arrow's location on the bubble. |
| 173 BubbleBorder::Arrow arrow_; | 175 BubbleBorder::Arrow arrow_; |
| 174 | 176 |
| 177 // Automatically mirror the arrow in RTL layout. |
| 178 bool mirror_arrow_in_rtl_; |
| 179 |
| 175 // Bubble border shadow to use. | 180 // Bubble border shadow to use. |
| 176 BubbleBorder::Shadow shadow_; | 181 BubbleBorder::Shadow shadow_; |
| 177 | 182 |
| 178 // The background color of the bubble; and flag for when it's explicitly set. | 183 // The background color of the bubble; and flag for when it's explicitly set. |
| 179 SkColor color_; | 184 SkColor color_; |
| 180 bool color_explicitly_set_; | 185 bool color_explicitly_set_; |
| 181 | 186 |
| 182 // The margins between the content and the inside of the border. | 187 // The margins between the content and the inside of the border. |
| 183 gfx::Insets margins_; | 188 gfx::Insets margins_; |
| 184 | 189 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 195 | 200 |
| 196 // Parent native window of the bubble. | 201 // Parent native window of the bubble. |
| 197 gfx::NativeView parent_window_; | 202 gfx::NativeView parent_window_; |
| 198 | 203 |
| 199 DISALLOW_COPY_AND_ASSIGN(BubbleDialogDelegateView); | 204 DISALLOW_COPY_AND_ASSIGN(BubbleDialogDelegateView); |
| 200 }; | 205 }; |
| 201 | 206 |
| 202 } // namespace views | 207 } // namespace views |
| 203 | 208 |
| 204 #endif // UI_VIEWS_BUBBLE_BUBBLE_DELEGATE2_H_ | 209 #endif // UI_VIEWS_BUBBLE_BUBBLE_DELEGATE2_H_ |
| OLD | NEW |