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