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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
65 void set_arrow_location(BubbleBorder::ArrowLocation arrow_location) { | 65 void set_arrow_location(BubbleBorder::ArrowLocation arrow_location) { |
66 arrow_location_ = arrow_location; | 66 arrow_location_ = arrow_location; |
67 } | 67 } |
68 | 68 |
69 SkColor color() const { return color_; } | 69 SkColor color() const { return color_; } |
70 void set_color(SkColor color) { color_ = color; } | 70 void set_color(SkColor color) { color_ = color; } |
71 | 71 |
72 const gfx::Insets& margins() const { return margins_; } | 72 const gfx::Insets& margins() const { return margins_; } |
73 void set_margins(const gfx::Insets& margins) { margins_ = margins; } | 73 void set_margins(const gfx::Insets& margins) { margins_ = margins; } |
74 | 74 |
75 void set_anchor_insets(const gfx::Insets& anchor_insets) { | |
msw
2012/08/03 20:42:00
nit: if you name the parameter |insets| it's a one
varunjain
2012/08/03 20:54:23
Done.
| |
76 anchor_insets_ = anchor_insets; | |
77 } | |
78 const gfx::Insets& anchor_insets() const { return anchor_insets_; } | |
79 | |
75 gfx::NativeView parent_window() const { return parent_window_; } | 80 gfx::NativeView parent_window() const { return parent_window_; } |
76 void set_parent_window(gfx::NativeView window) { parent_window_ = window; } | 81 void set_parent_window(gfx::NativeView window) { parent_window_ = window; } |
77 | 82 |
78 bool use_focusless() const { return use_focusless_; } | 83 bool use_focusless() const { return use_focusless_; } |
79 void set_use_focusless(bool use_focusless) { | 84 void set_use_focusless(bool use_focusless) { |
80 use_focusless_ = use_focusless; | 85 use_focusless_ = use_focusless; |
81 } | 86 } |
82 | 87 |
83 // Get the arrow's anchor rect in screen space. | 88 // Get the arrow's anchor rect in screen space. |
84 virtual gfx::Rect GetAnchorRect(); | 89 virtual gfx::Rect GetAnchorRect(); |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
150 | 155 |
151 // The arrow's location on the bubble. | 156 // The arrow's location on the bubble. |
152 BubbleBorder::ArrowLocation arrow_location_; | 157 BubbleBorder::ArrowLocation arrow_location_; |
153 | 158 |
154 // The background color of the bubble. | 159 // The background color of the bubble. |
155 SkColor color_; | 160 SkColor color_; |
156 | 161 |
157 // The margins between the content and the inside of the border. | 162 // The margins between the content and the inside of the border. |
158 gfx::Insets margins_; | 163 gfx::Insets margins_; |
159 | 164 |
165 // Insets applied to the |anchor_view_| bounds. | |
166 gfx::Insets anchor_insets_; | |
167 | |
160 // Original opacity of the bubble. | 168 // Original opacity of the bubble. |
161 int original_opacity_; | 169 int original_opacity_; |
162 | 170 |
163 // The widget hosting the border for this bubble (non-Aura Windows only). | 171 // The widget hosting the border for this bubble (non-Aura Windows only). |
164 Widget* border_widget_; | 172 Widget* border_widget_; |
165 | 173 |
166 // Create a popup window for focusless bubbles on Linux/ChromeOS. | 174 // Create a popup window for focusless bubbles on Linux/ChromeOS. |
167 // These bubbles are not interactive and should not gain focus. | 175 // These bubbles are not interactive and should not gain focus. |
168 bool use_focusless_; | 176 bool use_focusless_; |
169 | 177 |
170 // Parent native window of the bubble. | 178 // Parent native window of the bubble. |
171 gfx::NativeView parent_window_; | 179 gfx::NativeView parent_window_; |
172 | 180 |
173 DISALLOW_COPY_AND_ASSIGN(BubbleDelegateView); | 181 DISALLOW_COPY_AND_ASSIGN(BubbleDelegateView); |
174 }; | 182 }; |
175 | 183 |
176 } // namespace views | 184 } // namespace views |
177 | 185 |
178 #endif // UI_VIEWS_BUBBLE_BUBBLE_DELEGATE_H_ | 186 #endif // UI_VIEWS_BUBBLE_BUBBLE_DELEGATE_H_ |
OLD | NEW |