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

Side by Side Diff: chrome/browser/ui/omnibox/omnibox_edit_model.h

Issue 12450022: Don't call AcceptCurrentInstantPreview() when the user hits Tab. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_ 5 #ifndef CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_
6 #define CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_ 6 #define CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 // Sets the suggestion text. 169 // Sets the suggestion text.
170 void SetInstantSuggestion(const InstantSuggestion& suggestion); 170 void SetInstantSuggestion(const InstantSuggestion& suggestion);
171 171
172 // Commits the suggested text. If |skip_inline_autocomplete| is true then the 172 // Commits the suggested text. If |skip_inline_autocomplete| is true then the
173 // suggested text will be committed as final text as if it's inputted by the 173 // suggested text will be committed as final text as if it's inputted by the
174 // user, rather than as inline autocomplete suggest. 174 // user, rather than as inline autocomplete suggest.
175 // Returns true if the text was committed. 175 // Returns true if the text was committed.
176 // TODO: can the return type be void? 176 // TODO: can the return type be void?
177 bool CommitSuggestedText(bool skip_inline_autocomplete); 177 bool CommitSuggestedText(bool skip_inline_autocomplete);
178 178
179 // Accepts the currently showing Instant preview, if any, and returns true.
180 // Returns false if there is no Instant preview showing.
181 bool AcceptCurrentInstantPreview();
182
183 // Invoked any time the text may have changed in the edit. Updates Instant and 179 // Invoked any time the text may have changed in the edit. Updates Instant and
184 // notifies the controller. 180 // notifies the controller.
185 void OnChanged(); 181 void OnChanged();
186 182
187 // Reverts the edit model back to its unedited state (permanent text showing, 183 // Reverts the edit model back to its unedited state (permanent text showing,
188 // no user input in progress). 184 // no user input in progress).
189 void Revert(); 185 void Revert();
190 186
191 // Directs the popup to start autocomplete. 187 // Directs the popup to start autocomplete.
192 void StartAutocomplete(bool has_selected_text, 188 void StartAutocomplete(bool has_selected_text,
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 // an exact keyword match. If this is true then keyword mode will be 555 // an exact keyword match. If this is true then keyword mode will be
560 // triggered automatically if the input is "<keyword> <search string>". We 556 // triggered automatically if the input is "<keyword> <search string>". We
561 // allow this when CreatedKeywordSearchByInsertingSpaceInMiddle() is true. 557 // allow this when CreatedKeywordSearchByInsertingSpaceInMiddle() is true.
562 // This has no effect if we're already in keyword mode. 558 // This has no effect if we're already in keyword mode.
563 bool allow_exact_keyword_match_; 559 bool allow_exact_keyword_match_;
564 560
565 DISALLOW_COPY_AND_ASSIGN(OmniboxEditModel); 561 DISALLOW_COPY_AND_ASSIGN(OmniboxEditModel);
566 }; 562 };
567 563
568 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_ 564 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.cc ('k') | chrome/browser/ui/omnibox/omnibox_edit_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698