Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / ui / wm / core / coordinate_conversion.cc
blob1d97f04f028b77142df28ad6abda174162b042f9
1 // Copyright 2014 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.
5 #include "ui/wm/core/coordinate_conversion.h"
7 #include "ui/aura/client/screen_position_client.h"
8 #include "ui/gfx/geometry/point.h"
10 namespace wm {
12 void ConvertPointToScreen(const aura::Window* window, gfx::Point* point) {
13 DCHECK(window);
14 DCHECK(window->GetRootWindow());
15 DCHECK(aura::client::GetScreenPositionClient(window->GetRootWindow()));
16 aura::client::GetScreenPositionClient(window->GetRootWindow())->
17 ConvertPointToScreen(window, point);
20 void ConvertPointFromScreen(const aura::Window* window,
21 gfx::Point* point_in_screen) {
22 DCHECK(window);
23 DCHECK(window->GetRootWindow());
24 DCHECK(aura::client::GetScreenPositionClient(window->GetRootWindow()));
25 aura::client::GetScreenPositionClient(window->GetRootWindow())->
26 ConvertPointFromScreen(window, point_in_screen);
29 } // namespace wm