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

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

Issue 10911342: Add ScreenPositionClient::ConvertNativePointToScreen. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 | Annotate | Revision Log
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 13 matching lines...) Expand all
24 // An interface implemented by an object that changes coordinates on a 24 // An interface implemented by an object that changes coordinates on a
25 // RootWindow into system coordinates. 25 // RootWindow into system coordinates.
26 class AURA_EXPORT ScreenPositionClient { 26 class AURA_EXPORT ScreenPositionClient {
27 public: 27 public:
28 // Converts the |screen_point| from a given |window|'s coordinate space 28 // Converts the |screen_point| from a given |window|'s coordinate space
29 // into screen coordinate space. 29 // into screen coordinate space.
30 virtual void ConvertPointToScreen(const Window* window, 30 virtual void ConvertPointToScreen(const Window* window,
31 gfx::Point* point) = 0; 31 gfx::Point* point) = 0;
32 virtual void ConvertPointFromScreen(const Window* window, 32 virtual void ConvertPointFromScreen(const Window* window,
33 gfx::Point* point) = 0; 33 gfx::Point* point) = 0;
34 // Converts the |screen_point| from a given |window|'s native screen
35 // coordinate space into screen coordinate space.
36 // A typical example of using this function instead of ConvertPointToScreen is
37 // when X's native input is captured by a drag operation.
38 // See the comments in ash::wm::GetRootWindowRelativeToWindow for details.
oshima 2012/09/18 10:02:34 This description isn't exactly correct, i think.
mazda 2012/09/18 16:35:01 I'm thinking about letting this function handle on
39 virtual void ConvertNativePointToScreen(Window* window,
40 gfx::Point* point) = 0;
34 // Sets the bounds of the window. The implementation is responsible 41 // Sets the bounds of the window. The implementation is responsible
35 // for finding out and translating the right coordinates for the |window|. 42 // for finding out and translating the right coordinates for the |window|.
36 virtual void SetBounds(Window* window, 43 virtual void SetBounds(Window* window,
37 const gfx::Rect& bounds, 44 const gfx::Rect& bounds,
38 const gfx::Display& display) = 0; 45 const gfx::Display& display) = 0;
39 virtual ~ScreenPositionClient() {} 46 virtual ~ScreenPositionClient() {}
40 }; 47 };
41 48
42 // Sets/Gets the activation client on the Window. 49 // Sets/Gets the activation client on the Window.
43 AURA_EXPORT void SetScreenPositionClient(RootWindow* window, 50 AURA_EXPORT void SetScreenPositionClient(RootWindow* window,
44 ScreenPositionClient* client); 51 ScreenPositionClient* client);
45 AURA_EXPORT ScreenPositionClient* GetScreenPositionClient( 52 AURA_EXPORT ScreenPositionClient* GetScreenPositionClient(
46 const RootWindow* window); 53 const RootWindow* window);
47 54
48 } // namespace clients 55 } // namespace clients
49 } // namespace aura 56 } // namespace aura
50 57
51 #endif // UI_AURA_SCREEN_POSITION_CLIENT_H_ 58 #endif // UI_AURA_SCREEN_POSITION_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698