OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 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_PAGE_VIEW_H_ | 5 #ifndef UI_APP_LIST_VIEWS_SEARCH_RESULT_PAGE_VIEW_H_ |
6 #define UI_APP_LIST_VIEWS_SEARCH_RESULT_PAGE_VIEW_H_ | 6 #define UI_APP_LIST_VIEWS_SEARCH_RESULT_PAGE_VIEW_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 public: | 24 public: |
25 SearchResultPageView(); | 25 SearchResultPageView(); |
26 ~SearchResultPageView() override; | 26 ~SearchResultPageView() override; |
27 | 27 |
28 int selected_index() { return selected_index_; } | 28 int selected_index() { return selected_index_; } |
29 | 29 |
30 void AddSearchResultContainerView( | 30 void AddSearchResultContainerView( |
31 AppListModel::SearchResults* result_model, | 31 AppListModel::SearchResults* result_model, |
32 SearchResultContainerView* result_container); | 32 SearchResultContainerView* result_container); |
33 | 33 |
| 34 const std::vector<SearchResultContainerView*>& result_container_views() { |
| 35 return result_container_views_; |
| 36 } |
| 37 |
34 // Overridden from views::View: | 38 // Overridden from views::View: |
35 bool OnKeyPressed(const ui::KeyEvent& event) override; | 39 bool OnKeyPressed(const ui::KeyEvent& event) override; |
36 void ChildPreferredSizeChanged(views::View* child) override; | 40 void ChildPreferredSizeChanged(views::View* child) override; |
37 | 41 |
38 private: | 42 private: |
39 void SetSelectedIndex(int index); | 43 void SetSelectedIndex(int index); |
40 bool IsValidSelectionIndex(int index); | 44 bool IsValidSelectionIndex(int index); |
41 | 45 |
42 // The SearchResultContainerViews that compose the search page. All owned by | 46 // The SearchResultContainerViews that compose the search page. All owned by |
43 // the views hierarchy. | 47 // the views hierarchy. |
44 std::vector<SearchResultContainerView*> result_container_views_; | 48 std::vector<SearchResultContainerView*> result_container_views_; |
45 | 49 |
46 int selected_index_; | 50 int selected_index_; |
47 | 51 |
48 DISALLOW_COPY_AND_ASSIGN(SearchResultPageView); | 52 DISALLOW_COPY_AND_ASSIGN(SearchResultPageView); |
49 }; | 53 }; |
50 | 54 |
51 } // namespace app_list | 55 } // namespace app_list |
52 | 56 |
53 #endif // UI_APP_LIST_VIEWS_SEARCH_RESULT_PAGE_VIEW_H_ | 57 #endif // UI_APP_LIST_VIEWS_SEARCH_RESULT_PAGE_VIEW_H_ |
OLD | NEW |