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

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

Issue 2738003002: Add title to current page in zero suggest. (Closed)
Patch Set: Remove debugging info. Created 3 years, 7 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
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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 UpdateStartupPages(); 248 UpdateStartupPages();
249 } 249 }
250 250
251 void StartupPagesHandler::RequestAutocompleteSuggestions( 251 void StartupPagesHandler::RequestAutocompleteSuggestions(
252 const base::ListValue* args) { 252 const base::ListValue* args) {
253 base::string16 input; 253 base::string16 input;
254 CHECK_EQ(args->GetSize(), 1U); 254 CHECK_EQ(args->GetSize(), 1U);
255 CHECK(args->GetString(0, &input)); 255 CHECK(args->GetString(0, &input));
256 256
257 autocomplete_controller_->Start(AutocompleteInput( 257 autocomplete_controller_->Start(AutocompleteInput(
258 input, base::string16::npos, std::string(), GURL(), 258 input, base::string16::npos, std::string(), GURL(), base::string16(),
259 metrics::OmniboxEventProto::INVALID_SPEC, true, false, false, true, false, 259 metrics::OmniboxEventProto::INVALID_SPEC, true, false, false, true, false,
260 ChromeAutocompleteSchemeClassifier(Profile::FromWebUI(web_ui())))); 260 ChromeAutocompleteSchemeClassifier(Profile::FromWebUI(web_ui()))));
261 } 261 }
262 262
263 void StartupPagesHandler::OnResultChanged(bool default_match_changed) { 263 void StartupPagesHandler::OnResultChanged(bool default_match_changed) {
264 const AutocompleteResult& result = autocomplete_controller_->result(); 264 const AutocompleteResult& result = autocomplete_controller_->result();
265 base::ListValue suggestions; 265 base::ListValue suggestions;
266 OptionsUI::ProcessAutocompleteSuggestions(result, &suggestions); 266 OptionsUI::ProcessAutocompleteSuggestions(result, &suggestions);
267 web_ui()->CallJavascriptFunctionUnsafe( 267 web_ui()->CallJavascriptFunctionUnsafe(
268 "StartupOverlay.updateAutocompleteSuggestions", suggestions); 268 "StartupOverlay.updateAutocompleteSuggestions", suggestions);
269 } 269 }
270 270
271 } // namespace options 271 } // namespace options
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/home_page_overlay_handler.cc ('k') | components/omnibox/browser/autocomplete_classifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698