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

Unified Diff: chrome/browser/ui/app_list/app_list_view_delegate.cc

Issue 264523002: Use centered app list position whenever virtual keyboard is allowed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed crash on Windows (check for Ash instance before use). Created 6 years, 7 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 | « ash/wm/maximize_mode/maximize_mode_controller.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/app_list/app_list_view_delegate.cc
diff --git a/chrome/browser/ui/app_list/app_list_view_delegate.cc b/chrome/browser/ui/app_list/app_list_view_delegate.cc
index 4627efcc9648850013a6a5d499c8c4c6363f393a..e85b9827ab2d119c21d022e37a8dfe4b37db3af6 100644
--- a/chrome/browser/ui/app_list/app_list_view_delegate.cc
+++ b/chrome/browser/ui/app_list/app_list_view_delegate.cc
@@ -45,6 +45,8 @@
#endif
#if defined(USE_ASH)
+#include "ash/shell.h"
+#include "ash/wm/maximize_mode/maximize_mode_controller.h"
#include "chrome/browser/ui/ash/app_list/app_sync_ui_state_watcher.h"
#endif
@@ -429,6 +431,19 @@ bool AppListViewDelegate::ShouldCenterWindow() const {
return true;
#endif
+#if defined(USE_ASH)
+ // If it is at all possible to enter maximize mode in this configuration
+ // (which has a virtual keyboard), we should use the experimental position.
+ // This avoids having the app list change shape and position as the user
+ // enters and exits maximize mode.
+ if (ash::Shell::HasInstance() &&
+ ash::Shell::GetInstance()
+ ->maximize_mode_controller()
+ ->CanEnterMaximizeMode()) {
+ return true;
+ }
+#endif
+
return false;
}
« no previous file with comments | « ash/wm/maximize_mode/maximize_mode_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698