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

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

Issue 192008: [Mac] Implement Paste and Go/Search. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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_COCOA_AUTOCOMPLETE_TEXT_FIELD_H_ 5 #ifndef CHROME_BROWSER_COCOA_AUTOCOMPLETE_TEXT_FIELD_H_
6 #define CHROME_BROWSER_COCOA_AUTOCOMPLETE_TEXT_FIELD_H_ 6 #define CHROME_BROWSER_COCOA_AUTOCOMPLETE_TEXT_FIELD_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 9
10 @class AutocompleteTextFieldCell; 10 @class AutocompleteTextFieldCell;
(...skipping 15 matching lines...) Expand all
26 // AutocompleteTextFieldDelegateMethods are meant to be similar to 26 // AutocompleteTextFieldDelegateMethods are meant to be similar to
27 // NSControl delegate methods, adding additional intercepts relevant 27 // NSControl delegate methods, adding additional intercepts relevant
28 // to the Omnibox implementation. 28 // to the Omnibox implementation.
29 29
30 @protocol AutocompleteTextFieldDelegateMethods 30 @protocol AutocompleteTextFieldDelegateMethods
31 31
32 // Delegate -textShouldPaste: implementation to the field being 32 // Delegate -textShouldPaste: implementation to the field being
33 // edited. See AutocompleteTextFieldEditor implementation. 33 // edited. See AutocompleteTextFieldEditor implementation.
34 - (BOOL)control:(NSControl*)control textShouldPaste:(NSText*)fieldEditor; 34 - (BOOL)control:(NSControl*)control textShouldPaste:(NSText*)fieldEditor;
35 35
36 // Returns nil if paste actions are not supported.
37 - (NSString*)control:(NSControl*)control
38 textPasteActionString:(NSText*)fieldEditor;
39 - (void)control:(NSControl*)control textDidPasteAndGo:(NSText*)fieldEditor;
40
36 // Let the delegate track -flagsChanged: events. 41 // Let the delegate track -flagsChanged: events.
37 - (void)control:(NSControl*)control flagsChanged:(NSEvent*)theEvent; 42 - (void)control:(NSControl*)control flagsChanged:(NSEvent*)theEvent;
38 43
39 @end 44 @end
40 45
41 @interface AutocompleteTextField : NSTextField { 46 @interface AutocompleteTextField : NSTextField {
42 } 47 }
43 48
44 - (BOOL)textShouldPaste:(NSText*)fieldEditor; 49 - (BOOL)textShouldPaste:(NSText*)fieldEditor;
45 50
46 // Convenience method to return the cell, casted appropriately. 51 // Convenience method to return the cell, casted appropriately.
47 - (AutocompleteTextFieldCell*)autocompleteTextFieldCell; 52 - (AutocompleteTextFieldCell*)autocompleteTextFieldCell;
48 53
49 // If the keyword, keyword hint, or search hint changed, then the 54 // If the keyword, keyword hint, or search hint changed, then the
50 // field needs to be relaidout. This accomplishes that in a manner 55 // field needs to be relaidout. This accomplishes that in a manner
51 // which doesn't disrupt the field delegate. 56 // which doesn't disrupt the field delegate.
52 - (void)resetFieldEditorFrameIfNeeded; 57 - (void)resetFieldEditorFrameIfNeeded;
53 58
54 @end 59 @end
55 60
56 #endif // CHROME_BROWSER_COCOA_AUTOCOMPLETE_TEXT_FIELD_H_ 61 #endif // CHROME_BROWSER_COCOA_AUTOCOMPLETE_TEXT_FIELD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698