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

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

Issue 253983002: Use centered app list position whenever virtual keyboard is enabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Only change shape when keyboard enabled (not when it *might* be enabled). Created 6 years, 8 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
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 0ecf12ef455cef96eaf93c00989b059dad8fc0e4..5ec7e9cf16ddf657cfb338b29eab4de4c6d56911 100644
--- a/chrome/browser/ui/app_list/app_list_view_delegate.cc
+++ b/chrome/browser/ui/app_list/app_list_view_delegate.cc
@@ -34,6 +34,7 @@
#include "content/public/browser/page_navigator.h"
#include "content/public/browser/user_metrics.h"
#include "grit/theme_resources.h"
+#include "ui/app_list/app_list_switches.h"
#include "ui/app_list/app_list_view_delegate_observer.h"
#include "ui/app_list/search_box_model.h"
#include "ui/app_list/speech_ui_model.h"
@@ -42,6 +43,7 @@
#if defined(USE_AURA)
#include "ui/keyboard/keyboard_controller.h"
+#include "ui/keyboard/keyboard_util.h"
#endif
#if defined(USE_ASH)
@@ -417,6 +419,21 @@ AppListViewDelegate::GetUsers() const {
return users_;
}
+bool AppListViewDelegate::UseExperimentalAppListPosition() const {
+ if (app_list::switches::IsExperimentalAppListPositionEnabled())
+ return true;
+
+ // keyboard depends upon Aura.
+#if defined(USE_AURA)
+ // If the virtual keyboard is enabled, use the new app list position. The old
+ // position is too tall, and doesn't fit in the left-over screen space.
+ if (keyboard::IsKeyboardEnabled())
+ return true;
+#endif
+
+ return false;
+}
+
gfx::Rect AppListViewDelegate::GetVirtualKeyboardBounds() const {
// KeyboardController depends upon Aura.
#if defined(USE_AURA)

Powered by Google App Engine
This is Rietveld 408576698