| OLD | NEW |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2014 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_VIEWS_SEARCH_RESULT_CONTAINER_VIEW_H_ | 5 #ifndef UI_APP_LIST_VIEWS_SEARCH_RESULT_CONTAINER_VIEW_H_ |
| 6 #define UI_APP_LIST_VIEWS_SEARCH_RESULT_CONTAINER_VIEW_H_ | 6 #define UI_APP_LIST_VIEWS_SEARCH_RESULT_CONTAINER_VIEW_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 | 41 |
| 42 void ClearSelectedIndex(); | 42 void ClearSelectedIndex(); |
| 43 | 43 |
| 44 // The currently selected index. Returns -1 on no selection. | 44 // The currently selected index. Returns -1 on no selection. |
| 45 int selected_index() const { return selected_index_; } | 45 int selected_index() const { return selected_index_; } |
| 46 | 46 |
| 47 // Returns whether |index| is a valid index for selection. | 47 // Returns whether |index| is a valid index for selection. |
| 48 bool IsValidSelectionIndex(int index) const; | 48 bool IsValidSelectionIndex(int index) const; |
| 49 | 49 |
| 50 int num_results() const { return num_results_; } | 50 int num_results() const { return num_results_; } |
| 51 void set_num_results(int num_results) { num_results_ = num_results; } |
| 51 | 52 |
| 52 void set_container_score(double score) { container_score_ = score; } | 53 void set_container_score(double score) { container_score_ = score; } |
| 53 double container_score() const { return container_score_; } | 54 double container_score() const { return container_score_; } |
| 54 | 55 |
| 55 // Updates the distance_from_origin() properties of the results in this | 56 // Updates the distance_from_origin() properties of the results in this |
| 56 // container. |y_index| is the absolute y-index of the first result of this | 57 // container. |y_index| is the absolute y-index of the first result of this |
| 57 // container (counting from the top of the app list). | 58 // container (counting from the top of the app list). |
| 58 virtual void NotifyFirstResultYIndex(int y_index) = 0; | 59 virtual void NotifyFirstResultYIndex(int y_index) = 0; |
| 59 | 60 |
| 60 // Gets the number of down keystrokes from the beginning to the end of this | 61 // Gets the number of down keystrokes from the beginning to the end of this |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 | 104 |
| 104 // The factory that consolidates multiple Update calls into one. | 105 // The factory that consolidates multiple Update calls into one. |
| 105 base::WeakPtrFactory<SearchResultContainerView> update_factory_; | 106 base::WeakPtrFactory<SearchResultContainerView> update_factory_; |
| 106 | 107 |
| 107 DISALLOW_COPY_AND_ASSIGN(SearchResultContainerView); | 108 DISALLOW_COPY_AND_ASSIGN(SearchResultContainerView); |
| 108 }; | 109 }; |
| 109 | 110 |
| 110 } // namespace app_list | 111 } // namespace app_list |
| 111 | 112 |
| 112 #endif // UI_APP_LIST_VIEWS_SEARCH_RESULT_CONTAINER_VIEW_H_ | 113 #endif // UI_APP_LIST_VIEWS_SEARCH_RESULT_CONTAINER_VIEW_H_ |
| OLD | NEW |