14e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)// Copyright 2013 The Chromium Authors. All rights reserved. 24e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be 34e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)// found in the LICENSE file. 44e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles) 54e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)#ifndef CHROME_BROWSER_UI_VIEWS_APP_LIST_WIN_APP_LIST_WIN_H_ 64e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)#define CHROME_BROWSER_UI_VIEWS_APP_LIST_WIN_APP_LIST_WIN_H_ 74e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles) 8010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)namespace app_list { 9010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)class AppListView; 10010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)} 114e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles) 12f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)namespace gfx { 13f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)class Display; 14f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)class Point; 15010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)class Rect; 16f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)class Size; 17010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)} 18f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) 19010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)// Responsible for positioning an AppListView on Windows. 20010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)// TODO(tapted): Shouldn't be a class - move the static member functions out. 21010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)class AppListWin { 224e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles) public: 23f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) // Finds the position for a window to anchor it to the taskbar. This chooses 24f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) // the most appropriate position for the window based on whether the taskbar 25f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) // exists, the position of the taskbar, and the mouse cursor. Returns the 26f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) // intended coordinates for the center of the window. If |taskbar_rect| is 27f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) // empty, assumes there is no taskbar on the given display. 28a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles) static gfx::Point FindAnchorPoint(const gfx::Size& view_size, 29f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) const gfx::Display& display, 30f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) const gfx::Point& cursor, 31010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles) const gfx::Rect& taskbar_rect, 32010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles) bool center_window); 334e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles) 34010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles) static void MoveNearCursor(app_list::AppListView* view); 354e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)}; 364e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles) 374e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)#endif // CHROME_BROWSER_UI_VIEWS_APP_LIST_WIN_APP_LIST_WIN_H_ 38