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

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

Issue 159018: [Mac] Strip newlines from paste. (Closed)
Patch Set: Test empty clipboard Created 11 years, 5 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 @protocol AutocompleteTextFieldEditorDelegateMethods
8
9 // Delegate -paste: implementation to the field being edited. If the
10 // delegate returns YES, or does not implement the method, NSTextView
11 // is called to handle the paste. The delegate can block the paste
12 // (or handle it internally) by returning NO.
13 - (BOOL)textShouldPaste:(NSText*)fieldEditor;
14
15 @end
16
7 // Field editor used for the autocomplete field. 17 // Field editor used for the autocomplete field.
8 @interface AutocompleteTextFieldEditor : NSTextView { 18 @interface AutocompleteTextFieldEditor : NSTextView {
9 } 19 }
10 20
11 // Copy contents of the TextView to the designated clipboard as plain 21 // Copy contents of the TextView to the designated clipboard as plain
12 // text. 22 // text.
13 - (void)performCopy:(NSPasteboard*)pb; 23 - (void)performCopy:(NSPasteboard*)pb;
14 24
15 // Same as above, note that this calls through to performCopy. 25 // Same as above, note that this calls through to performCopy.
16 - (void)performCut:(NSPasteboard*)pb; 26 - (void)performCut:(NSPasteboard*)pb;
27
28 // Called by -paste: to decide whether to forward to superclass.
29 // Exposed for unit testing.
30 - (BOOL)shouldPaste;
31
17 @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