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 "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
8 #include "ui/app_list/app_list_constants.h" | 8 #include "ui/app_list/app_list_constants.h" |
9 #include "ui/app_list/app_list_item.h" | 9 #include "ui/app_list/app_list_item.h" |
10 #include "ui/app_list/app_list_model.h" | 10 #include "ui/app_list/app_list_model.h" |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 web_view->SetFocusable(false); | 220 web_view->SetFocusable(false); |
221 instant_container_->AddChildView(web_view); | 221 instant_container_->AddChildView(web_view); |
222 } | 222 } |
223 | 223 |
224 instant_container_->AddChildView(search_box_spacer_view_); | 224 instant_container_->AddChildView(search_box_spacer_view_); |
225 } | 225 } |
226 | 226 |
227 void StartPageView::MaybeOpenCustomLauncherPage() { | 227 void StartPageView::MaybeOpenCustomLauncherPage() { |
228 // Switch to the custom page. | 228 // Switch to the custom page. |
229 ContentsView* contents_view = app_list_main_view_->contents_view(); | 229 ContentsView* contents_view = app_list_main_view_->contents_view(); |
230 if (!contents_view->ShouldShowCustomPageClickzone()) | 230 if (!app_list_main_view_->ShouldShowCustomLauncherPage()) |
231 return; | 231 return; |
232 | 232 |
233 int custom_page_index = contents_view->GetPageIndexForState( | 233 int custom_page_index = contents_view->GetPageIndexForState( |
234 AppListModel::STATE_CUSTOM_LAUNCHER_PAGE); | 234 AppListModel::STATE_CUSTOM_LAUNCHER_PAGE); |
235 contents_view->SetActivePage(custom_page_index); | 235 contents_view->SetActivePage(custom_page_index); |
236 } | 236 } |
237 | 237 |
238 void StartPageView::Reset() { | 238 void StartPageView::Reset() { |
239 tiles_container_->Update(); | 239 tiles_container_->Update(); |
240 } | 240 } |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 | 348 |
349 gfx::Rect StartPageView::GetSearchBoxBounds() const { | 349 gfx::Rect StartPageView::GetSearchBoxBounds() const { |
350 return search_box_spacer_view_->bounds(); | 350 return search_box_spacer_view_->bounds(); |
351 } | 351 } |
352 | 352 |
353 TileItemView* StartPageView::GetTileItemView(size_t index) { | 353 TileItemView* StartPageView::GetTileItemView(size_t index) { |
354 return tiles_container_->GetTileItemView(index); | 354 return tiles_container_->GetTileItemView(index); |
355 } | 355 } |
356 | 356 |
357 } // namespace app_list | 357 } // namespace app_list |
OLD | NEW |