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

Side by Side Diff: chrome/browser/ui/webui/omnibox/omnibox_ui_handler.cc

Issue 11414303: Make Google Search autocomplete provider cursor aware. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 8 years 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #include "chrome/browser/ui/webui/omnibox/omnibox_ui_handler.h" 5 #include "chrome/browser/ui/webui/omnibox/omnibox_ui_handler.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/string16.h" 10 #include "base/string16.h"
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 void OmniboxUIHandler::StartOmniboxQuery( 144 void OmniboxUIHandler::StartOmniboxQuery(
145 const base::ListValue* one_element_input_string) { 145 const base::ListValue* one_element_input_string) {
146 string16 input_string = ExtractStringValue(one_element_input_string); 146 string16 input_string = ExtractStringValue(one_element_input_string);
147 string16 empty_string; 147 string16 empty_string;
148 // Tell the autocomplete controller to start working on the 148 // Tell the autocomplete controller to start working on the
149 // input. It's okay if the previous request hasn't yet finished; 149 // input. It's okay if the previous request hasn't yet finished;
150 // the autocomplete controller is smart enough to stop the previous 150 // the autocomplete controller is smart enough to stop the previous
151 // query before it starts the new one. By the way, in this call to 151 // query before it starts the new one. By the way, in this call to
152 // Start(), we use the default/typical values for all parameters. 152 // Start(), we use the default/typical values for all parameters.
153 time_omnibox_started_ = base::Time::Now(); 153 time_omnibox_started_ = base::Time::Now();
154 controller_->Start(input_string, 154 controller_->Start(AutocompleteInput(
155 empty_string, // user's desired tld (top-level domain) 155 input_string,
156 false, // don't prevent inline autocompletion 156 string16::npos,
157 false, // no preferred keyword provider 157 empty_string, // user's desired tld (top-level domain)
158 true, // allow exact keyword matches 158 false, // don't prevent inline autocompletion
159 AutocompleteInput::ALL_MATCHES); // want all matches 159 false, // no preferred keyword provider
160 true, // allow exact keyword matches
161 AutocompleteInput::ALL_MATCHES)); // want all matches
160 } 162 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698