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

Unified Diff: ash/app_list/app_list_presenter_delegate.cc

Issue 2802903003: Implementation of a full screen app list and re-alphabetized switches (Closed)
Patch Set: Cleaned up some old variables and spacing changes Created 3 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 side-by-side diff with in-line comments
Download patch
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 a425ee51dcb9dfe1bb61a36b7d4d95702a2ceb63..c28762e258a60ca16f95194c000818de7ae03c40 100644
--- a/ash/app_list/app_list_presenter_delegate.cc
+++ b/ash/app_list/app_list_presenter_delegate.cc
@@ -99,10 +99,18 @@ void AppListPresenterDelegate::Init(app_list::AppListView* view,
aura::Window* root_window = wm_root_window->aura_window();
aura::Window* container = GetRootWindowController(root_window)
->GetContainer(kShellWindowId_AppListContainer);
- view->InitAsBubble(container, current_apps_page);
- // The app list is centered over the display.
- view->SetAnchorPoint(GetCenterOfDisplayForWindow(
- wm_root_window, GetMinimumBoundsHeightForAppList(view)));
+ // fullscreen
+ if (CheckFullscreenAppListEnabled()) {
sky 2017/04/07 03:28:18 IsFullscreenAppListEnabled()? Or perhaps ShouldCre
newcomer 2017/04/10 16:34:53 Done.
+ view->InitAsFramelessWindow(
+ container, current_apps_page,
+ ScreenUtil::GetDisplayWorkAreaBoundsInParent(container));
+ } else {
+ view->InitAsBubble(container, current_apps_page);
+ // The app list is centered over the display.
+ view->SetAnchorPoint(GetCenterOfDisplayForWindow(
+ wm_root_window, GetMinimumBoundsHeightForAppList(view)));
+ }
+
keyboard::KeyboardController* keyboard_controller =
keyboard::KeyboardController::GetInstance();
@@ -177,6 +185,11 @@ gfx::Vector2d AppListPresenterDelegate::GetVisibilityAnimationOffset(
////////////////////////////////////////////////////////////////////////////////
// AppListPresenterDelegate, private:
+bool AppListPresenterDelegate::CheckFullscreenAppListEnabled() {
+ return base::CommandLine::ForCurrentProcess()->HasSwitch(
sky 2017/04/07 03:28:18 This doesn't use any state from AppListPresenterDe
newcomer 2017/04/10 16:34:53 Done.
+ switches::kAshEnableFullscreenAppList);
+}
+
void AppListPresenterDelegate::ProcessLocatedEvent(ui::LocatedEvent* event) {
if (!view_ || !is_visible_)
return;

Powered by Google App Engine
This is Rietveld 408576698