| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/contents_view.h" | 5 #include "ui/app_list/views/contents_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 if (it != view_to_state_.end()) | 203 if (it != view_to_state_.end()) |
| 204 state = it->second; | 204 state = it->second; |
| 205 | 205 |
| 206 app_list_pages_[GetActivePageIndex()]->OnWillBeShown(); | 206 app_list_pages_[GetActivePageIndex()]->OnWillBeShown(); |
| 207 | 207 |
| 208 app_list_main_view_->model()->SetState(state); | 208 app_list_main_view_->model()->SetState(state); |
| 209 | 209 |
| 210 DCHECK(start_page_view_); | 210 DCHECK(start_page_view_); |
| 211 | 211 |
| 212 // Set the visibility of the search box's back button. | 212 // Set the visibility of the search box's back button. |
| 213 app_list_main_view_->search_box_view()->back_button()->SetVisible( | 213 if (!features::IsFullscreenAppListEnabled()) { |
| 214 state != AppListModel::STATE_START); | 214 app_list_main_view_->search_box_view()->back_button()->SetVisible( |
| 215 app_list_main_view_->search_box_view()->Layout(); | 215 state != AppListModel::STATE_START); |
| 216 bool folder_active = (state == AppListModel::STATE_APPS) | 216 app_list_main_view_->search_box_view()->Layout(); |
| 217 ? apps_container_view_->IsInFolderView() | 217 bool folder_active = (state == AppListModel::STATE_APPS) |
| 218 : false; | 218 ? apps_container_view_->IsInFolderView() |
| 219 app_list_main_view_->search_box_view()->SetBackButtonLabel(folder_active); | 219 : false; |
| 220 app_list_main_view_->search_box_view()->SetBackButtonLabel(folder_active); |
| 221 } |
| 220 | 222 |
| 221 // Whenever the page changes, the custom launcher page is considered to have | 223 // Whenever the page changes, the custom launcher page is considered to have |
| 222 // been reset. | 224 // been reset. |
| 223 app_list_main_view_->model()->ClearCustomLauncherPageSubpages(); | 225 app_list_main_view_->model()->ClearCustomLauncherPageSubpages(); |
| 224 app_list_main_view_->search_box_view()->ResetTabFocus(false); | 226 app_list_main_view_->search_box_view()->ResetTabFocus(false); |
| 225 } | 227 } |
| 226 | 228 |
| 227 void ContentsView::ShowSearchResults(bool show) { | 229 void ContentsView::ShowSearchResults(bool show) { |
| 228 int search_page = GetPageIndexForState(AppListModel::STATE_SEARCH_RESULTS); | 230 int search_page = GetPageIndexForState(AppListModel::STATE_SEARCH_RESULTS); |
| 229 DCHECK_GE(search_page, 0); | 231 DCHECK_GE(search_page, 0); |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 483 } | 485 } |
| 484 | 486 |
| 485 void ContentsView::TransitionStarted() { | 487 void ContentsView::TransitionStarted() { |
| 486 } | 488 } |
| 487 | 489 |
| 488 void ContentsView::TransitionChanged() { | 490 void ContentsView::TransitionChanged() { |
| 489 UpdatePageBounds(); | 491 UpdatePageBounds(); |
| 490 } | 492 } |
| 491 | 493 |
| 492 } // namespace app_list | 494 } // namespace app_list |
| OLD | NEW |