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

Side by Side Diff: chrome/browser/ui/webui/options/startup_pages_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/options/startup_pages_handler.h" 5 #include "chrome/browser/ui/webui/options/startup_pages_handler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/string_number_conversions.h" 9 #include "base/string_number_conversions.h"
10 #include "chrome/browser/autocomplete/autocomplete_classifier.h" 10 #include "chrome/browser/autocomplete/autocomplete_classifier.h"
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 void StartupPagesHandler::CancelChanges(const ListValue* args) { 233 void StartupPagesHandler::CancelChanges(const ListValue* args) {
234 UpdateStartupPages(); 234 UpdateStartupPages();
235 } 235 }
236 236
237 void StartupPagesHandler::RequestAutocompleteSuggestions( 237 void StartupPagesHandler::RequestAutocompleteSuggestions(
238 const ListValue* args) { 238 const ListValue* args) {
239 string16 input; 239 string16 input;
240 CHECK_EQ(args->GetSize(), 1U); 240 CHECK_EQ(args->GetSize(), 1U);
241 CHECK(args->GetString(0, &input)); 241 CHECK(args->GetString(0, &input));
242 242
243 autocomplete_controller_->Start(input, string16(), true, false, false, 243 autocomplete_controller_->Start(AutocompleteInput(
244 AutocompleteInput::ALL_MATCHES); 244 input, string16::npos, string16(), true,
245 false, false, AutocompleteInput::ALL_MATCHES));
245 } 246 }
246 247
247 void StartupPagesHandler::OnResultChanged(bool default_match_changed) { 248 void StartupPagesHandler::OnResultChanged(bool default_match_changed) {
248 const AutocompleteResult& result = autocomplete_controller_->result(); 249 const AutocompleteResult& result = autocomplete_controller_->result();
249 ListValue suggestions; 250 ListValue suggestions;
250 OptionsUI::ProcessAutocompleteSuggestions(result, &suggestions); 251 OptionsUI::ProcessAutocompleteSuggestions(result, &suggestions);
251 web_ui()->CallJavascriptFunction( 252 web_ui()->CallJavascriptFunction(
252 "StartupOverlay.updateAutocompleteSuggestions", suggestions); 253 "StartupOverlay.updateAutocompleteSuggestions", suggestions);
253 } 254 }
254 255
255 } // namespace options 256 } // namespace options
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698