| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/app_list/search/search_controller.h" | 5 #include "chrome/browser/ui/app_list/search/search_controller.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| 11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/metrics/histogram.h" | 13 #include "base/metrics/histogram.h" |
| 14 #include "base/strings/string_util.h" | 14 #include "base/strings/string_util.h" |
| 15 #include "base/strings/utf_string_conversions.h" | 15 #include "base/strings/utf_string_conversions.h" |
| 16 #include "chrome/browser/profiles/profile.h" | 16 #include "chrome/browser/profiles/profile.h" |
| 17 #include "chrome/browser/ui/app_list/app_list_controller_delegate.h" | 17 #include "chrome/browser/ui/app_list/app_list_controller_delegate.h" |
| 18 #include "chrome/browser/ui/app_list/search/app_search_provider.h" | 18 #include "chrome/browser/ui/app_list/search/app_search_provider.h" |
| 19 #include "chrome/browser/ui/app_list/search/chrome_search_result.h" | 19 #include "chrome/browser/ui/app_list/search/chrome_search_result.h" |
| 20 #include "chrome/browser/ui/app_list/search/history.h" | 20 #include "chrome/browser/ui/app_list/search/history.h" |
| 21 #include "chrome/browser/ui/app_list/search/history_factory.h" | 21 #include "chrome/browser/ui/app_list/search/history_factory.h" |
| 22 #include "chrome/browser/ui/app_list/search/omnibox_provider.h" | 22 #include "chrome/browser/ui/app_list/search/omnibox_provider.h" |
| 23 #include "chrome/browser/ui/app_list/search/people/people_provider.h" | 23 #include "chrome/browser/ui/app_list/search/people/people_provider.h" |
| 24 #include "chrome/browser/ui/app_list/search/webstore/webstore_provider.h" | 24 #include "chrome/browser/ui/app_list/search/webstore/webstore_provider.h" |
| 25 #include "chrome/browser/ui/app_list/start_page_service.h" | 25 #include "chrome/browser/ui/app_list/start_page_service.h" |
| 26 #include "chrome/common/chrome_switches.h" | 26 #include "chrome/common/chrome_switches.h" |
| 27 #include "chrome/grit/generated_resources.h" |
| 27 #include "content/public/browser/user_metrics.h" | 28 #include "content/public/browser/user_metrics.h" |
| 28 #include "grit/component_scaled_resources.h" | 29 #include "grit/component_scaled_resources.h" |
| 29 #include "grit/generated_resources.h" | |
| 30 #include "grit/theme_resources.h" | 30 #include "grit/theme_resources.h" |
| 31 #include "ui/app_list/search_box_model.h" | 31 #include "ui/app_list/search_box_model.h" |
| 32 #include "ui/app_list/speech_ui_model.h" | 32 #include "ui/app_list/speech_ui_model.h" |
| 33 #include "ui/base/l10n/l10n_util.h" | 33 #include "ui/base/l10n/l10n_util.h" |
| 34 #include "ui/base/resource/resource_bundle.h" | 34 #include "ui/base/resource/resource_bundle.h" |
| 35 | 35 |
| 36 namespace { | 36 namespace { |
| 37 const char kAppListSearchResultOpenTypeHistogram[] = | 37 const char kAppListSearchResultOpenTypeHistogram[] = |
| 38 "Apps.AppListSearchResultOpenType"; | 38 "Apps.AppListSearchResultOpenType"; |
| 39 | 39 |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 } | 177 } |
| 178 | 178 |
| 179 void SearchController::OnSpeechRecognitionStateChanged( | 179 void SearchController::OnSpeechRecognitionStateChanged( |
| 180 SpeechRecognitionState new_state) { | 180 SpeechRecognitionState new_state) { |
| 181 search_box_->SetHintText(l10n_util::GetStringUTF16( | 181 search_box_->SetHintText(l10n_util::GetStringUTF16( |
| 182 (new_state == SPEECH_RECOGNITION_HOTWORD_LISTENING) ? | 182 (new_state == SPEECH_RECOGNITION_HOTWORD_LISTENING) ? |
| 183 IDS_SEARCH_BOX_HOTWORD_HINT : IDS_SEARCH_BOX_HINT)); | 183 IDS_SEARCH_BOX_HOTWORD_HINT : IDS_SEARCH_BOX_HINT)); |
| 184 } | 184 } |
| 185 | 185 |
| 186 } // namespace app_list | 186 } // namespace app_list |
| OLD | NEW |