| 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 #ifndef CHROME_BROWSER_UI_APP_LIST_SEARCH_SEARCH_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_APP_LIST_SEARCH_SEARCH_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_APP_LIST_SEARCH_SEARCH_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_APP_LIST_SEARCH_SEARCH_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
| 11 #include "base/timer.h" | 11 #include "base/timer.h" |
| 12 #include "chrome/browser/ui/app_list/search/mixer.h" | 12 #include "chrome/browser/ui/app_list/search/mixer.h" |
| 13 #include "ui/app_list/app_list_model.h" | 13 #include "ui/app_list/app_list_model.h" |
| 14 | 14 |
| 15 class AppListControllerDelegate; | 15 class AppListControllerDelegate; |
| 16 class Profile; | 16 class Profile; |
| 17 | 17 |
| 18 namespace app_list { | 18 namespace app_list { |
| 19 | 19 |
| 20 class History; |
| 20 class SearchBoxModel; | 21 class SearchBoxModel; |
| 21 class SearchProvider; | 22 class SearchProvider; |
| 22 class SearchResult; | 23 class SearchResult; |
| 23 | 24 |
| 24 // Controller that collects query from given SearchBoxModel, dispatches it | 25 // Controller that collects query from given SearchBoxModel, dispatches it |
| 25 // to all search providers, then invokes the mixer to mix and to publish the | 26 // to all search providers, then invokes the mixer to mix and to publish the |
| 26 // results to the given SearchResults UI model. | 27 // results to the given SearchResults UI model. |
| 27 class SearchController { | 28 class SearchController { |
| 28 public: | 29 public: |
| 29 SearchController(Profile* profile, | 30 SearchController(Profile* profile, |
| (...skipping 22 matching lines...) Expand all Loading... |
| 52 // Invoked when the search results are changed. | 53 // Invoked when the search results are changed. |
| 53 void OnResultsChanged(); | 54 void OnResultsChanged(); |
| 54 | 55 |
| 55 Profile* profile_; | 56 Profile* profile_; |
| 56 SearchBoxModel* search_box_; | 57 SearchBoxModel* search_box_; |
| 57 AppListControllerDelegate* list_controller_; | 58 AppListControllerDelegate* list_controller_; |
| 58 | 59 |
| 59 bool dispatching_query_; | 60 bool dispatching_query_; |
| 60 Providers providers_; | 61 Providers providers_; |
| 61 scoped_ptr<Mixer> mixer_; | 62 scoped_ptr<Mixer> mixer_; |
| 63 History* history_; // BrowserContextKeyedService, not owned. |
| 62 | 64 |
| 63 base::OneShotTimer<SearchController> stop_timer_; | 65 base::OneShotTimer<SearchController> stop_timer_; |
| 64 | 66 |
| 65 DISALLOW_COPY_AND_ASSIGN(SearchController); | 67 DISALLOW_COPY_AND_ASSIGN(SearchController); |
| 66 }; | 68 }; |
| 67 | 69 |
| 68 } // namespace app_list | 70 } // namespace app_list |
| 69 | 71 |
| 70 #endif // CHROME_BROWSER_UI_APP_LIST_SEARCH_SEARCH_CONTROLLER_H_ | 72 #endif // CHROME_BROWSER_UI_APP_LIST_SEARCH_SEARCH_CONTROLLER_H_ |
| OLD | NEW |