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

Unified Diff: chrome/browser/ui/views/app_list/win/app_list_win.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/views/app_list/win/app_list_win.cc
diff --git a/chrome/browser/ui/views/app_list/win/app_list_win.cc b/chrome/browser/ui/views/app_list/win/app_list_win.cc
index c96ab6d5054f3e160ce820fd79dbb2dcac81ab98..7ebb230bee74885559016ab674a48fad4d4600f6 100644
--- a/chrome/browser/ui/views/app_list/win/app_list_win.cc
+++ b/chrome/browser/ui/views/app_list/win/app_list_win.cc
@@ -52,10 +52,12 @@ AppListWin::AppListWin(app_list::AppListView* view,
AppListWin::~AppListWin() {}
-gfx::Point AppListWin::FindAnchorPoint(const gfx::Size& view_size,
- const gfx::Display& display,
- const gfx::Point& cursor,
- const gfx::Rect& taskbar_rect) {
+gfx::Point AppListWin::FindAnchorPoint(
+ const gfx::Size& view_size,
+ const gfx::Display& display,
+ const gfx::Point& cursor,
+ const gfx::Rect& taskbar_rect,
+ bool use_experimental_app_list_position) {
AppListPositioner positioner(display, view_size, kMinDistanceFromEdge);
// Subtract the taskbar area since the display's default work_area will not
@@ -64,7 +66,7 @@ gfx::Point AppListWin::FindAnchorPoint(const gfx::Size& view_size,
positioner.WorkAreaSubtract(taskbar_rect);
// The experimental app list is placed in the center of the screen.
- if (app_list::switches::IsExperimentalAppListPositionEnabled())
+ if (use_experimental_app_list_position)
return positioner.GetAnchorPointForScreenCenter();
// Find which edge of the screen the taskbar is attached to.
@@ -108,8 +110,12 @@ void AppListWin::MoveNearCursor() {
view_->SetBubbleArrow(views::BubbleBorder::FLOAT);
gfx::Rect taskbar_rect;
GetTaskbarRect(&taskbar_rect);
- view_->SetAnchorPoint(FindAnchorPoint(view_->GetPreferredSize(), display,
- cursor, taskbar_rect));
+ view_->SetAnchorPoint(
+ FindAnchorPoint(view_->GetPreferredSize(),
+ display,
+ cursor,
+ taskbar_rect,
+ view_->UseExperimentalAppListPosition()));
}
bool AppListWin::IsVisible() {

Powered by Google App Engine
This is Rietveld 408576698