| OLD | NEW |
| 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/values.h" | 9 #include "base/values.h" |
| 10 #include "chrome/browser/autocomplete/autocomplete_classifier.h" | |
| 11 #include "chrome/browser/autocomplete/autocomplete_controller.h" | |
| 12 #include "chrome/browser/autocomplete/chrome_autocomplete_provider_client.h" | 10 #include "chrome/browser/autocomplete/chrome_autocomplete_provider_client.h" |
| 13 #include "chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.h" | 11 #include "chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.h" |
| 14 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
| 15 #include "chrome/browser/search_engines/template_url_service_factory.h" | 13 #include "chrome/browser/search_engines/template_url_service_factory.h" |
| 16 #include "chrome/grit/generated_resources.h" | 14 #include "chrome/grit/generated_resources.h" |
| 17 #include "components/metrics/proto/omnibox_event.pb.h" | 15 #include "components/metrics/proto/omnibox_event.pb.h" |
| 16 #include "components/omnibox/autocomplete_classifier.h" |
| 17 #include "components/omnibox/autocomplete_controller.h" |
| 18 #include "components/omnibox/autocomplete_input.h" | 18 #include "components/omnibox/autocomplete_input.h" |
| 19 #include "components/omnibox/autocomplete_result.h" | 19 #include "components/omnibox/autocomplete_result.h" |
| 20 #include "content/public/browser/web_ui.h" | 20 #include "content/public/browser/web_ui.h" |
| 21 | 21 |
| 22 namespace options { | 22 namespace options { |
| 23 | 23 |
| 24 HomePageOverlayHandler::HomePageOverlayHandler() { | 24 HomePageOverlayHandler::HomePageOverlayHandler() { |
| 25 } | 25 } |
| 26 | 26 |
| 27 HomePageOverlayHandler::~HomePageOverlayHandler() { | 27 HomePageOverlayHandler::~HomePageOverlayHandler() { |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 | 61 |
| 62 void HomePageOverlayHandler::OnResultChanged(bool default_match_changed) { | 62 void HomePageOverlayHandler::OnResultChanged(bool default_match_changed) { |
| 63 const AutocompleteResult& result = autocomplete_controller_->result(); | 63 const AutocompleteResult& result = autocomplete_controller_->result(); |
| 64 base::ListValue suggestions; | 64 base::ListValue suggestions; |
| 65 OptionsUI::ProcessAutocompleteSuggestions(result, &suggestions); | 65 OptionsUI::ProcessAutocompleteSuggestions(result, &suggestions); |
| 66 web_ui()->CallJavascriptFunction( | 66 web_ui()->CallJavascriptFunction( |
| 67 "HomePageOverlay.updateAutocompleteSuggestions", suggestions); | 67 "HomePageOverlay.updateAutocompleteSuggestions", suggestions); |
| 68 } | 68 } |
| 69 | 69 |
| 70 } // namespace options | 70 } // namespace options |
| OLD | NEW |