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

Side by Side Diff: chrome/browser/ui/ash/app_list/test/app_list_service_ash_test_api.cc

Issue 1861013004: AppListController refactoring part 3: Switching over to use AppListShower in Ash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mus_chrome_delegates_ash_impl
Patch Set: Rebase. Created 4 years, 8 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "ash/test/app_list_controller_test_api.h" 5 #include "chrome/browser/ui/ash/app_list/test/app_list_service_ash_test_api.h"
6 6
7 #include "ash/test/shell_test_api.h" 7 #include "chrome/browser/ui/ash/app_list/app_list_service_ash.h"
8 #include "ash/wm/app_list_controller.h" 8 #include "ui/app_list/shower/test/app_list_shower_impl_test_api.h"
9 #include "ui/app_list/views/app_list_main_view.h" 9 #include "ui/app_list/views/app_list_main_view.h"
10 #include "ui/app_list/views/app_list_view.h" 10 #include "ui/app_list/views/app_list_view.h"
11 #include "ui/app_list/views/apps_container_view.h" 11 #include "ui/app_list/views/apps_container_view.h"
12 #include "ui/app_list/views/apps_grid_view.h" 12 #include "ui/app_list/views/apps_grid_view.h"
13 #include "ui/app_list/views/contents_view.h" 13 #include "ui/app_list/views/contents_view.h"
14 #include "ui/app_list/views/start_page_view.h" 14 #include "ui/app_list/views/start_page_view.h"
15 15
16 namespace ash { 16 AppListServiceAshTestApi::AppListServiceAshTestApi() {}
17 namespace test {
18 17
19 AppListControllerTestApi::AppListControllerTestApi(Shell* shell) 18 app_list::AppListShowerImpl* AppListServiceAshTestApi::GetAppListShower()
20 : app_list_controller_(ShellTestApi(shell).app_list_controller()) {} 19 const {
21 20 return AppListServiceAsh::GetInstance()->app_list_shower_.get();
22 app_list::AppsGridView* AppListControllerTestApi::GetRootGridView() const {
23 return view()->app_list_main_view()->contents_view()->
24 apps_container_view()->apps_grid_view();
25 } 21 }
26 22
27 app_list::StartPageView* AppListControllerTestApi::GetStartPageView() const { 23 app_list::AppListView* AppListServiceAshTestApi::GetAppListView() const {
28 return view()->app_list_main_view()->contents_view()->start_page_view(); 24 app_list::test::AppListShowerImplTestApi shower_test_api(GetAppListShower());
25 return shower_test_api.view();
29 } 26 }
30 27
31 app_list::AppListView* AppListControllerTestApi::view() const { 28 app_list::AppsGridView* AppListServiceAshTestApi::GetRootGridView() const {
32 return app_list_controller_->view_; 29 return GetAppListView()
30 ->app_list_main_view()
31 ->contents_view()
32 ->apps_container_view()
33 ->apps_grid_view();
33 } 34 }
34 35
35 void AppListControllerTestApi::LayoutContentsView() { 36 app_list::StartPageView* AppListServiceAshTestApi::GetStartPageView() const {
36 view()->app_list_main_view()->contents_view()->Layout(); 37 return GetAppListView()
38 ->app_list_main_view()
39 ->contents_view()
40 ->start_page_view();
37 } 41 }
38 42
39 } // namespace test 43 void AppListServiceAshTestApi::LayoutContentsView() {
40 } // namespace ash 44 GetAppListView()->app_list_main_view()->contents_view()->Layout();
45 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/app_list/test/app_list_service_ash_test_api.h ('k') | chrome/browser/ui/ash/chrome_shell_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698