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

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

Issue 2253253002: [Merge to M53][Chrome OS] Change layout of the launcher. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 // Adds a new mixer group for the special "omnibox" group. This group will be 50 // Adds a new mixer group for the special "omnibox" group. This group will be
51 // treated specially by the Mixer (it will be truncated such that it fills the 51 // treated specially by the Mixer (it will be truncated such that it fills the
52 // remaining slots without overflowing, but with at least one result). A 52 // remaining slots without overflowing, but with at least one result). A
53 // maximum of one group should be added using this method. 53 // maximum of one group should be added using this method.
54 size_t AddOmniboxGroup(size_t max_results, double boost, double multiplier); 54 size_t AddOmniboxGroup(size_t max_results, double boost, double multiplier);
55 55
56 // Associates a provider with a mixer group. 56 // Associates a provider with a mixer group.
57 void AddProviderToGroup(size_t group_id, SearchProvider* provider); 57 void AddProviderToGroup(size_t group_id, SearchProvider* provider);
58 58
59 // Collects the results, sorts and publishes them. 59 // Collects the results, sorts and publishes them.
60 void MixAndPublish(bool is_voice_query, const KnownResults& known_results); 60 void MixAndPublish(bool is_voice_query,
61 const KnownResults& known_results,
62 size_t num_max_results);
61 63
62 private: 64 private:
63 FRIEND_TEST_ALL_PREFIXES(test::MixerTest, Publish); 65 FRIEND_TEST_ALL_PREFIXES(test::MixerTest, Publish);
64 66
65 // Used for sorting and mixing results. 67 // Used for sorting and mixing results.
66 struct APP_LIST_EXPORT SortData { 68 struct APP_LIST_EXPORT SortData {
67 SortData(); 69 SortData();
68 SortData(SearchResult* result, double score); 70 SortData(SearchResult* result, double score);
69 71
70 bool operator<(const SortData& other) const; 72 bool operator<(const SortData& other) const;
(...skipping 30 matching lines...) Expand all
101 size_t omnibox_group_ = 0; 103 size_t omnibox_group_ = 0;
102 // Whether |omnibox_group_| has been set. 104 // Whether |omnibox_group_| has been set.
103 bool has_omnibox_group_ = false; 105 bool has_omnibox_group_ = false;
104 106
105 DISALLOW_COPY_AND_ASSIGN(Mixer); 107 DISALLOW_COPY_AND_ASSIGN(Mixer);
106 }; 108 };
107 109
108 } // namespace app_list 110 } // namespace app_list
109 111
110 #endif // UI_APP_LIST_SEARCH_MIXER_H_ 112 #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