| 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_MIXER_H_ | 5 #ifndef UI_APP_LIST_SEARCH_MIXER_H_ |
| 6 #define UI_APP_LIST_SEARCH_MIXER_H_ | 6 #define UI_APP_LIST_SEARCH_MIXER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 // main group takes no more than 4 slots. The web store takes no more than 2 | 30 // main group takes no more than 4 slots. The web store takes no more than 2 |
| 31 // slots. The omnibox group takes all the remaining slots. | 31 // slots. The omnibox group takes all the remaining slots. |
| 32 class APP_LIST_EXPORT Mixer { | 32 class APP_LIST_EXPORT Mixer { |
| 33 public: | 33 public: |
| 34 // The enum represents mixer groups. Each must have a Group added in Init(). | 34 // The enum represents mixer groups. Each must have a Group added in Init(). |
| 35 enum GroupId { | 35 enum GroupId { |
| 36 MAIN_GROUP = 0, | 36 MAIN_GROUP = 0, |
| 37 OMNIBOX_GROUP = 1, | 37 OMNIBOX_GROUP = 1, |
| 38 WEBSTORE_GROUP = 2, | 38 WEBSTORE_GROUP = 2, |
| 39 PEOPLE_GROUP = 3, | 39 PEOPLE_GROUP = 3, |
| 40 SUGGESTIONS_GROUP = 4, |
| 40 }; | 41 }; |
| 41 | 42 |
| 42 explicit Mixer(AppListModel::SearchResults* ui_results); | 43 explicit Mixer(AppListModel::SearchResults* ui_results); |
| 43 ~Mixer(); | 44 ~Mixer(); |
| 44 | 45 |
| 45 // Creates mixer groups. | 46 // Creates mixer groups. |
| 46 void Init(); | 47 void Init(); |
| 47 | 48 |
| 48 // Associates a provider with a mixer group. | 49 // Associates a provider with a mixer group. |
| 49 void AddProviderToGroup(GroupId group, SearchProvider* provider); | 50 void AddProviderToGroup(GroupId group, SearchProvider* provider); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 | 83 |
| 83 AppListModel::SearchResults* ui_results_; // Not owned. | 84 AppListModel::SearchResults* ui_results_; // Not owned. |
| 84 Groups groups_; | 85 Groups groups_; |
| 85 | 86 |
| 86 DISALLOW_COPY_AND_ASSIGN(Mixer); | 87 DISALLOW_COPY_AND_ASSIGN(Mixer); |
| 87 }; | 88 }; |
| 88 | 89 |
| 89 } // namespace app_list | 90 } // namespace app_list |
| 90 | 91 |
| 91 #endif // UI_APP_LIST_SEARCH_MIXER_H_ | 92 #endif // UI_APP_LIST_SEARCH_MIXER_H_ |
| OLD | NEW |