Chromium Code Reviews| 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/macros.h" | 10 #include "base/macros.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 46 AppListModel::State from_state, | 46 AppListModel::State from_state, |
| 47 AppListModel::State to_state) override; | 47 AppListModel::State to_state) override; |
| 48 int GetSearchBoxZHeight() const override; | 48 int GetSearchBoxZHeight() const override; |
| 49 void OnHidden() override; | 49 void OnHidden() override; |
| 50 | 50 |
| 51 void ClearSelectedIndex(); | 51 void ClearSelectedIndex(); |
| 52 | 52 |
| 53 // Overridden from SearchResultContainerView::Delegate : | 53 // Overridden from SearchResultContainerView::Delegate : |
| 54 void OnSearchResultContainerResultsChanged() override; | 54 void OnSearchResultContainerResultsChanged() override; |
| 55 | 55 |
| 56 views::View* contents_view() const { return contents_view_; } | |
|
oshima
2017/06/29 16:58:50
ditto
newcomer
2017/06/30 21:47:23
Done.
| |
| 57 | |
| 56 private: | 58 private: |
| 57 // |directional_movement| is true if the navigation was caused by directional | 59 // |directional_movement| is true if the navigation was caused by directional |
| 58 // controls (eg, arrow keys), as opposed to linear controls (eg, Tab). | 60 // controls (eg, arrow keys), as opposed to linear controls (eg, Tab). |
| 59 void SetSelectedIndex(int index, bool directional_movement); | 61 void SetSelectedIndex(int index, bool directional_movement); |
| 60 bool IsValidSelectionIndex(int index); | 62 bool IsValidSelectionIndex(int index); |
| 61 | 63 |
| 62 // The SearchResultContainerViews that compose the search page. All owned by | 64 // The SearchResultContainerViews that compose the search page. All owned by |
| 63 // the views hierarchy. | 65 // the views hierarchy. |
| 64 std::vector<SearchResultContainerView*> result_container_views_; | 66 std::vector<SearchResultContainerView*> result_container_views_; |
| 65 | 67 |
| 66 // -1 indicates no selection. | 68 // -1 indicates no selection. |
| 67 int selected_index_; | 69 int selected_index_; |
| 68 | 70 |
| 69 // Whether to use new UX design for search results. | 71 // Whether to use new UX design for search results. |
| 70 bool const is_new_design_; | 72 bool const is_new_design_; |
| 71 | 73 |
| 72 // View containing SearchCardView instances. Owned by view hierarchy. | 74 // View containing SearchCardView instances. Owned by view hierarchy. |
| 73 views::View* const contents_view_; | 75 views::View* const contents_view_; |
| 74 | 76 |
| 75 DISALLOW_COPY_AND_ASSIGN(SearchResultPageView); | 77 DISALLOW_COPY_AND_ASSIGN(SearchResultPageView); |
| 76 }; | 78 }; |
| 77 | 79 |
| 78 } // namespace app_list | 80 } // namespace app_list |
| 79 | 81 |
| 80 #endif // UI_APP_LIST_VIEWS_SEARCH_RESULT_PAGE_VIEW_H_ | 82 #endif // UI_APP_LIST_VIEWS_SEARCH_RESULT_PAGE_VIEW_H_ |
| OLD | NEW |