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

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

Issue 2510373003: Cleanup: Remove "gray text" logic from Omnibox (Closed)
Patch Set: mac 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_AUTOCOMPLETE_TEXT_FIELD_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_AUTOCOMPLETE_TEXT_FIELD_H_
6 #define CHROME_BROWSER_UI_COCOA_AUTOCOMPLETE_TEXT_FIELD_H_ 6 #define CHROME_BROWSER_UI_COCOA_AUTOCOMPLETE_TEXT_FIELD_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 9
10 #include "base/mac/scoped_nsobject.h" 10 #include "base/mac/scoped_nsobject.h"
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 // of an I-beam. 162 // of an I-beam.
163 - (void)updateMouseTracking; 163 - (void)updateMouseTracking;
164 164
165 // Return the appropriate menu for any decoration under |event|. 165 // Return the appropriate menu for any decoration under |event|.
166 - (NSMenu*)decorationMenuForEvent:(NSEvent*)event; 166 - (NSMenu*)decorationMenuForEvent:(NSEvent*)event;
167 167
168 // Retains |tooltip| (in |currentToolTips_|) and adds this tooltip 168 // Retains |tooltip| (in |currentToolTips_|) and adds this tooltip
169 // via -[NSView addToolTipRect:owner:userData:]. 169 // via -[NSView addToolTipRect:owner:userData:].
170 - (void)addToolTip:(NSString*)tooltip forRect:(NSRect)aRect; 170 - (void)addToolTip:(NSString*)tooltip forRect:(NSRect)aRect;
171 171
172 // Sets the suggest text that shows at the end of the field's normal text.
173 // This can't be simply appended to the field's text storage because that
174 // will end any pending IME session.
175 - (void)setGrayTextAutocompletion:(NSString*)suggestText
176 textColor:(NSColor*)suggestColor;
177
178 - (NSString*)suggestText; 172 - (NSString*)suggestText;
179 - (NSColor*)suggestColor; 173 - (NSColor*)suggestColor;
180 174
181 // Obtain the bubble anchor point for |decoration|. In window coordinates. 175 // Obtain the bubble anchor point for |decoration|. In window coordinates.
182 - (NSPoint)bubblePointForDecoration:(LocationBarDecoration*)decoration; 176 - (NSPoint)bubblePointForDecoration:(LocationBarDecoration*)decoration;
183 177
184 @end 178 @end
185 179
186 namespace autocomplete_text_field {
187
188 // Draw gray text suggestion in |controlView|.
189 void DrawGrayTextAutocompletion(NSAttributedString* mainText,
190 NSString* suggestText,
191 NSColor* suggestColor,
192 NSView* controlView,
193 NSRect frame);
194
195 } // namespace autocomplete_text_field
196
197 #endif // CHROME_BROWSER_UI_COCOA_AUTOCOMPLETE_TEXT_FIELD_H_ 180 #endif // CHROME_BROWSER_UI_COCOA_AUTOCOMPLETE_TEXT_FIELD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698