Home | History | Annotate | Download | only in win
      1 // Copyright 2013 The Chromium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 #ifndef CHROME_BROWSER_UI_VIEWS_APP_LIST_WIN_APP_LIST_WIN_H_
      6 #define CHROME_BROWSER_UI_VIEWS_APP_LIST_WIN_APP_LIST_WIN_H_
      7 
      8 namespace app_list {
      9 class AppListView;
     10 }
     11 
     12 namespace gfx {
     13 class Display;
     14 class Point;
     15 class Rect;
     16 class Size;
     17 }
     18 
     19 // Responsible for positioning an AppListView on Windows.
     20 // TODO(tapted): Shouldn't be a class - move the static member functions out.
     21 class AppListWin {
     22  public:
     23   // Finds the position for a window to anchor it to the taskbar. This chooses
     24   // the most appropriate position for the window based on whether the taskbar
     25   // exists, the position of the taskbar, and the mouse cursor. Returns the
     26   // intended coordinates for the center of the window. If |taskbar_rect| is
     27   // empty, assumes there is no taskbar on the given display.
     28   static gfx::Point FindAnchorPoint(const gfx::Size& view_size,
     29                                     const gfx::Display& display,
     30                                     const gfx::Point& cursor,
     31                                     const gfx::Rect& taskbar_rect,
     32                                     bool center_window);
     33 
     34   static void MoveNearCursor(app_list::AppListView* view);
     35 };
     36 
     37 #endif  // CHROME_BROWSER_UI_VIEWS_APP_LIST_WIN_APP_LIST_WIN_H_
     38