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

Side by Side Diff: chrome/browser/ui/webui/options/startup_pages_handler.cc

Issue 12623029: Upstreaming mechanism to add query refinement to omnibox searches. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Applied Peter's comments. 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
« no previous file with comments | « chrome/browser/ui/webui/options/home_page_overlay_handler.cc ('k') | no next file » | 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) 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/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "chrome/browser/autocomplete/autocomplete_classifier.h" 10 #include "chrome/browser/autocomplete/autocomplete_classifier.h"
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 UpdateStartupPages(); 220 UpdateStartupPages();
221 } 221 }
222 222
223 void StartupPagesHandler::RequestAutocompleteSuggestions( 223 void StartupPagesHandler::RequestAutocompleteSuggestions(
224 const ListValue* args) { 224 const ListValue* args) {
225 string16 input; 225 string16 input;
226 CHECK_EQ(args->GetSize(), 1U); 226 CHECK_EQ(args->GetSize(), 1U);
227 CHECK(args->GetString(0, &input)); 227 CHECK(args->GetString(0, &input));
228 228
229 autocomplete_controller_->Start(AutocompleteInput( 229 autocomplete_controller_->Start(AutocompleteInput(
230 input, string16::npos, string16(), true, 230 input, string16::npos, string16(), GURL(), true,
231 false, false, AutocompleteInput::ALL_MATCHES)); 231 false, false, AutocompleteInput::ALL_MATCHES));
232 } 232 }
233 233
234 void StartupPagesHandler::OnResultChanged(bool default_match_changed) { 234 void StartupPagesHandler::OnResultChanged(bool default_match_changed) {
235 const AutocompleteResult& result = autocomplete_controller_->result(); 235 const AutocompleteResult& result = autocomplete_controller_->result();
236 ListValue suggestions; 236 ListValue suggestions;
237 OptionsUI::ProcessAutocompleteSuggestions(result, &suggestions); 237 OptionsUI::ProcessAutocompleteSuggestions(result, &suggestions);
238 web_ui()->CallJavascriptFunction( 238 web_ui()->CallJavascriptFunction(
239 "StartupOverlay.updateAutocompleteSuggestions", suggestions); 239 "StartupOverlay.updateAutocompleteSuggestions", suggestions);
240 } 240 }
241 241
242 } // namespace options 242 } // namespace options
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/home_page_overlay_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698