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

Side by Side Diff: chrome/browser/ui/webui/options/home_page_overlay_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/home_page_overlay_handler.h" 5 #include "chrome/browser/ui/webui/options/home_page_overlay_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/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 IDS_OPTIONS_HOMEPAGE_TITLE); 48 IDS_OPTIONS_HOMEPAGE_TITLE);
49 } 49 }
50 50
51 void HomePageOverlayHandler::RequestAutocompleteSuggestions( 51 void HomePageOverlayHandler::RequestAutocompleteSuggestions(
52 const base::ListValue* args) { 52 const base::ListValue* args) {
53 base::string16 input; 53 base::string16 input;
54 CHECK_EQ(args->GetSize(), 1U); 54 CHECK_EQ(args->GetSize(), 1U);
55 CHECK(args->GetString(0, &input)); 55 CHECK(args->GetString(0, &input));
56 56
57 autocomplete_controller_->Start(AutocompleteInput( 57 autocomplete_controller_->Start(AutocompleteInput(
58 input, base::string16::npos, std::string(), GURL(), 58 input, base::string16::npos, std::string(), GURL(), base::string16(),
59 metrics::OmniboxEventProto::INVALID_SPEC, true, false, false, true, false, 59 metrics::OmniboxEventProto::INVALID_SPEC, true, false, false, true, false,
60 ChromeAutocompleteSchemeClassifier(Profile::FromWebUI(web_ui())))); 60 ChromeAutocompleteSchemeClassifier(Profile::FromWebUI(web_ui()))));
61 } 61 }
62 62
63 void HomePageOverlayHandler::OnResultChanged(bool default_match_changed) { 63 void HomePageOverlayHandler::OnResultChanged(bool default_match_changed) {
64 const AutocompleteResult& result = autocomplete_controller_->result(); 64 const AutocompleteResult& result = autocomplete_controller_->result();
65 base::ListValue suggestions; 65 base::ListValue suggestions;
66 OptionsUI::ProcessAutocompleteSuggestions(result, &suggestions); 66 OptionsUI::ProcessAutocompleteSuggestions(result, &suggestions);
67 web_ui()->CallJavascriptFunctionUnsafe( 67 web_ui()->CallJavascriptFunctionUnsafe(
68 "HomePageOverlay.updateAutocompleteSuggestions", suggestions); 68 "HomePageOverlay.updateAutocompleteSuggestions", suggestions);
69 } 69 }
70 70
71 } // namespace options 71 } // namespace options
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/omnibox/omnibox_page_handler.cc ('k') | chrome/browser/ui/webui/options/startup_pages_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698