Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(775)

Side by Side Diff: ui/views/bubble/bubble_dialog_delegate.h

Issue 1866403005: Fix rtl shelf overflow bubble (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add unit test Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 60
61 View* GetAnchorView() const; 61 View* GetAnchorView() const;
62 Widget* anchor_widget() const { return anchor_widget_; } 62 Widget* anchor_widget() const { return anchor_widget_; }
63 63
64 // The anchor rect is used in the absence of an assigned anchor view. 64 // The anchor rect is used in the absence of an assigned anchor view.
65 const gfx::Rect& anchor_rect() const { return anchor_rect_; } 65 const gfx::Rect& anchor_rect() const { return anchor_rect_; }
66 66
67 BubbleBorder::Arrow arrow() const { return arrow_; } 67 BubbleBorder::Arrow arrow() const { return arrow_; }
68 void set_arrow(BubbleBorder::Arrow arrow) { arrow_ = arrow; } 68 void set_arrow(BubbleBorder::Arrow arrow) { arrow_ = arrow; }
69 69
70 void set_mirror_arrow_in_rtl(bool mirror) { mirror_arrow_in_rtl_ = mirror; }
71
70 BubbleBorder::Shadow shadow() const { return shadow_; } 72 BubbleBorder::Shadow shadow() const { return shadow_; }
71 void set_shadow(BubbleBorder::Shadow shadow) { shadow_ = shadow; } 73 void set_shadow(BubbleBorder::Shadow shadow) { shadow_ = shadow; }
72 74
73 SkColor color() const { return color_; } 75 SkColor color() const { return color_; }
74 void set_color(SkColor color) { 76 void set_color(SkColor color) {
75 color_ = color; 77 color_ = color;
76 color_explicitly_set_ = true; 78 color_explicitly_set_ = true;
77 } 79 }
78 80
79 const gfx::Insets& margins() const { return margins_; } 81 const gfx::Insets& margins() const { return margins_; }
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 // it from there. It will make sure that the view is still valid. 168 // it from there. It will make sure that the view is still valid.
167 const int anchor_view_storage_id_; 169 const int anchor_view_storage_id_;
168 Widget* anchor_widget_; 170 Widget* anchor_widget_;
169 171
170 // The anchor rect used in the absence of an anchor view. 172 // The anchor rect used in the absence of an anchor view.
171 mutable gfx::Rect anchor_rect_; 173 mutable gfx::Rect anchor_rect_;
172 174
173 // The arrow's location on the bubble. 175 // The arrow's location on the bubble.
174 BubbleBorder::Arrow arrow_; 176 BubbleBorder::Arrow arrow_;
175 177
178 // Automatically mirror the arrow in RTL layout.
179 bool mirror_arrow_in_rtl_;
180
176 // Bubble border shadow to use. 181 // Bubble border shadow to use.
177 BubbleBorder::Shadow shadow_; 182 BubbleBorder::Shadow shadow_;
178 183
179 // The background color of the bubble; and flag for when it's explicitly set. 184 // The background color of the bubble; and flag for when it's explicitly set.
180 SkColor color_; 185 SkColor color_;
181 bool color_explicitly_set_; 186 bool color_explicitly_set_;
182 187
183 // The margins between the content and the inside of the border. 188 // The margins between the content and the inside of the border.
184 gfx::Insets margins_; 189 gfx::Insets margins_;
185 190
(...skipping 10 matching lines...) Expand all
196 201
197 // Parent native window of the bubble. 202 // Parent native window of the bubble.
198 gfx::NativeView parent_window_; 203 gfx::NativeView parent_window_;
199 204
200 DISALLOW_COPY_AND_ASSIGN(BubbleDialogDelegateView); 205 DISALLOW_COPY_AND_ASSIGN(BubbleDialogDelegateView);
201 }; 206 };
202 207
203 } // namespace views 208 } // namespace views
204 209
205 #endif // UI_VIEWS_BUBBLE_BUBBLE_DELEGATE2_H_ 210 #endif // UI_VIEWS_BUBBLE_BUBBLE_DELEGATE2_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698