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

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

Issue 12096084: Cleanup BubbleFrameView and BubbleBorder construction. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Additional refactoring and cleanup. Created 7 years, 10 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 | Annotate | Revision Log
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.cc ('k') | ui/views/bubble/bubble_border.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698