| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 void set_shadow(BubbleBorder::Shadow shadow) { shadow_ = shadow; } | 72 void set_shadow(BubbleBorder::Shadow shadow) { shadow_ = shadow; } |
| 73 | 73 |
| 74 SkColor color() const { return color_; } | 74 SkColor color() const { return color_; } |
| 75 void set_color(SkColor color) { | 75 void set_color(SkColor color) { |
| 76 color_ = color; | 76 color_ = color; |
| 77 color_explicitly_set_ = true; | 77 color_explicitly_set_ = true; |
| 78 } | 78 } |
| 79 | 79 |
| 80 const gfx::Insets& margins() const { return margins_; } | 80 const gfx::Insets& margins() const { return margins_; } |
| 81 void set_margins(const gfx::Insets& margins) { margins_ = margins; } | 81 void set_margins(const gfx::Insets& margins) { margins_ = margins; } |
| 82 void set_title_margins(const gfx::Insets& title_margins) { |
| 83 title_margins_ = title_margins; |
| 84 } |
| 82 | 85 |
| 83 const gfx::Insets& anchor_view_insets() const { return anchor_view_insets_; } | 86 const gfx::Insets& anchor_view_insets() const { return anchor_view_insets_; } |
| 84 void set_anchor_view_insets(const gfx::Insets& i) { anchor_view_insets_ = i; } | 87 void set_anchor_view_insets(const gfx::Insets& i) { anchor_view_insets_ = i; } |
| 85 | 88 |
| 86 gfx::NativeView parent_window() const { return parent_window_; } | 89 gfx::NativeView parent_window() const { return parent_window_; } |
| 87 void set_parent_window(gfx::NativeView window) { parent_window_ = window; } | 90 void set_parent_window(gfx::NativeView window) { parent_window_ = window; } |
| 88 | 91 |
| 89 bool accept_events() const { return accept_events_; } | 92 bool accept_events() const { return accept_events_; } |
| 90 void set_accept_events(bool accept_events) { accept_events_ = accept_events; } | 93 void set_accept_events(bool accept_events) { accept_events_ = accept_events; } |
| 91 | 94 |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 // Bubble border shadow to use. | 184 // Bubble border shadow to use. |
| 182 BubbleBorder::Shadow shadow_; | 185 BubbleBorder::Shadow shadow_; |
| 183 | 186 |
| 184 // The background color of the bubble; and flag for when it's explicitly set. | 187 // The background color of the bubble; and flag for when it's explicitly set. |
| 185 SkColor color_; | 188 SkColor color_; |
| 186 bool color_explicitly_set_; | 189 bool color_explicitly_set_; |
| 187 | 190 |
| 188 // The margins between the content and the inside of the border. | 191 // The margins between the content and the inside of the border. |
| 189 gfx::Insets margins_; | 192 gfx::Insets margins_; |
| 190 | 193 |
| 194 // The margins around the title. |
| 195 // TODO(tapted): Investigate deleting this when MD is default. |
| 196 gfx::Insets title_margins_; |
| 197 |
| 191 // Insets applied to the |anchor_view_| bounds. | 198 // Insets applied to the |anchor_view_| bounds. |
| 192 gfx::Insets anchor_view_insets_; | 199 gfx::Insets anchor_view_insets_; |
| 193 | 200 |
| 194 // Specifies whether the bubble (or its border) handles mouse events, etc. | 201 // Specifies whether the bubble (or its border) handles mouse events, etc. |
| 195 bool accept_events_; | 202 bool accept_events_; |
| 196 | 203 |
| 197 // If true (defaults to true), the arrow may be mirrored and moved to fit the | 204 // If true (defaults to true), the arrow may be mirrored and moved to fit the |
| 198 // bubble on screen better. It would be a no-op if the bubble has no arrow. | 205 // bubble on screen better. It would be a no-op if the bubble has no arrow. |
| 199 bool adjust_if_offscreen_; | 206 bool adjust_if_offscreen_; |
| 200 | 207 |
| 201 // Parent native window of the bubble. | 208 // Parent native window of the bubble. |
| 202 gfx::NativeView parent_window_; | 209 gfx::NativeView parent_window_; |
| 203 | 210 |
| 204 DISALLOW_COPY_AND_ASSIGN(BubbleDialogDelegateView); | 211 DISALLOW_COPY_AND_ASSIGN(BubbleDialogDelegateView); |
| 205 }; | 212 }; |
| 206 | 213 |
| 207 } // namespace views | 214 } // namespace views |
| 208 | 215 |
| 209 #endif // UI_VIEWS_BUBBLE_BUBBLE_DELEGATE2_H_ | 216 #endif // UI_VIEWS_BUBBLE_BUBBLE_DELEGATE2_H_ |
| OLD | NEW |