Chromium Code Reviews| 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 const gfx::Insets& title_margins() const { return title_margins_; } | |
| 83 void set_title_margins(const gfx::Insets& title_margins) { | |
|
lgarron
2016/12/14 23:46:23
FYI: I don't know anything about this class, so if
tapted
2017/01/04 00:36:49
Yup - sending to msw for OWNERS :) (pretty sure th
| |
| 84 title_margins_ = title_margins; | |
| 85 } | |
| 82 | 86 |
| 83 const gfx::Insets& anchor_view_insets() const { return anchor_view_insets_; } | 87 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; } | 88 void set_anchor_view_insets(const gfx::Insets& i) { anchor_view_insets_ = i; } |
| 85 | 89 |
| 86 gfx::NativeView parent_window() const { return parent_window_; } | 90 gfx::NativeView parent_window() const { return parent_window_; } |
| 87 void set_parent_window(gfx::NativeView window) { parent_window_ = window; } | 91 void set_parent_window(gfx::NativeView window) { parent_window_ = window; } |
| 88 | 92 |
| 89 bool accept_events() const { return accept_events_; } | 93 bool accept_events() const { return accept_events_; } |
| 90 void set_accept_events(bool accept_events) { accept_events_ = accept_events; } | 94 void set_accept_events(bool accept_events) { accept_events_ = accept_events; } |
| 91 | 95 |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 183 | 187 |
| 184 // Bubble border shadow to use. | 188 // Bubble border shadow to use. |
| 185 BubbleBorder::Shadow shadow_; | 189 BubbleBorder::Shadow shadow_; |
| 186 | 190 |
| 187 // The background color of the bubble; and flag for when it's explicitly set. | 191 // The background color of the bubble; and flag for when it's explicitly set. |
| 188 SkColor color_; | 192 SkColor color_; |
| 189 bool color_explicitly_set_; | 193 bool color_explicitly_set_; |
| 190 | 194 |
| 191 // The margins between the content and the inside of the border. | 195 // The margins between the content and the inside of the border. |
| 192 gfx::Insets margins_; | 196 gfx::Insets margins_; |
| 197 gfx::Insets title_margins_; | |
| 193 | 198 |
| 194 // Insets applied to the |anchor_view_| bounds. | 199 // Insets applied to the |anchor_view_| bounds. |
| 195 gfx::Insets anchor_view_insets_; | 200 gfx::Insets anchor_view_insets_; |
| 196 | 201 |
| 197 // Specifies whether the bubble (or its border) handles mouse events, etc. | 202 // Specifies whether the bubble (or its border) handles mouse events, etc. |
| 198 bool accept_events_; | 203 bool accept_events_; |
| 199 bool border_accepts_events_; | 204 bool border_accepts_events_; |
| 200 | 205 |
| 201 // If true (defaults to true), the arrow may be mirrored and moved to fit the | 206 // If true (defaults to true), the arrow may be mirrored and moved to fit the |
| 202 // bubble on screen better. It would be a no-op if the bubble has no arrow. | 207 // bubble on screen better. It would be a no-op if the bubble has no arrow. |
| 203 bool adjust_if_offscreen_; | 208 bool adjust_if_offscreen_; |
| 204 | 209 |
| 205 // Parent native window of the bubble. | 210 // Parent native window of the bubble. |
| 206 gfx::NativeView parent_window_; | 211 gfx::NativeView parent_window_; |
| 207 | 212 |
| 208 DISALLOW_COPY_AND_ASSIGN(BubbleDialogDelegateView); | 213 DISALLOW_COPY_AND_ASSIGN(BubbleDialogDelegateView); |
| 209 }; | 214 }; |
| 210 | 215 |
| 211 } // namespace views | 216 } // namespace views |
| 212 | 217 |
| 213 #endif // UI_VIEWS_BUBBLE_BUBBLE_DELEGATE2_H_ | 218 #endif // UI_VIEWS_BUBBLE_BUBBLE_DELEGATE2_H_ |
| OLD | NEW |