| 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 const bool folder_active = state == AppListModel::STATE_APPS && |
| 214 apps_container_view_->IsInFolderView(); |
| 215 |
| 213 if (!features::IsFullscreenAppListEnabled()) { | 216 if (!features::IsFullscreenAppListEnabled()) { |
| 214 app_list_main_view_->search_box_view()->back_button()->SetVisible( | 217 app_list_main_view_->search_box_view()->back_button()->SetVisible( |
| 215 state != AppListModel::STATE_START); | 218 state != AppListModel::STATE_START); |
| 216 app_list_main_view_->search_box_view()->Layout(); | 219 app_list_main_view_->search_box_view()->Layout(); |
| 217 bool folder_active = (state == AppListModel::STATE_APPS) | |
| 218 ? apps_container_view_->IsInFolderView() | |
| 219 : false; | |
| 220 app_list_main_view_->search_box_view()->SetBackButtonLabel(folder_active); | 220 app_list_main_view_->search_box_view()->SetBackButtonLabel(folder_active); |
| 221 } | 221 } |
| 222 | 222 |
| 223 // 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 |
| 224 // been reset. | 224 // been reset. |
| 225 app_list_main_view_->model()->ClearCustomLauncherPageSubpages(); | 225 app_list_main_view_->model()->ClearCustomLauncherPageSubpages(); |
| 226 app_list_main_view_->search_box_view()->ResetTabFocus(false); | 226 app_list_main_view_->search_box_view()->ResetTabFocus(false); |
| 227 } | 227 } |
| 228 | 228 |
| 229 void ContentsView::ShowSearchResults(bool show) { | 229 void ContentsView::ShowSearchResults(bool show) { |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 485 } | 485 } |
| 486 | 486 |
| 487 void ContentsView::TransitionStarted() { | 487 void ContentsView::TransitionStarted() { |
| 488 } | 488 } |
| 489 | 489 |
| 490 void ContentsView::TransitionChanged() { | 490 void ContentsView::TransitionChanged() { |
| 491 UpdatePageBounds(); | 491 UpdatePageBounds(); |
| 492 } | 492 } |
| 493 | 493 |
| 494 } // namespace app_list | 494 } // namespace app_list |
| OLD | NEW |