| 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 #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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |