| Index: ui/wm/core/coordinate_conversion.cc
|
| diff --git a/ui/wm/core/coordinate_conversion.cc b/ui/wm/core/coordinate_conversion.cc
|
| index 1d97f04f028b77142df28ad6abda174162b042f9..17104b357eb33f33a371d6adef6b8bbaf2685731 100644
|
| --- a/ui/wm/core/coordinate_conversion.cc
|
| +++ b/ui/wm/core/coordinate_conversion.cc
|
| @@ -6,6 +6,10 @@
|
|
|
| #include "ui/aura/client/screen_position_client.h"
|
| #include "ui/gfx/geometry/point.h"
|
| +#include "ui/gfx/geometry/rect.h"
|
| +#include "ui/gfx/geometry/rect_conversions.h"
|
| +#include "ui/gfx/geometry/rect_f.h"
|
| +#include "ui/gfx/transform.h"
|
|
|
| namespace wm {
|
|
|
| @@ -26,4 +30,17 @@ void ConvertPointFromScreen(const aura::Window* window,
|
| ConvertPointFromScreen(window, point_in_screen);
|
| }
|
|
|
| +void ConvertRectToScreen(const aura::Window* window, gfx::Rect* rect) {
|
| + gfx::Point origin = rect->origin();
|
| + ConvertPointToScreen(window, &origin);
|
| + rect->set_origin(origin);
|
| +}
|
| +
|
| +void ConvertRectFromScreen(const aura::Window* window,
|
| + gfx::Rect* rect_in_screen) {
|
| + gfx::Point origin = rect_in_screen->origin();
|
| + ConvertPointFromScreen(window, &origin);
|
| + rect_in_screen->set_origin(origin);
|
| +}
|
| +
|
| } // namespace wm
|
|
|