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

Side by Side Diff: chrome/browser/ui/cocoa/info_bubble_view.h

Issue 2490323002: [Mac] Anchor profile switcher to left side of avatar button in RTL (Closed)
Patch Set: Review comments Created 4 years, 1 month 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 (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 CHROME_BROWSER_UI_COCOA_INFO_BUBBLE_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_INFO_BUBBLE_VIEW_H_
6 #define CHROME_BROWSER_UI_COCOA_INFO_BUBBLE_VIEW_H_ 6 #define CHROME_BROWSER_UI_COCOA_INFO_BUBBLE_VIEW_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 9
10 #include "base/mac/scoped_nsobject.h" 10 #include "base/mac/scoped_nsobject.h"
(...skipping 18 matching lines...) Expand all
29 kTopCenter, 29 kTopCenter,
30 kTopRight, 30 kTopRight,
31 kNoArrow, 31 kNoArrow,
32 }; 32 };
33 33
34 enum BubbleAlignment { 34 enum BubbleAlignment {
35 // The tip of the arrow points to the anchor point. 35 // The tip of the arrow points to the anchor point.
36 kAlignArrowToAnchor, 36 kAlignArrowToAnchor,
37 // The edge nearest to the arrow is lined up with the anchor point. 37 // The edge nearest to the arrow is lined up with the anchor point.
38 kAlignEdgeToAnchorEdge, 38 kAlignEdgeToAnchorEdge,
39 // Align the right edge to the anchor point. 39 // Align the trailing edge (right in LTR, left in RTL) to the anchor point.
40 kAlignRightEdgeToAnchorEdge, 40 kAlignTrailingEdgeToAnchorEdge,
41 // Align the left edge to the anchor point. 41 // Align the leading edge (left in LTR, right in RTL) to the anchor point.
42 kAlignLeftEdgeToAnchorEdge, 42 kAlignLeadingEdgeToAnchorEdge,
43 }; 43 };
44 44
45 } // namespace info_bubble 45 } // namespace info_bubble
46 46
47 // Content view for a bubble with an arrow showing arbitrary content. 47 // Content view for a bubble with an arrow showing arbitrary content.
48 // This is where nonrectangular drawing happens. 48 // This is where nonrectangular drawing happens.
49 @interface InfoBubbleView : NSView { 49 @interface InfoBubbleView : NSView {
50 @private 50 @private
51 info_bubble::BubbleArrowLocation arrowLocation_; 51 info_bubble::BubbleArrowLocation arrowLocation_;
52 info_bubble::BubbleAlignment alignment_; 52 info_bubble::BubbleAlignment alignment_;
53 info_bubble::CornerFlags cornerFlags_; 53 info_bubble::CornerFlags cornerFlags_;
54 base::scoped_nsobject<NSColor> backgroundColor_; 54 base::scoped_nsobject<NSColor> backgroundColor_;
55 } 55 }
56 56
57 @property(assign, nonatomic) info_bubble::BubbleArrowLocation arrowLocation; 57 @property(assign, nonatomic) info_bubble::BubbleArrowLocation arrowLocation;
58 @property(assign, nonatomic) info_bubble::BubbleAlignment alignment; 58 @property(assign, nonatomic) info_bubble::BubbleAlignment alignment;
59 @property(assign, nonatomic) info_bubble::CornerFlags cornerFlags; 59 @property(assign, nonatomic) info_bubble::CornerFlags cornerFlags;
60 60
61 // Returns the point location in view coordinates of the tip of the arrow. 61 // Returns the point location in view coordinates of the tip of the arrow.
62 - (NSPoint)arrowTip; 62 - (NSPoint)arrowTip;
63 63
64 // Gets and sets the bubble's background color. 64 // Gets and sets the bubble's background color.
65 - (NSColor*)backgroundColor; 65 - (NSColor*)backgroundColor;
66 - (void)setBackgroundColor:(NSColor*)backgroundColor; 66 - (void)setBackgroundColor:(NSColor*)backgroundColor;
67 67
68 @end 68 @end
69 69
70 #endif // CHROME_BROWSER_UI_COCOA_INFO_BUBBLE_VIEW_H_ 70 #endif // CHROME_BROWSER_UI_COCOA_INFO_BUBBLE_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/browser/zoom_bubble_controller.mm ('k') | chrome/browser/ui/cocoa/profiles/avatar_base_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698