OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_COCOA_LOCATION_BAR_BUBBLE_DECORATION_H_ | 5 #ifndef CHROME_BROWSER_COCOA_LOCATION_BAR_BUBBLE_DECORATION_H_ |
6 #define CHROME_BROWSER_COCOA_LOCATION_BAR_BUBBLE_DECORATION_H_ | 6 #define CHROME_BROWSER_COCOA_LOCATION_BAR_BUBBLE_DECORATION_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #import <Cocoa/Cocoa.h> | 9 #import <Cocoa/Cocoa.h> |
10 | 10 |
(...skipping 29 matching lines...) Expand all Loading... |
40 | 40 |
41 // Helper to return where the image is drawn, for subclasses to drag | 41 // Helper to return where the image is drawn, for subclasses to drag |
42 // from. |frame| is the decoration's frame in the containing cell. | 42 // from. |frame| is the decoration's frame in the containing cell. |
43 NSRect GetImageRectInFrame(NSRect frame); | 43 NSRect GetImageRectInFrame(NSRect frame); |
44 | 44 |
45 private: | 45 private: |
46 friend class SelectedKeywordDecorationTest; | 46 friend class SelectedKeywordDecorationTest; |
47 FRIEND_TEST_ALL_PREFIXES(SelectedKeywordDecorationTest, | 47 FRIEND_TEST_ALL_PREFIXES(SelectedKeywordDecorationTest, |
48 UsesPartialKeywordIfNarrow); | 48 UsesPartialKeywordIfNarrow); |
49 | 49 |
50 // Contains font attribute for drawing |label_|. | 50 // Contains font and color attribute for drawing |label_|. |
51 scoped_nsobject<NSDictionary> attributes_; | 51 scoped_nsobject<NSDictionary> attributes_; |
52 | 52 |
53 // Image drawn in the left side of the bubble. | 53 // Image drawn in the left side of the bubble. |
54 scoped_nsobject<NSImage> image_; | 54 scoped_nsobject<NSImage> image_; |
55 | 55 |
56 // Label to draw to right of image. Can be |nil|. | 56 // Label to draw to right of image. Can be |nil|. |
57 scoped_nsobject<NSString> label_; | 57 scoped_nsobject<NSString> label_; |
58 | 58 |
59 // Colors used to draw the bubble, should be set by the subclass | 59 // Colors used to draw the bubble, should be set by the subclass |
60 // constructor. | 60 // constructor. |
61 scoped_nsobject<NSColor> background_color_; | 61 scoped_nsobject<NSColor> background_color_; |
62 scoped_nsobject<NSColor> border_color_; | 62 scoped_nsobject<NSColor> border_color_; |
63 scoped_nsobject<NSColor> text_color_; | |
64 | 63 |
65 DISALLOW_COPY_AND_ASSIGN(BubbleDecoration); | 64 DISALLOW_COPY_AND_ASSIGN(BubbleDecoration); |
66 }; | 65 }; |
67 | 66 |
68 #endif // CHROME_BROWSER_COCOA_LOCATION_BAR_BUBBLE_DECORATION_H_ | 67 #endif // CHROME_BROWSER_COCOA_LOCATION_BAR_BUBBLE_DECORATION_H_ |
OLD | NEW |