Chromium Code Reviews| Index: ui/wm/core/coordinate_conversion.cc |
| diff --git a/ui/wm/core/coordinate_conversion.cc b/ui/wm/core/coordinate_conversion.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..1ae8475c4c990c336ed967944da4054eee14202b |
| --- /dev/null |
| +++ b/ui/wm/core/coordinate_conversion.cc |
| @@ -0,0 +1,24 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "ui/wm/core/coordinate_conversion.h" |
| + |
| +#include "ui/aura/client/screen_position_client.h" |
| +#include "ui/gfx/point.h" |
| + |
| +namespace wm { |
| + |
| +void ConvertPointToScreen(const aura::Window* window, gfx::Point* point) { |
| + CHECK(aura::client::GetScreenPositionClient(window->GetRootWindow())); |
|
sky
2014/08/04 17:17:09
Why the CHECK here? I think you should DCHECK both
mfomitchev
2014/08/04 21:16:19
This was copied from the original implementation w
sky
2014/08/04 21:49:56
Please convert to DCHECKs.
mfomitchev
2014/08/05 15:09:41
Done.
|
| + aura::client::GetScreenPositionClient(window->GetRootWindow())-> |
| + ConvertPointToScreen(window, point); |
| +} |
| + |
| +void ConvertPointFromScreen(const aura::Window* window, |
| + gfx::Point* point_in_screen) { |
| + aura::client::GetScreenPositionClient(window->GetRootWindow())-> |
| + ConvertPointFromScreen(window, point_in_screen); |
| +} |
| + |
| +} // namespace wm |