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_BORDER_H_ | 5 #ifndef UI_VIEWS_BUBBLE_BUBBLE_BORDER_H_ |
6 #define UI_VIEWS_BUBBLE_BUBBLE_BORDER_H_ | 6 #define UI_VIEWS_BUBBLE_BUBBLE_BORDER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "ui/views/background.h" | 10 #include "ui/views/background.h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
58 }; | 58 }; |
59 | 59 |
60 // The position of the bubble in relation to the anchor. | 60 // The position of the bubble in relation to the anchor. |
61 enum BubbleAlignment { | 61 enum BubbleAlignment { |
62 // The tip of the arrow points to the middle of the anchor. | 62 // The tip of the arrow points to the middle of the anchor. |
63 ALIGN_ARROW_TO_MID_ANCHOR, | 63 ALIGN_ARROW_TO_MID_ANCHOR, |
64 // The edge nearest to the arrow is lined up with the edge of the anchor. | 64 // The edge nearest to the arrow is lined up with the edge of the anchor. |
65 ALIGN_EDGE_TO_ANCHOR_EDGE | 65 ALIGN_EDGE_TO_ANCHOR_EDGE |
66 }; | 66 }; |
67 | 67 |
68 BubbleBorder(ArrowLocation arrow_location, Shadow shadow); | 68 BubbleBorder(ArrowLocation arrow, Shadow shadow, SkColor color); |
sky
2013/01/31 19:31:16
Is there a compelling reason you're adding this? W
msw
2013/01/31 20:11:40
My thought was that hardcoded white is wrong, and
| |
69 | 69 |
70 // Returns the radius of the corner of the border. | 70 // Returns the radius of the corner of the border. |
71 // TODO(xiyuan): Get rid of this since it's part of BorderImages now? | 71 // TODO(xiyuan): Get rid of this since it's part of BorderImages now? |
72 static int GetCornerRadius() { | 72 static int GetCornerRadius() { |
73 // We can't safely calculate a border radius by comparing the sizes of the | 73 // We can't safely calculate a border radius by comparing the sizes of the |
74 // side and corner images, because either may have been extended in various | 74 // side and corner images, because either may have been extended in various |
75 // directions in order to do more subtle dropshadow fading or other effects. | 75 // directions in order to do more subtle dropshadow fading or other effects. |
76 // So we hardcode the most accurate value. | 76 // So we hardcode the most accurate value. |
77 return 4; | 77 return 4; |
78 } | 78 } |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
218 | 218 |
219 private: | 219 private: |
220 BubbleBorder* border_; | 220 BubbleBorder* border_; |
221 | 221 |
222 DISALLOW_COPY_AND_ASSIGN(BubbleBackground); | 222 DISALLOW_COPY_AND_ASSIGN(BubbleBackground); |
223 }; | 223 }; |
224 | 224 |
225 } // namespace views | 225 } // namespace views |
226 | 226 |
227 #endif // UI_VIEWS_BUBBLE_BUBBLE_BORDER_H_ | 227 #endif // UI_VIEWS_BUBBLE_BUBBLE_BORDER_H_ |
OLD | NEW |