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 #include "ui/app_list/views/start_page_view.h" | 5 #include "ui/app_list/views/start_page_view.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
10 #include "base/metrics/histogram_macros.h" | 10 #include "base/metrics/histogram_macros.h" |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 return search_result_tile_views_; | 119 return search_result_tile_views_; |
120 } | 120 } |
121 | 121 |
122 AllAppsTileItemView* all_apps_button() { return all_apps_button_; } | 122 AllAppsTileItemView* all_apps_button() { return all_apps_button_; } |
123 | 123 |
124 // Overridden from SearchResultContainerView: | 124 // Overridden from SearchResultContainerView: |
125 int Update() override; | 125 int Update() override; |
126 void UpdateSelectedIndex(int old_selected, int new_selected) override; | 126 void UpdateSelectedIndex(int old_selected, int new_selected) override; |
127 void OnContainerSelected(bool from_bottom, | 127 void OnContainerSelected(bool from_bottom, |
128 bool directional_movement) override; | 128 bool directional_movement) override; |
| 129 void NotifyFirstResultYIndex(int y_index) override; |
| 130 int GetYSize() override; |
129 | 131 |
130 private: | 132 private: |
131 ContentsView* contents_view_; | 133 ContentsView* contents_view_; |
132 | 134 |
133 std::vector<SearchResultTileItemView*> search_result_tile_views_; | 135 std::vector<SearchResultTileItemView*> search_result_tile_views_; |
134 AllAppsTileItemView* all_apps_button_; | 136 AllAppsTileItemView* all_apps_button_; |
135 | 137 |
136 DISALLOW_COPY_AND_ASSIGN(StartPageTilesContainer); | 138 DISALLOW_COPY_AND_ASSIGN(StartPageTilesContainer); |
137 }; | 139 }; |
138 | 140 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 if (old_selected >= 0) | 213 if (old_selected >= 0) |
212 GetTileItemView(old_selected)->SetSelected(false); | 214 GetTileItemView(old_selected)->SetSelected(false); |
213 | 215 |
214 if (new_selected >= 0) | 216 if (new_selected >= 0) |
215 GetTileItemView(new_selected)->SetSelected(true); | 217 GetTileItemView(new_selected)->SetSelected(true); |
216 } | 218 } |
217 | 219 |
218 void StartPageView::StartPageTilesContainer::OnContainerSelected( | 220 void StartPageView::StartPageTilesContainer::OnContainerSelected( |
219 bool /*from_bottom*/, | 221 bool /*from_bottom*/, |
220 bool /*directional_movement*/) { | 222 bool /*directional_movement*/) { |
| 223 NOTREACHED(); |
| 224 } |
| 225 |
| 226 void StartPageView::StartPageTilesContainer::NotifyFirstResultYIndex( |
| 227 int /*y_index*/) { |
| 228 NOTREACHED(); |
| 229 } |
| 230 |
| 231 int StartPageView::StartPageTilesContainer::GetYSize() { |
| 232 NOTREACHED(); |
| 233 return 0; |
221 } | 234 } |
222 | 235 |
223 //////////////////////////////////////////////////////////////////////////////// | 236 //////////////////////////////////////////////////////////////////////////////// |
224 // StartPageView implementation: | 237 // StartPageView implementation: |
225 StartPageView::StartPageView(AppListMainView* app_list_main_view, | 238 StartPageView::StartPageView(AppListMainView* app_list_main_view, |
226 AppListViewDelegate* view_delegate) | 239 AppListViewDelegate* view_delegate) |
227 : app_list_main_view_(app_list_main_view), | 240 : app_list_main_view_(app_list_main_view), |
228 view_delegate_(view_delegate), | 241 view_delegate_(view_delegate), |
229 search_box_spacer_view_(new SearchBoxSpacerView( | 242 search_box_spacer_view_(new SearchBoxSpacerView( |
230 app_list_main_view->search_box_view()->GetPreferredSize())), | 243 app_list_main_view->search_box_view()->GetPreferredSize())), |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
480 // is enabled). | 493 // is enabled). |
481 if (event->type() == ui::ET_SCROLL && event->y_offset() < 0) | 494 if (event->type() == ui::ET_SCROLL && event->y_offset() < 0) |
482 MaybeOpenCustomLauncherPage(); | 495 MaybeOpenCustomLauncherPage(); |
483 } | 496 } |
484 | 497 |
485 TileItemView* StartPageView::GetTileItemView(size_t index) { | 498 TileItemView* StartPageView::GetTileItemView(size_t index) { |
486 return tiles_container_->GetTileItemView(index); | 499 return tiles_container_->GetTileItemView(index); |
487 } | 500 } |
488 | 501 |
489 } // namespace app_list | 502 } // namespace app_list |
OLD | NEW |