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

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: Fixed ExampleAppListViewDelegate (caused tree to close). 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
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 e9c2a506db15c089ce73fac5ff2b413ec42bd218..4627efcc9648850013a6a5d499c8c4c6363f393a 100644
--- a/chrome/browser/ui/app_list/app_list_view_delegate.cc
+++ b/chrome/browser/ui/app_list/app_list_view_delegate.cc
@@ -34,11 +34,16 @@
#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"
#include "ui/base/resource/resource_bundle.h"
+#if defined(USE_AURA)
+#include "ui/keyboard/keyboard_util.h"
+#endif
+
#if defined(USE_ASH)
#include "chrome/browser/ui/ash/app_list/app_sync_ui_state_watcher.h"
#endif
@@ -412,6 +417,21 @@ AppListViewDelegate::GetUsers() const {
return users_;
}
+bool AppListViewDelegate::ShouldCenterWindow() const {
+ if (app_list::switches::IsCenteredAppListEnabled())
+ 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;
+}
+
void AppListViewDelegate::AddObserver(
app_list::AppListViewDelegateObserver* observer) {
observers_.AddObserver(observer);
« no previous file with comments | « chrome/browser/ui/app_list/app_list_view_delegate.h ('k') | chrome/browser/ui/views/app_list/linux/app_list_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698