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/cocoa/styled_text_field_cell.h" | 9 #import "chrome/browser/cocoa/styled_text_field_cell.h" |
10 | 10 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 - (NSMenu*)decorationMenuForEvent:(NSEvent*)theEvent | 75 - (NSMenu*)decorationMenuForEvent:(NSEvent*)theEvent |
76 inRect:(NSRect)cellFrame | 76 inRect:(NSRect)cellFrame |
77 ofView:(AutocompleteTextField*)controlView; | 77 ofView:(AutocompleteTextField*)controlView; |
78 | 78 |
79 // Called by |AutocompleteTextField| to let page actions intercept | 79 // Called by |AutocompleteTextField| to let page actions intercept |
80 // clicks. Returns |YES| if the click has been intercepted. | 80 // clicks. Returns |YES| if the click has been intercepted. |
81 - (BOOL)mouseDown:(NSEvent*)theEvent | 81 - (BOOL)mouseDown:(NSEvent*)theEvent |
82 inRect:(NSRect)cellFrame | 82 inRect:(NSRect)cellFrame |
83 ofView:(AutocompleteTextField*)controlView; | 83 ofView:(AutocompleteTextField*)controlView; |
84 | 84 |
| 85 // Overridden from StyledTextFieldCell to include decorations adjacent |
| 86 // to the text area which don't handle mouse clicks themselves. |
| 87 // Keyword-search bubble, for instance. |
| 88 - (NSRect)textCursorFrameForFrame:(NSRect)cellFrame; |
| 89 |
85 @end | 90 @end |
86 | 91 |
87 // Internal methods here exposed for unit testing. | 92 // Internal methods here exposed for unit testing. |
88 @interface AutocompleteTextFieldCell (UnitTesting) | 93 @interface AutocompleteTextFieldCell (UnitTesting) |
89 | 94 |
90 @property(nonatomic, readonly) NSAttributedString* hintString; | 95 @property(nonatomic, readonly) NSAttributedString* hintString; |
91 @property(nonatomic, readonly) NSAttributedString* hintIconLabel; | 96 @property(nonatomic, readonly) NSAttributedString* hintIconLabel; |
92 | 97 |
93 @end | 98 @end |
OLD | NEW |