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

Unified Diff: chrome/browser/ui/app_list/app_list_service_views.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/app_list/app_list_service_views.cc
diff --git a/chrome/browser/ui/app_list/app_list_service_views.cc b/chrome/browser/ui/app_list/app_list_service_views.cc
index 7f1cd4aca03e00e357a1430c91991e6793fd55f4..6f1a4b8833d3fc2ae8d30aabb09463bf6ce4ed6c 100644
--- a/chrome/browser/ui/app_list/app_list_service_views.cc
+++ b/chrome/browser/ui/app_list/app_list_service_views.cc
@@ -49,6 +49,19 @@ void AppListServiceViews::ShowForCustomLauncherPage(Profile* profile) {
app_list::AppListModel::STATE_CUSTOM_LAUNCHER_PAGE);
}
+void AppListServiceViews::HideCustomLauncherPage() {
+ if (!shower_.IsAppListVisible())
+ return;
+
+ app_list::ContentsView* contents_view =
+ shower_.app_list()->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);
+ }
+}
+
void AppListServiceViews::DismissAppList() {
if (!can_dismiss_)
return;
« no previous file with comments | « chrome/browser/ui/app_list/app_list_service_views.h ('k') | chrome/browser/ui/ash/app_list/app_list_service_ash.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698