Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(194)

Side by Side Diff: ui/aura/client/screen_position_client.h

Issue 2648583003: Handle floating point coordinates from ozone to exosphere (Closed)
Patch Set: added F variant to screen position client. fixed exo tests. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_AURA_SCREEN_POSITION_CLIENT_H_ 5 #ifndef UI_AURA_SCREEN_POSITION_CLIENT_H_
6 #define UI_AURA_SCREEN_POSITION_CLIENT_H_ 6 #define UI_AURA_SCREEN_POSITION_CLIENT_H_
7 7
8 #include "ui/aura/aura_export.h" 8 #include "ui/aura/aura_export.h"
9 #include "ui/aura/window.h" 9 #include "ui/aura/window.h"
10 10
(...skipping 11 matching lines...) Expand all
22 class AURA_EXPORT ScreenPositionClient { 22 class AURA_EXPORT ScreenPositionClient {
23 public: 23 public:
24 virtual ~ScreenPositionClient() {} 24 virtual ~ScreenPositionClient() {}
25 25
26 // Converts the |screen_point| from a given |window|'s coordinate space 26 // Converts the |screen_point| from a given |window|'s coordinate space
27 // into screen coordinate space. 27 // into screen coordinate space.
28 virtual void ConvertPointToScreen(const Window* window, 28 virtual void ConvertPointToScreen(const Window* window,
29 gfx::Point* point) = 0; 29 gfx::Point* point) = 0;
30 virtual void ConvertPointFromScreen(const Window* window, 30 virtual void ConvertPointFromScreen(const Window* window,
31 gfx::Point* point) = 0; 31 gfx::Point* point) = 0;
32 virtual void ConvertPointToScreenF(const Window* window,
oshima 2017/01/20 22:11:54 I have a slight preference for ConvertPointFToScre
33 gfx::PointF* point) = 0;
34 virtual void ConvertPointFromScreenF(const Window* window,
35 gfx::PointF* point) = 0;
32 // Converts the |screen_point| from root window host's coordinate of 36 // Converts the |screen_point| from root window host's coordinate of
33 // into screen coordinate space. 37 // into screen coordinate space.
34 // A typical example of using this function instead of ConvertPointToScreen is 38 // A typical example of using this function instead of ConvertPointToScreen is
35 // when X's native input is captured by a drag operation. 39 // when X's native input is captured by a drag operation.
36 // See the comments for ash::GetRootWindowRelativeToWindow for details. 40 // See the comments for ash::GetRootWindowRelativeToWindow for details.
37 virtual void ConvertHostPointToScreen(Window* root_window, 41 virtual void ConvertHostPointToScreen(Window* root_window,
38 gfx::Point* point) = 0; 42 gfx::Point* point) = 0;
39 // Sets the bounds of the window. The implementation is responsible 43 // Sets the bounds of the window. The implementation is responsible
40 // for finding out and translating the right coordinates for the |window|. 44 // for finding out and translating the right coordinates for the |window|.
41 virtual void SetBounds(Window* window, 45 virtual void SetBounds(Window* window,
42 const gfx::Rect& bounds, 46 const gfx::Rect& bounds,
43 const display::Display& display) = 0; 47 const display::Display& display) = 0;
44 }; 48 };
45 49
46 // Sets/Gets the activation client on the Window. 50 // Sets/Gets the activation client on the Window.
47 AURA_EXPORT void SetScreenPositionClient(Window* root_window, 51 AURA_EXPORT void SetScreenPositionClient(Window* root_window,
48 ScreenPositionClient* client); 52 ScreenPositionClient* client);
49 AURA_EXPORT ScreenPositionClient* GetScreenPositionClient( 53 AURA_EXPORT ScreenPositionClient* GetScreenPositionClient(
50 const Window* root_window); 54 const Window* root_window);
51 55
52 } // namespace clients 56 } // namespace clients
53 } // namespace aura 57 } // namespace aura
54 58
55 #endif // UI_AURA_SCREEN_POSITION_CLIENT_H_ 59 #endif // UI_AURA_SCREEN_POSITION_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698