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

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

Issue 2426983002: Revert of [Mac] Preserve original selection when suggesting completions with diacritics (Closed)
Patch Set: Created 4 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
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "base/mac/scoped_nsobject.h" 7 #include "base/mac/scoped_nsobject.h"
8 #import "chrome/browser/ui/cocoa/themed_window.h" 8 #import "chrome/browser/ui/cocoa/themed_window.h"
9 #import "chrome/browser/ui/cocoa/url_drop_target.h" 9 #import "chrome/browser/ui/cocoa/url_drop_target.h"
10 10
(...skipping 21 matching lines...) Expand all
32 // Indicates if the field editor's interpretKeyEvents: method is being called. 32 // Indicates if the field editor's interpretKeyEvents: method is being called.
33 // If it's YES, then we should postpone the call to the observer's 33 // If it's YES, then we should postpone the call to the observer's
34 // OnDidChange() method after the field editor's interpretKeyEvents: method 34 // OnDidChange() method after the field editor's interpretKeyEvents: method
35 // is finished, rather than calling it in textDidChange: method. Because the 35 // is finished, rather than calling it in textDidChange: method. Because the
36 // input method may update the marked text after inserting some text, but we 36 // input method may update the marked text after inserting some text, but we
37 // need the observer be aware of the marked text as well. 37 // need the observer be aware of the marked text as well.
38 BOOL interpretingKeyEvents_; 38 BOOL interpretingKeyEvents_;
39 39
40 // Indicates if the text has been changed by key events. 40 // Indicates if the text has been changed by key events.
41 BOOL textChangedByKeyEvents_; 41 BOOL textChangedByKeyEvents_;
42
43 // The selected range as far as NSTextView is concerned.
44 // See |actualSelectedRange|.
45 NSRange visualSelectedRange_;
46 } 42 }
47 43
48 // The delegate is always an AutocompleteTextField*. Override the superclass 44 // The delegate is always an AutocompleteTextField*. Override the superclass
49 // implementations to allow for proper typing. 45 // implementations to allow for proper typing.
50 - (AutocompleteTextField*)delegate; 46 - (AutocompleteTextField*)delegate;
51 - (void)setDelegate:(AutocompleteTextField*)delegate; 47 - (void)setDelegate:(AutocompleteTextField*)delegate;
52 48
53 // Sets attributed string programatically through the field editor's text 49 // Sets attributed string programatically through the field editor's text
54 // storage object. 50 // storage object.
55 - (void)setAttributedString:(NSAttributedString*)aString; 51 - (void)setAttributedString:(NSAttributedString*)aString;
56 52
57 // Stores requested selection range, before it's adjusted to grapheme
58 // boundaries. This range is what text editing commands
59 // will operate on, vs. |visualSelectionRange_|, which reflects the
60 // range that looks highlighted.
61 @property(nonatomic, readonly) NSRange actualSelectedRange;
62
63 @end 53 @end
64 54
65 @interface AutocompleteTextFieldEditor(PrivateTestMethods) 55 @interface AutocompleteTextFieldEditor(PrivateTestMethods)
66 - (AutocompleteTextFieldObserver*)observer; 56 - (AutocompleteTextFieldObserver*)observer;
67 - (void)pasteAndGo:sender; 57 - (void)pasteAndGo:sender;
68 @end 58 @end
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698