Chromium Code Reviews| 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; |