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

Unified Diff: chrome/browser/ui/ash/app_list/app_list_service_ash.cc

Issue 1137503005: Add launcherPage.hide() API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix mobile Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/ash/app_list/app_list_service_ash.cc
diff --git a/chrome/browser/ui/ash/app_list/app_list_service_ash.cc b/chrome/browser/ui/ash/app_list/app_list_service_ash.cc
index 2fb7881d2c80780814361d2480ad21450dda1787..d46fe3e476a5c16c798c3432752aee702d6e1450 100644
--- a/chrome/browser/ui/ash/app_list/app_list_service_ash.cc
+++ b/chrome/browser/ui/ash/app_list/app_list_service_ash.cc
@@ -91,6 +91,20 @@ void AppListServiceAsh::ShowForCustomLauncherPage(Profile* /*profile*/) {
ShowAndSwitchToState(app_list::AppListModel::STATE_CUSTOM_LAUNCHER_PAGE);
}
+void AppListServiceAsh::HideCustomLauncherPage() {
+ app_list::AppListView* app_list_view =
+ ash::Shell::GetInstance()->GetAppListView();
+ if (!app_list_view)
+ return;
+
+ app_list::ContentsView* contents_view =
+ app_list_view->app_list_main_view()->contents_view();
+ if (contents_view->IsStateActive(
+ app_list::AppListModel::STATE_CUSTOM_LAUNCHER_PAGE)) {
+ contents_view->SetActiveState(app_list::AppListModel::STATE_START, true);
+ }
+}
+
bool AppListServiceAsh::IsAppListVisible() const {
return ash::Shell::GetInstance()->GetAppListTargetVisibility();
}
« no previous file with comments | « chrome/browser/ui/ash/app_list/app_list_service_ash.h ('k') | chrome/common/extensions/api/launcher_page.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698