| 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/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 "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/prefs/pref_service.h" | |
| 13 #include "chrome/browser/autocomplete/chrome_autocomplete_provider_client.h" | 12 #include "chrome/browser/autocomplete/chrome_autocomplete_provider_client.h" |
| 14 #include "chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.h" | 13 #include "chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.h" |
| 15 #include "chrome/browser/chrome_notification_types.h" | 14 #include "chrome/browser/chrome_notification_types.h" |
| 16 #include "chrome/browser/custom_home_pages_table_model.h" | 15 #include "chrome/browser/custom_home_pages_table_model.h" |
| 17 #include "chrome/browser/prefs/session_startup_pref.h" | 16 #include "chrome/browser/prefs/session_startup_pref.h" |
| 18 #include "chrome/browser/profiles/profile.h" | 17 #include "chrome/browser/profiles/profile.h" |
| 19 #include "chrome/browser/search_engines/template_url_service_factory.h" | 18 #include "chrome/browser/search_engines/template_url_service_factory.h" |
| 20 #include "chrome/common/pref_names.h" | 19 #include "chrome/common/pref_names.h" |
| 21 #include "chrome/grit/generated_resources.h" | 20 #include "chrome/grit/generated_resources.h" |
| 22 #include "components/metrics/proto/omnibox_event.pb.h" | 21 #include "components/metrics/proto/omnibox_event.pb.h" |
| 23 #include "components/omnibox/browser/autocomplete_classifier.h" | 22 #include "components/omnibox/browser/autocomplete_classifier.h" |
| 24 #include "components/omnibox/browser/autocomplete_controller.h" | 23 #include "components/omnibox/browser/autocomplete_controller.h" |
| 25 #include "components/omnibox/browser/autocomplete_input.h" | 24 #include "components/omnibox/browser/autocomplete_input.h" |
| 26 #include "components/omnibox/browser/autocomplete_result.h" | 25 #include "components/omnibox/browser/autocomplete_result.h" |
| 26 #include "components/prefs/pref_service.h" |
| 27 #include "components/url_formatter/url_fixer.h" | 27 #include "components/url_formatter/url_fixer.h" |
| 28 #include "content/public/browser/notification_details.h" | 28 #include "content/public/browser/notification_details.h" |
| 29 #include "content/public/browser/web_ui.h" | 29 #include "content/public/browser/web_ui.h" |
| 30 | 30 |
| 31 namespace options { | 31 namespace options { |
| 32 | 32 |
| 33 StartupPagesHandler::StartupPagesHandler() { | 33 StartupPagesHandler::StartupPagesHandler() { |
| 34 } | 34 } |
| 35 | 35 |
| 36 StartupPagesHandler::~StartupPagesHandler() { | 36 StartupPagesHandler::~StartupPagesHandler() { |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 | 255 |
| 256 void StartupPagesHandler::OnResultChanged(bool default_match_changed) { | 256 void StartupPagesHandler::OnResultChanged(bool default_match_changed) { |
| 257 const AutocompleteResult& result = autocomplete_controller_->result(); | 257 const AutocompleteResult& result = autocomplete_controller_->result(); |
| 258 base::ListValue suggestions; | 258 base::ListValue suggestions; |
| 259 OptionsUI::ProcessAutocompleteSuggestions(result, &suggestions); | 259 OptionsUI::ProcessAutocompleteSuggestions(result, &suggestions); |
| 260 web_ui()->CallJavascriptFunction( | 260 web_ui()->CallJavascriptFunction( |
| 261 "StartupOverlay.updateAutocompleteSuggestions", suggestions); | 261 "StartupOverlay.updateAutocompleteSuggestions", suggestions); |
| 262 } | 262 } |
| 263 | 263 |
| 264 } // namespace options | 264 } // namespace options |
| OLD | NEW |