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

Side by Side Diff: ui/app_list/app_list_model.h

Issue 796293002: App list voice searches now prioritize exact-match web results. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed MixerTest and add MixerTest.VoiceQuery. Created 6 years 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_APP_LIST_MODEL_H_ 5 #ifndef UI_APP_LIST_APP_LIST_MODEL_H_
6 #define UI_APP_LIST_APP_LIST_MODEL_H_ 6 #define UI_APP_LIST_APP_LIST_MODEL_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 // truncated to |max_results|. 147 // truncated to |max_results|.
148 static std::vector<SearchResult*> FilterSearchResultsByDisplayType( 148 static std::vector<SearchResult*> FilterSearchResultsByDisplayType(
149 SearchResults* results, 149 SearchResults* results,
150 SearchResult::DisplayType display_type, 150 SearchResult::DisplayType display_type,
151 size_t max_results); 151 size_t max_results);
152 152
153 AppListItemList* top_level_item_list() { return top_level_item_list_.get(); } 153 AppListItemList* top_level_item_list() { return top_level_item_list_.get(); }
154 154
155 SearchBoxModel* search_box() { return search_box_.get(); } 155 SearchBoxModel* search_box() { return search_box_.get(); }
156 SearchResults* results() { return results_.get(); } 156 SearchResults* results() { return results_.get(); }
157 SearchResult* auto_launch_result() { return auto_launch_result_.get(); }
157 Status status() const { return status_; } 158 Status status() const { return status_; }
158 bool folders_enabled() const { return folders_enabled_; } 159 bool folders_enabled() const { return folders_enabled_; }
159 160
160 private: 161 private:
161 // AppListItemListObserver 162 // AppListItemListObserver
162 void OnListItemMoved(size_t from_index, 163 void OnListItemMoved(size_t from_index,
163 size_t to_index, 164 size_t to_index,
164 AppListItem* item) override; 165 AppListItem* item) override;
165 166
166 // Returns an existing folder matching |folder_id| or creates a new folder. 167 // Returns an existing folder matching |folder_id| or creates a new folder.
(...skipping 19 matching lines...) Expand all
186 // Removes |item| from |folder|. If |folder| becomes empty, deletes |folder| 187 // Removes |item| from |folder|. If |folder| becomes empty, deletes |folder|
187 // from |top_level_item_list_|. Does NOT trigger observers, calling function 188 // from |top_level_item_list_|. Does NOT trigger observers, calling function
188 // must do so. 189 // must do so.
189 scoped_ptr<AppListItem> RemoveItemFromFolder(AppListFolderItem* folder, 190 scoped_ptr<AppListItem> RemoveItemFromFolder(AppListFolderItem* folder,
190 AppListItem* item); 191 AppListItem* item);
191 192
192 scoped_ptr<AppListItemList> top_level_item_list_; 193 scoped_ptr<AppListItemList> top_level_item_list_;
193 194
194 scoped_ptr<SearchBoxModel> search_box_; 195 scoped_ptr<SearchBoxModel> search_box_;
195 scoped_ptr<SearchResults> results_; 196 scoped_ptr<SearchResults> results_;
197 scoped_ptr<SearchResult> auto_launch_result_;
calamity 2014/12/16 01:50:03 Unused?
Matt Giuca 2014/12/16 02:04:09 Done.
196 198
197 Status status_; 199 Status status_;
198 State state_; 200 State state_;
199 ObserverList<AppListModelObserver, true> observers_; 201 ObserverList<AppListModelObserver, true> observers_;
200 bool folders_enabled_; 202 bool folders_enabled_;
201 203
202 // The current number of subpages the custom launcher page has pushed. 204 // The current number of subpages the custom launcher page has pushed.
203 int custom_launcher_page_subpage_depth_; 205 int custom_launcher_page_subpage_depth_;
204 206
205 DISALLOW_COPY_AND_ASSIGN(AppListModel); 207 DISALLOW_COPY_AND_ASSIGN(AppListModel);
206 }; 208 };
207 209
208 } // namespace app_list 210 } // namespace app_list
209 211
210 #endif // UI_APP_LIST_APP_LIST_MODEL_H_ 212 #endif // UI_APP_LIST_APP_LIST_MODEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698