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

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

Issue 10834279: Give request-to-act badges a grey background, and increase spacing to make it fit. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Finish mac support; fix pkasting's comments Created 8 years, 3 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) 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 #include <vector> 5 #include <vector>
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 8
9 #import "chrome/browser/ui/cocoa/styled_text_field_cell.h" 9 #import "chrome/browser/ui/cocoa/styled_text_field_cell.h"
10 10
(...skipping 26 matching lines...) Expand all
37 37
38 // The width available after accounting for decorations. 38 // The width available after accounting for decorations.
39 - (CGFloat)availableWidthInFrame:(const NSRect)frame; 39 - (CGFloat)availableWidthInFrame:(const NSRect)frame;
40 40
41 // Return the frame for |aDecoration| if the cell is in |cellFrame|. 41 // Return the frame for |aDecoration| if the cell is in |cellFrame|.
42 // Returns |NSZeroRect| for decorations which are not currently 42 // Returns |NSZeroRect| for decorations which are not currently
43 // visible. 43 // visible.
44 - (NSRect)frameForDecoration:(const LocationBarDecoration*)aDecoration 44 - (NSRect)frameForDecoration:(const LocationBarDecoration*)aDecoration
45 inFrame:(NSRect)cellFrame; 45 inFrame:(NSRect)cellFrame;
46 46
47 // The amount of padding on either side reserved for drawing
48 // decorations.
49 + (CGFloat)decorationHorizontalPad;
50
47 // Find the decoration under the event. |NULL| if |theEvent| is not 51 // Find the decoration under the event. |NULL| if |theEvent| is not
48 // over anything. 52 // over anything.
49 - (LocationBarDecoration*)decorationForEvent:(NSEvent*)theEvent 53 - (LocationBarDecoration*)decorationForEvent:(NSEvent*)theEvent
50 inRect:(NSRect)cellFrame 54 inRect:(NSRect)cellFrame
51 ofView:(AutocompleteTextField*)field; 55 ofView:(AutocompleteTextField*)field;
52 56
53 // Return the appropriate menu for any decorations under event. 57 // Return the appropriate menu for any decorations under event.
54 // Returns nil if no menu is present for the decoration, or if the 58 // Returns nil if no menu is present for the decoration, or if the
55 // event is not over a decoration. 59 // event is not over a decoration.
56 - (NSMenu*)decorationMenuForEvent:(NSEvent*)theEvent 60 - (NSMenu*)decorationMenuForEvent:(NSEvent*)theEvent
(...skipping 10 matching lines...) Expand all
67 // to the text area which don't handle mouse clicks themselves. 71 // to the text area which don't handle mouse clicks themselves.
68 // Keyword-search bubble, for instance. 72 // Keyword-search bubble, for instance.
69 - (NSRect)textCursorFrameForFrame:(NSRect)cellFrame; 73 - (NSRect)textCursorFrameForFrame:(NSRect)cellFrame;
70 74
71 // Setup decoration tooltips on |controlView| by calling 75 // Setup decoration tooltips on |controlView| by calling
72 // |-addToolTip:forRect:|. 76 // |-addToolTip:forRect:|.
73 - (void)updateToolTipsInRect:(NSRect)cellFrame 77 - (void)updateToolTipsInRect:(NSRect)cellFrame
74 ofView:(AutocompleteTextField*)controlView; 78 ofView:(AutocompleteTextField*)controlView;
75 79
76 @end 80 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698