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

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

Issue 173194: [Mac] Omnibox keyword, keyword hint, and search hint support.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 4 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
Property Changes:
Name: svn:eol-style
+ LF
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 #import <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 6
7 // AutocompleteTextFieldEditor customized the AutocompletTextField
8 // field editor (helper text-view used in editing). It intercepts UI
9 // events for forwarding to the core Omnibox code. It also undoes
10 // some of the effects of using styled text in the Omnibox (the text
11 // is styled but should not appear that way when copied to the
12 // pasteboard).
13
14 // AutocompleteTextFieldEditorDelegateMethods are meant to be similar
15 // to NSTextView delegate methods, adding additional intercepts
16 // relevant to the Omnibox implementation.
17
7 @protocol AutocompleteTextFieldEditorDelegateMethods 18 @protocol AutocompleteTextFieldEditorDelegateMethods
8 19
9 // Delegate -paste: implementation to the field being edited. If the 20 // Delegate -paste: implementation to the field being edited. If the
10 // delegate returns YES, or does not implement the method, NSTextView 21 // delegate returns YES, or does not implement the method, NSTextView
11 // is called to handle the paste. The delegate can block the paste 22 // is called to handle the paste. The delegate can block the paste
12 // (or handle it internally) by returning NO. 23 // (or handle it internally) by returning NO.
13 - (BOOL)textShouldPaste:(NSText*)fieldEditor; 24 - (BOOL)textShouldPaste:(NSText*)fieldEditor;
14 25
15 @end 26 @end
16 27
17 // Field editor used for the autocomplete field. 28 // Field editor used for the autocomplete field.
18 @interface AutocompleteTextFieldEditor : NSTextView { 29 @interface AutocompleteTextFieldEditor : NSTextView {
19 } 30 }
20 31
21 // Copy contents of the TextView to the designated clipboard as plain 32 // Copy contents of the TextView to the designated clipboard as plain
22 // text. 33 // text.
23 - (void)performCopy:(NSPasteboard*)pb; 34 - (void)performCopy:(NSPasteboard*)pb;
24 35
25 // Same as above, note that this calls through to performCopy. 36 // Same as above, note that this calls through to performCopy.
26 - (void)performCut:(NSPasteboard*)pb; 37 - (void)performCut:(NSPasteboard*)pb;
27 38
28 // Called by -paste: to decide whether to forward to superclass. 39 // Called by -paste: to decide whether to forward to superclass.
29 // Exposed for unit testing. 40 // Exposed for unit testing.
30 - (BOOL)shouldPaste; 41 - (BOOL)shouldPaste;
31 42
32 @end 43 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698