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

Unified Diff: ash/app_list/app_list_presenter_delegate.cc

Issue 2939693004: Added HALF, FULLSCREEN_ALL_APPS, and FULLSCREEN_SEARCH. (Closed)
Patch Set: rebased post revert. Created 3 years, 6 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
« no previous file with comments | « ash/app_list/app_list_presenter_delegate.h ('k') | ash/app_list/app_list_presenter_delegate_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/app_list/app_list_presenter_delegate.cc
diff --git a/ash/app_list/app_list_presenter_delegate.cc b/ash/app_list/app_list_presenter_delegate.cc
index fc81a0ab465a3c04fea5fb455ba19c0594ed625a..abf6622c9f18f7417b6903d012b63f1c6564f944 100644
--- a/ash/app_list/app_list_presenter_delegate.cc
+++ b/ash/app_list/app_list_presenter_delegate.cc
@@ -58,6 +58,20 @@ gfx::Point GetCenterOfDisplayForWindow(aura::Window* window,
return bounds.CenterPoint();
}
+// Whether the shelf is oriented on the side, not on the bottom.
+bool IsSideShelf(aura::Window* root_window) {
+ Shelf* shelf = Shelf::ForWindow(root_window);
+ switch (shelf->alignment()) {
+ case SHELF_ALIGNMENT_BOTTOM:
+ case SHELF_ALIGNMENT_BOTTOM_LOCKED:
+ return false;
+ case SHELF_ALIGNMENT_LEFT:
+ case SHELF_ALIGNMENT_RIGHT:
+ return true;
+ }
+ return false;
+}
+
} // namespace
////////////////////////////////////////////////////////////////////////////////
@@ -98,7 +112,11 @@ void AppListPresenterDelegate::Init(app_list::AppListView* view,
aura::Window* container = RootWindowController::ForWindow(root_window)
->GetContainer(kShellWindowId_AppListContainer);
- view->Initialize(container, current_apps_page);
+ view->Initialize(container, current_apps_page,
+ Shell::Get()
+ ->maximize_mode_controller()
+ ->IsMaximizeModeWindowManagerEnabled(),
+ IsSideShelf(root_window));
if (!app_list::features::IsFullscreenAppListEnabled()) {
view->MaybeSetAnchorPoint(GetCenterOfDisplayForWindow(
@@ -229,4 +247,18 @@ void AppListPresenterDelegate::OnOverviewModeStarting() {
presenter_->Dismiss();
}
+void AppListPresenterDelegate::OnMaximizeModeStarted() {
+ if (!app_list::features::IsFullscreenAppListEnabled())
+ return;
+
+ view_->OnMaximizeModeChanged(true);
+}
+
+void AppListPresenterDelegate::OnMaximizeModeEnded() {
+ if (!app_list::features::IsFullscreenAppListEnabled())
+ return;
+
+ view_->OnMaximizeModeChanged(false);
+}
+
} // namespace ash
« no previous file with comments | « ash/app_list/app_list_presenter_delegate.h ('k') | ash/app_list/app_list_presenter_delegate_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698