Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Side by Side Diff: chrome/browser/ui/app_list/app_list_service_views.cc

Issue 947903002: Change ContentsView::SetActivePage to use States rather than indexes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more_rebase Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "chrome/browser/ui/app_list/app_list_service_views.h" 5 #include "chrome/browser/ui/app_list/app_list_service_views.h"
6 6
7 #include "chrome/browser/apps/scoped_keep_alive.h" 7 #include "chrome/browser/apps/scoped_keep_alive.h"
8 #include "chrome/browser/ui/app_list/app_list_controller_delegate.h" 8 #include "chrome/browser/ui/app_list/app_list_controller_delegate.h"
9 #include "ui/app_list/app_list_switches.h" 9 #include "ui/app_list/app_list_switches.h"
10 #include "ui/app_list/views/app_list_main_view.h" 10 #include "ui/app_list/views/app_list_main_view.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 app_list::AppListModel::State state) { 98 app_list::AppListModel::State state) {
99 DCHECK(profile); 99 DCHECK(profile);
100 100
101 ScopedKeepAlive keep_alive; 101 ScopedKeepAlive keep_alive;
102 102
103 CreateForProfile(profile); 103 CreateForProfile(profile);
104 104
105 if (state != app_list::AppListModel::INVALID_STATE) { 105 if (state != app_list::AppListModel::INVALID_STATE) {
106 app_list::ContentsView* contents_view = 106 app_list::ContentsView* contents_view =
107 shower_.app_list()->app_list_main_view()->contents_view(); 107 shower_.app_list()->app_list_main_view()->contents_view();
108 contents_view->SetActivePage(contents_view->GetPageIndexForState(state), 108 contents_view->SetActiveState(state,
109 shower_.IsAppListVisible() /* animate */); 109 shower_.IsAppListVisible() /* animate */);
110 } 110 }
111 111
112 shower_.ShowForCurrentProfile(); 112 shower_.ShowForCurrentProfile();
113 RecordAppListLaunch(); 113 RecordAppListLaunch();
114 } 114 }
OLDNEW
« no previous file with comments | « chrome/browser/apps/custom_launcher_page_browsertest_views.cc ('k') | chrome/browser/ui/ash/app_list/app_list_service_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698