OLD | NEW |
| (Empty) |
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 display { | |
13 class Display; | |
14 } | |
15 | |
16 namespace gfx { | |
17 class Point; | |
18 class Rect; | |
19 class Size; | |
20 } | |
21 | |
22 // Responsible for positioning an AppListView on Windows. | |
23 // TODO(tapted): Shouldn't be a class - move the static member functions out. | |
24 class AppListWin { | |
25 public: | |
26 // Finds the position for a window to anchor it to the taskbar. This chooses | |
27 // the most appropriate position for the window based on whether the taskbar | |
28 // exists, the position of the taskbar, and the mouse cursor. Returns the | |
29 // intended coordinates for the center of the window. If |taskbar_rect| is | |
30 // empty, assumes there is no taskbar on the given display. | |
31 static gfx::Point FindAnchorPoint(const gfx::Size& view_size, | |
32 const display::Display& display, | |
33 const gfx::Point& cursor, | |
34 const gfx::Rect& taskbar_rect, | |
35 bool center_window); | |
36 | |
37 static void MoveNearCursor(app_list::AppListView* view); | |
38 }; | |
39 | |
40 #endif // CHROME_BROWSER_UI_VIEWS_APP_LIST_WIN_APP_LIST_WIN_H_ | |
OLD | NEW |