diff options
author | mukai <mukai@chromium.org> | 2014-11-24 19:23:35 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-11-25 03:24:35 +0000 |
commit | d5e8fd97be07ca0b391c5f94293423503513b51a (patch) | |
tree | 6ec1c1219b0be246d23a9606f9a157270949dcb3 /ash/wm | |
parent | 5c5b7fbc336416a0d9923329df0f428cc72ec293 (diff) | |
download | chromium_src-d5e8fd97be07ca0b391c5f94293423503513b51a.zip chromium_src-d5e8fd97be07ca0b391c5f94293423503513b51a.tar.gz chromium_src-d5e8fd97be07ca0b391c5f94293423503513b51a.tar.bz2 |
Add AppListView::InitAsFramelessWindow() for fullscreen view.
This CL is for the fullscreen view mode of experimental applist
which will look similar to Athena's home card.
- Allow supporting to init as a non-bubble widget. Especially,
in that case it won't have BubbleFrameView().
- Create InitContents() for the views initialization and separate
it from bubble initialization.
- |overlay_view_| as a custom view class, to put the property
initialization into its ctor.
- Layout() needs to centralize the contents if it's wider.
BUG=434113
R=mgiuca@chromium.org, flackr@chromium.org
TEST=manually
Review URL: https://codereview.chromium.org/734833002
Cr-Commit-Position: refs/heads/master@{#305574}
Diffstat (limited to 'ash/wm')
-rw-r--r-- | ash/wm/app_list_controller.cc | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/ash/wm/app_list_controller.cc b/ash/wm/app_list_controller.cc index 3ac2139..0e068fa 100644 --- a/ash/wm/app_list_controller.cc +++ b/ash/wm/app_list_controller.cc @@ -12,6 +12,7 @@ #include "ash/shell.h" #include "ash/shell_delegate.h" #include "ash/shell_window_ids.h" +#include "ash/wm/maximize_mode/maximize_mode_controller.h" #include "base/command_line.h" #include "ui/app_list/app_list_constants.h" #include "ui/app_list/app_list_switches.h" @@ -197,7 +198,20 @@ void AppListController::Show(aura::Window* window) { views::View* applist_button = Shelf::ForWindow(container)->GetAppListButtonView(); is_centered_ = view->ShouldCenterWindow(); - if (is_centered_) { + bool is_fullscreen = false; +#if defined(OS_CHROMEOS) + is_fullscreen = base::CommandLine::ForCurrentProcess()->HasSwitch( + switches::kAshEnableFullscreenAppList) && + app_list::switches::IsExperimentalAppListEnabled() && + Shell::GetInstance() + ->maximize_mode_controller() + ->IsMaximizeModeWindowManagerEnabled(); +#endif + if (is_fullscreen) { + view->InitAsFramelessWindow( + container, current_apps_page_, + ScreenUtil::GetDisplayWorkAreaBoundsInParent(container)); + } else if (is_centered_) { // Note: We can't center the app list until we have its dimensions, so we // init at (0, 0) and then reset its anchor point. view->InitAsBubbleAtFixedLocation(container, |