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

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

Issue 207047: [Mac] Convert Omnibox paste-and-go to use AutocompleteTextFieldObserver. (Closed)
Patch Set: Oops - remove test before its time. Created 11 years, 2 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
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 class AutocompleteTextFieldObserver; 7 class AutocompleteTextFieldObserver;
8 8
9 // AutocompleteTextFieldEditor customized the AutocompletTextField 9 // AutocompleteTextFieldEditor customized the AutocompletTextField
10 // field editor (helper text-view used in editing). It intercepts UI 10 // field editor (helper text-view used in editing). It intercepts UI
11 // events for forwarding to the core Omnibox code. It also undoes 11 // events for forwarding to the core Omnibox code. It also undoes
12 // some of the effects of using styled text in the Omnibox (the text 12 // some of the effects of using styled text in the Omnibox (the text
13 // is styled but should not appear that way when copied to the 13 // is styled but should not appear that way when copied to the
14 // pasteboard). 14 // pasteboard).
15 15
16 // TODO(shess): Move delegate stuff to AutocompleteTextFieldObserver.
17
18 @protocol AutocompleteTextFieldEditorDelegateMethods
19
20 // Returns nil if paste actions are not supported.
21 - (NSString*)textPasteActionString:(NSText*)fieldEditor;
22 - (void)textDidPasteAndGo:(NSText*)fieldEditor;
23 @end
24
25 // Field editor used for the autocomplete field. 16 // Field editor used for the autocomplete field.
26 @interface AutocompleteTextFieldEditor : NSTextView { 17 @interface AutocompleteTextFieldEditor : NSTextView {
27 } 18 }
28 19
29 // Copy contents of the TextView to the designated clipboard as plain 20 // Copy contents of the TextView to the designated clipboard as plain
30 // text. 21 // text.
31 - (void)performCopy:(NSPasteboard*)pb; 22 - (void)performCopy:(NSPasteboard*)pb;
32 23
33 // Same as above, note that this calls through to performCopy. 24 // Same as above, note that this calls through to performCopy.
34 - (void)performCut:(NSPasteboard*)pb; 25 - (void)performCut:(NSPasteboard*)pb;
35 26
36 @end 27 @end
37 28
38 @interface AutocompleteTextFieldEditor(PrivateTestMethods) 29 @interface AutocompleteTextFieldEditor(PrivateTestMethods)
39 - (AutocompleteTextFieldObserver*)observer; 30 - (AutocompleteTextFieldObserver*)observer;
31 - (void)pasteAndGo:sender;
40 @end 32 @end
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/autocomplete_text_field.mm ('k') | chrome/browser/cocoa/autocomplete_text_field_editor.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698