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

Unified Diff: ash/wm/app_list_controller.cc

Issue 168733003: Center the experimental app list [ChromeOS] (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/app_list_controller.cc
diff --git a/ash/wm/app_list_controller.cc b/ash/wm/app_list_controller.cc
index 560f0044fafb7c5f7c9f4746ab4d9bab41af2c68..94363f8114d2320c8447360e595a4acda8f5e9a5 100644
--- a/ash/wm/app_list_controller.cc
+++ b/ash/wm/app_list_controller.cc
@@ -14,6 +14,7 @@
#include "ash/shell_window_ids.h"
#include "base/command_line.h"
#include "ui/app_list/app_list_constants.h"
+#include "ui/app_list/app_list_switches.h"
#include "ui/app_list/pagination_model.h"
#include "ui/app_list/views/app_list_view.h"
#include "ui/aura/client/focus_client.h"
@@ -166,7 +167,16 @@ void AppListController::SetVisible(bool visible, aura::Window* window) {
aura::Window* root_window = window->GetRootWindow();
aura::Window* container = GetRootWindowController(root_window)->
GetContainer(kShellWindowId_AppListContainer);
- if (ash::switches::UseAlternateShelfLayout()) {
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ app_list::switches::kEnableExperimentalAppList)) {
+ // The experimental app list is centered over the primary display.
+ view->InitAsBubbleAtFixedLocation(
+ NULL,
+ pagination_model_.get(),
+ Shell::GetScreen()->GetPrimaryDisplay().bounds().CenterPoint(),
+ views::BubbleBorder::FLOAT,
+ true /* border_accepts_events */);
+ } else if (ash::switches::UseAlternateShelfLayout()) {
gfx::Rect applist_button_bounds = Shelf::ForWindow(container)->
GetAppListButtonView()->GetBoundsInScreen();
// We need the location of the button within the local screen.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698