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

Side by Side Diff: chrome/browser/ui/cocoa/location_bar/bubble_decoration.h

Issue 2478673002: [Mac] Hover/Pressed background for the Omnibox decorations (Closed)
Patch Set: nit 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_LOCATION_BAR_BUBBLE_DECORATION_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_LOCATION_BAR_BUBBLE_DECORATION_H_
6 #define CHROME_BROWSER_UI_COCOA_LOCATION_BAR_BUBBLE_DECORATION_H_ 6 #define CHROME_BROWSER_UI_COCOA_LOCATION_BAR_BUBBLE_DECORATION_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 9
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
(...skipping 15 matching lines...) Expand all
26 virtual NSColor* GetBackgroundBorderColor() = 0; 26 virtual NSColor* GetBackgroundBorderColor() = 0;
27 void SetImage(NSImage* image); 27 void SetImage(NSImage* image);
28 void SetLabel(NSString* label); 28 void SetLabel(NSString* label);
29 void SetTextColor(NSColor* text_color); 29 void SetTextColor(NSColor* text_color);
30 void SetFont(NSFont* font); 30 void SetFont(NSFont* font);
31 void SetRetinaBaselineOffset(CGFloat offset); 31 void SetRetinaBaselineOffset(CGFloat offset);
32 virtual ui::NinePartImageIds GetBubbleImageIds() = 0; 32 virtual ui::NinePartImageIds GetBubbleImageIds() = 0;
33 33
34 // Implement |LocationBarDecoration|. 34 // Implement |LocationBarDecoration|.
35 CGFloat GetWidthForSpace(CGFloat width) override; 35 CGFloat GetWidthForSpace(CGFloat width) override;
36 NSRect GetBackgroundFrame(NSRect frame) override;
36 void DrawInFrame(NSRect frame, NSView* control_view) override; 37 void DrawInFrame(NSRect frame, NSView* control_view) override;
37 NSFont* GetFont() const override; 38 NSFont* GetFont() const override;
38 39
39 protected: 40 protected:
40 // Returns the amount of padding between the divider and the omnibox text. 41 // Returns the amount of padding between the divider and the omnibox text.
41 // Returns 0 in non-MD since there's no divider. 42 // Returns 0 in non-MD since there's no divider.
42 CGFloat DividerPadding() const; 43 CGFloat DividerPadding() const;
43 44
44 // Helper returning bubble width for the given |image| and |label| 45 // Helper returning bubble width for the given |image| and |label|
45 // assuming |font_| (for sizing text). Arguments can be nil. 46 // assuming |font_| (for sizing text). Arguments can be nil.
(...skipping 20 matching lines...) Expand all
66 FRIEND_TEST_ALL_PREFIXES(SelectedKeywordDecorationTest, 67 FRIEND_TEST_ALL_PREFIXES(SelectedKeywordDecorationTest,
67 UsesPartialKeywordIfNarrow); 68 UsesPartialKeywordIfNarrow);
68 69
69 // Contains any Retina-only baseline adjustment for |label_|. 70 // Contains any Retina-only baseline adjustment for |label_|.
70 CGFloat retina_baseline_offset_; 71 CGFloat retina_baseline_offset_;
71 72
72 DISALLOW_COPY_AND_ASSIGN(BubbleDecoration); 73 DISALLOW_COPY_AND_ASSIGN(BubbleDecoration);
73 }; 74 };
74 75
75 #endif // CHROME_BROWSER_UI_COCOA_LOCATION_BAR_BUBBLE_DECORATION_H_ 76 #endif // CHROME_BROWSER_UI_COCOA_LOCATION_BAR_BUBBLE_DECORATION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698