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

Side by Side Diff: chrome/browser/autocomplete/autocomplete_edit.h

Issue 172029: Ctrl+Backspace should clear inline suggested autocomplete text after caret al... (Closed) Base URL: http://src.chromium.org/svn/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
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_H_ 5 #ifndef CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_H_
6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_H_ 6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_H_
7 7
8 #include "chrome/browser/autocomplete/autocomplete.h" 8 #include "chrome/browser/autocomplete/autocomplete.h"
9 #include "chrome/common/page_transition_types.h" 9 #include "chrome/common/page_transition_types.h"
10 #include "googleurl/src/gurl.h" 10 #include "googleurl/src/gurl.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 void SetInputInProgress(bool in_progress); 141 void SetInputInProgress(bool in_progress);
142 142
143 // Updates permanent_text_ to |new_permanent_text|. Returns true if this 143 // Updates permanent_text_ to |new_permanent_text|. Returns true if this
144 // change should be immediately user-visible, because either the user is not 144 // change should be immediately user-visible, because either the user is not
145 // editing or the edit does not have focus. 145 // editing or the edit does not have focus.
146 bool UpdatePermanentText(const std::wstring& new_permanent_text); 146 bool UpdatePermanentText(const std::wstring& new_permanent_text);
147 147
148 // Sets the user_text_ to |text|. Only the View should call this. 148 // Sets the user_text_ to |text|. Only the View should call this.
149 void SetUserText(const std::wstring& text); 149 void SetUserText(const std::wstring& text);
150 150
151 std::wstring user_text() const { return user_text_; }
152
151 // Reverts the edit model back to its unedited state (permanent text showing, 153 // Reverts the edit model back to its unedited state (permanent text showing,
152 // no user input in progress). 154 // no user input in progress).
153 void Revert(); 155 void Revert();
154 156
155 // Directs the popup to start autocomplete. 157 // Directs the popup to start autocomplete.
156 void StartAutocomplete(bool prevent_inline_autocomplete) const; 158 void StartAutocomplete(bool prevent_inline_autocomplete) const;
157 159
158 // Determines whether the user can "paste and go", given the specified text. 160 // Determines whether the user can "paste and go", given the specified text.
159 // This also updates the internal paste-and-go-related state variables as 161 // This also updates the internal paste-and-go-related state variables as
160 // appropriate so that the controller doesn't need to be repeatedly queried 162 // appropriate so that the controller doesn't need to be repeatedly queried
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 mutable GURL paste_and_go_url_; 419 mutable GURL paste_and_go_url_;
418 mutable PageTransition::Type paste_and_go_transition_; 420 mutable PageTransition::Type paste_and_go_transition_;
419 mutable GURL paste_and_go_alternate_nav_url_; 421 mutable GURL paste_and_go_alternate_nav_url_;
420 422
421 Profile* profile_; 423 Profile* profile_;
422 424
423 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditModel); 425 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditModel);
424 }; 426 };
425 427
426 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_H_ 428 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698