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) |