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

Unified Diff: chrome/browser/ui/views/app_list/linux/app_list_linux.cc

Issue 170183003: Center the experimental app list [Linux] (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: chrome/browser/ui/views/app_list/linux/app_list_linux.cc
diff --git a/chrome/browser/ui/views/app_list/linux/app_list_linux.cc b/chrome/browser/ui/views/app_list/linux/app_list_linux.cc
index 0883aa229f8d74c9d28fb02366bc6f1fd9d7b883..d4dd43b7a53c46fc8cedeefc491cf83b86307988 100644
--- a/chrome/browser/ui/views/app_list/linux/app_list_linux.cc
+++ b/chrome/browser/ui/views/app_list/linux/app_list_linux.cc
@@ -4,11 +4,13 @@
#include "chrome/browser/ui/views/app_list/linux/app_list_linux.h"
+#include "base/command_line.h"
#include "base/location.h"
#include "base/single_thread_task_runner.h"
#include "base/thread_task_runner_handle.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/app_list/app_list_positioner.h"
+#include "ui/app_list/app_list_switches.h"
#include "ui/app_list/views/app_list_view.h"
#include "ui/gfx/screen.h"
#include "ui/views/widget/widget.h"
@@ -32,6 +34,12 @@ gfx::Point AppListLinux::FindAnchorPoint(const gfx::Size& view_size,
AppListPositioner::ScreenEdge edge) {
AppListPositioner positioner(display, view_size, 0);
+ // The experimental app list is placed in the center of the screen.
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ app_list::switches::kEnableExperimentalAppList)) {
+ return positioner.GetAnchorPointForScreenCenter();
+ }
+
gfx::Point anchor;
// Snap to the shelf edge. If the cursor is greater than the window
// width/height away, anchor to the corner. Otherwise, anchor to the cursor
« 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