| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef UI_WM_CORE_DEFAULT_SCREEN_POSITION_CLIENT_H_ | 5 #ifndef UI_WM_CORE_DEFAULT_SCREEN_POSITION_CLIENT_H_ |
| 6 #define UI_WM_CORE_DEFAULT_SCREEN_POSITION_CLIENT_H_ | 6 #define UI_WM_CORE_DEFAULT_SCREEN_POSITION_CLIENT_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "ui/aura/client/screen_position_client.h" | 9 #include "ui/aura/client/screen_position_client.h" |
| 10 #include "ui/wm/wm_export.h" | 10 #include "ui/wm/wm_export.h" |
| 11 | 11 |
| 12 namespace wm { | 12 namespace wm { |
| 13 | 13 |
| 14 // Client that always offsets by the toplevel RootWindow of the passed | 14 // Client that always offsets by the toplevel RootWindow of the passed |
| 15 // in child NativeWidgetAura. | 15 // in child NativeWidgetAura. |
| 16 class WM_EXPORT DefaultScreenPositionClient | 16 class WM_EXPORT DefaultScreenPositionClient |
| 17 : public aura::client::ScreenPositionClient { | 17 : public aura::client::ScreenPositionClient { |
| 18 public: | 18 public: |
| 19 DefaultScreenPositionClient(); | 19 DefaultScreenPositionClient(); |
| 20 ~DefaultScreenPositionClient() override; | 20 ~DefaultScreenPositionClient() override; |
| 21 | 21 |
| 22 // aura::client::ScreenPositionClient overrides: | 22 // aura::client::ScreenPositionClient overrides: |
| 23 void ConvertPointToScreen(const aura::Window* window, | 23 void ConvertPointToScreen(const aura::Window* window, |
| 24 gfx::Point* point) override; | 24 gfx::Point* point) override; |
| 25 void ConvertPointToScreenF(const aura::Window* window, |
| 26 gfx::PointF* point) override; |
| 25 void ConvertPointFromScreen(const aura::Window* window, | 27 void ConvertPointFromScreen(const aura::Window* window, |
| 26 gfx::Point* point) override; | 28 gfx::Point* point) override; |
| 29 void ConvertPointFromScreenF(const aura::Window* window, |
| 30 gfx::PointF* point) override; |
| 31 |
| 27 void ConvertHostPointToScreen(aura::Window* window, | 32 void ConvertHostPointToScreen(aura::Window* window, |
| 28 gfx::Point* point) override; | 33 gfx::Point* point) override; |
| 29 void SetBounds(aura::Window* window, | 34 void SetBounds(aura::Window* window, |
| 30 const gfx::Rect& bounds, | 35 const gfx::Rect& bounds, |
| 31 const display::Display& display) override; | 36 const display::Display& display) override; |
| 32 | 37 |
| 33 protected: | 38 protected: |
| 34 // Returns the origin of the host platform-window in system pixel coordinates. | 39 // Returns the origin of the host platform-window in system pixel coordinates. |
| 35 gfx::Point GetOriginInScreen(const aura::Window* root_window); | 40 gfx::Point GetOriginInScreen(const aura::Window* root_window); |
| 36 | 41 |
| 37 private: | 42 private: |
| 38 DISALLOW_COPY_AND_ASSIGN(DefaultScreenPositionClient); | 43 DISALLOW_COPY_AND_ASSIGN(DefaultScreenPositionClient); |
| 39 }; | 44 }; |
| 40 | 45 |
| 41 } // namespace wm | 46 } // namespace wm |
| 42 | 47 |
| 43 #endif // UI_WM_CORE_DEFAULT_SCREEN_POSITION_CLIENT_H_ | 48 #endif // UI_WM_CORE_DEFAULT_SCREEN_POSITION_CLIENT_H_ |
| OLD | NEW |