Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(93)

Side by Side Diff: ui/app_list/search/mixer.h

Issue 2225073002: [Chrome OS] Change layout of the launcher. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase & scale the Google Doodle image when it's too large. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/app_list/app_list_constants.cc ('k') | ui/app_list/search/mixer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <stddef.h> 8 #include <stddef.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 27 matching lines...) Expand all
38 // chosen from this group (if 0, will allow unlimited results from this 38 // chosen from this group (if 0, will allow unlimited results from this
39 // group). If there aren't enough results from all groups, more than 39 // group). If there aren't enough results from all groups, more than
40 // |max_results| may be chosen from this group. Each result in the group will 40 // |max_results| may be chosen from this group. Each result in the group will
41 // have its score multiplied by |multiplier|. Returns the group's group_id. 41 // have its score multiplied by |multiplier|. Returns the group's group_id.
42 size_t AddGroup(size_t max_results, double multiplier); 42 size_t AddGroup(size_t max_results, double multiplier);
43 43
44 // Associates a provider with a mixer group. 44 // Associates a provider with a mixer group.
45 void AddProviderToGroup(size_t group_id, SearchProvider* provider); 45 void AddProviderToGroup(size_t group_id, SearchProvider* provider);
46 46
47 // Collects the results, sorts and publishes them. 47 // Collects the results, sorts and publishes them.
48 void MixAndPublish(bool is_voice_query, const KnownResults& known_results); 48 void MixAndPublish(bool is_voice_query,
49 const KnownResults& known_results,
50 size_t num_max_results);
49 51
50 private: 52 private:
51 FRIEND_TEST_ALL_PREFIXES(test::MixerTest, Publish); 53 FRIEND_TEST_ALL_PREFIXES(test::MixerTest, Publish);
52 54
53 // Used for sorting and mixing results. 55 // Used for sorting and mixing results.
54 struct APP_LIST_EXPORT SortData { 56 struct APP_LIST_EXPORT SortData {
55 SortData(); 57 SortData();
56 SortData(SearchResult* result, double score); 58 SortData(SearchResult* result, double score);
57 59
58 bool operator<(const SortData& other) const; 60 bool operator<(const SortData& other) const;
(...skipping 22 matching lines...) Expand all
81 83
82 AppListModel::SearchResults* ui_results_; // Not owned. 84 AppListModel::SearchResults* ui_results_; // Not owned.
83 Groups groups_; 85 Groups groups_;
84 86
85 DISALLOW_COPY_AND_ASSIGN(Mixer); 87 DISALLOW_COPY_AND_ASSIGN(Mixer);
86 }; 88 };
87 89
88 } // namespace app_list 90 } // namespace app_list
89 91
90 #endif // UI_APP_LIST_SEARCH_MIXER_H_ 92 #endif // UI_APP_LIST_SEARCH_MIXER_H_
OLDNEW
« no previous file with comments | « ui/app_list/app_list_constants.cc ('k') | ui/app_list/search/mixer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698