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 UI_APP_LIST_SEARCH_CONTROLLER_H_ | 5 #ifndef UI_APP_LIST_SEARCH_CONTROLLER_H_ |
6 #define UI_APP_LIST_SEARCH_CONTROLLER_H_ | 6 #define UI_APP_LIST_SEARCH_CONTROLLER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 25 matching lines...) Expand all Loading... |
36 | 36 |
37 void Start(bool is_voice_query); | 37 void Start(bool is_voice_query); |
38 void Stop(); | 38 void Stop(); |
39 | 39 |
40 void OpenResult(SearchResult* result, int event_flags); | 40 void OpenResult(SearchResult* result, int event_flags); |
41 void InvokeResultAction(SearchResult* result, | 41 void InvokeResultAction(SearchResult* result, |
42 int action_index, | 42 int action_index, |
43 int event_flags); | 43 int event_flags); |
44 | 44 |
45 // Adds a new mixer group. See Mixer::AddGroup. | 45 // Adds a new mixer group. See Mixer::AddGroup. |
46 size_t AddGroup(size_t max_results, double boost, double multiplier); | 46 size_t AddGroup(size_t max_results, double multiplier); |
47 | |
48 // Adds a new mixer group. See Mixer::AddOmniboxGroup. | |
49 size_t AddOmniboxGroup(size_t max_results, double boost, double multiplier); | |
50 | 47 |
51 // Takes ownership of |provider| and associates it with given mixer group. | 48 // Takes ownership of |provider| and associates it with given mixer group. |
52 void AddProvider(size_t group_id, std::unique_ptr<SearchProvider> provider); | 49 void AddProvider(size_t group_id, std::unique_ptr<SearchProvider> provider); |
53 | 50 |
54 private: | 51 private: |
55 typedef ScopedVector<SearchProvider> Providers; | 52 typedef ScopedVector<SearchProvider> Providers; |
56 | 53 |
57 // Invoked when the search results are changed. | 54 // Invoked when the search results are changed. |
58 void OnResultsChanged(); | 55 void OnResultsChanged(); |
59 | 56 |
60 SearchBoxModel* search_box_; | 57 SearchBoxModel* search_box_; |
61 | 58 |
62 bool dispatching_query_; | 59 bool dispatching_query_; |
63 Providers providers_; | 60 Providers providers_; |
64 std::unique_ptr<Mixer> mixer_; | 61 std::unique_ptr<Mixer> mixer_; |
65 History* history_; // KeyedService, not owned. | 62 History* history_; // KeyedService, not owned. |
66 | 63 |
67 bool is_voice_query_; | 64 bool is_voice_query_; |
68 | 65 |
69 base::OneShotTimer stop_timer_; | 66 base::OneShotTimer stop_timer_; |
70 | 67 |
71 DISALLOW_COPY_AND_ASSIGN(SearchController); | 68 DISALLOW_COPY_AND_ASSIGN(SearchController); |
72 }; | 69 }; |
73 | 70 |
74 } // namespace app_list | 71 } // namespace app_list |
75 | 72 |
76 #endif // UI_APP_LIST_SEARCH_CONTROLLER_H_ | 73 #endif // UI_APP_LIST_SEARCH_CONTROLLER_H_ |
OLD | NEW |