Index: ui/aura/window_tree_host.h |
diff --git a/ui/aura/window_tree_host.h b/ui/aura/window_tree_host.h |
index fcbcbd82516f3329f3faf4daaff6e320defb0fe0..c9ee88c1b88588fd33ff96333864eb38ab5a41a7 100644 |
--- a/ui/aura/window_tree_host.h |
+++ b/ui/aura/window_tree_host.h |
@@ -52,7 +52,7 @@ class AURA_EXPORT WindowTreeHost : public ui::internal::InputMethodDelegate, |
~WindowTreeHost() override; |
// Creates a new WindowTreeHost. The caller owns the returned value. |
- static WindowTreeHost* Create(const gfx::Rect& bounds); |
+ static WindowTreeHost* Create(const gfx::Rect& bounds_in_pixels); |
// Returns the WindowTreeHost for the specified accelerated widget, or NULL |
// if there is none associated. |
@@ -85,33 +85,34 @@ class AURA_EXPORT WindowTreeHost : public ui::internal::InputMethodDelegate, |
// Sets padding applied to the output surface. The output surface is sized to |
// to the size of the host plus output surface padding. |window()| is offset |
- // by |padding|, that is, |window|'s origin is set to padding.left(), |
- // padding.top(). |
+ // by |padding_in_pixels|, that is, |window|'s origin is set to |
+ // padding_in_pixels.left(), padding_in_pixels.top(). |
// This does not impact the bounds as returned from GetBounds(), only the |
// output surface size and location of window(). Additionally window() is |
// sized to the size set by bounds (more specifically the size passed to |
- // OnHostResized()), but the location of window() is set to that of |
- // |padding|. |
- void SetOutputSurfacePadding(const gfx::Insets& padding); |
+ // OnHostResizedInPixels()), but the location of window() is set to that of |
+ // |padding_in_pixels|. |
+ void SetOutputSurfacePaddingInPixels(const gfx::Insets& padding_in_pixels); |
- // Updates the root window's size using |host_size|, current |
+ // Updates the root window's size using |host_size_in_pixels|, current |
// transform and outsets. |
- virtual void UpdateRootWindowSize(const gfx::Size& host_size); |
+ virtual void UpdateRootWindowSizeInPixels( |
+ const gfx::Size& host_size_in_pixels); |
// Converts |point| from the root window's coordinate system to native |
// screen's. |
- void ConvertPointToNativeScreen(gfx::Point* point) const; |
+ void ConvertPointFromDIPToNativeScreen(gfx::Point* point) const; |
sky
2016/11/26 17:09:54
I find the use of screen and host in these functio
|
// Converts |point| from native screen coordinate system to the root window's. |
- void ConvertPointFromNativeScreen(gfx::Point* point) const; |
+ void ConvertPointFromNativeScreenToDIP(gfx::Point* point) const; |
// Converts |point| from the root window's coordinate system to the |
// host window's. |
- void ConvertPointToHost(gfx::Point* point) const; |
+ void ConvertPointFromDIPToHost(gfx::Point* point) const; |
// Converts |point| from the host window's coordinate system to the |
// root window's. |
- void ConvertPointFromHost(gfx::Point* point) const; |
+ void ConvertPointFromHostToDIP(gfx::Point* point) const; |
// Cursor. |
// Sets the currently-displayed cursor. If the cursor was previously hidden |
@@ -124,10 +125,11 @@ class AURA_EXPORT WindowTreeHost : public ui::internal::InputMethodDelegate, |
void OnCursorVisibilityChanged(bool visible); |
// Moves the cursor to the specified location relative to the root window. |
- void MoveCursorTo(const gfx::Point& location); |
+ void MoveCursorToLocationInDIP(const gfx::Point& location_in_dip); |
// Moves the cursor to the |host_location| given in host coordinates. |
- void MoveCursorToHostLocation(const gfx::Point& host_location); |
+ void MoveCursorToHostLocationInPixels( |
sky
2016/11/26 17:09:54
Similarly here remove host, just MoveCursorToLocat
|
+ const gfx::Point& host_location_in_pixels); |
gfx::NativeCursor last_cursor() const { return last_cursor_; } |
@@ -195,10 +197,10 @@ class AURA_EXPORT WindowTreeHost : public ui::internal::InputMethodDelegate, |
void OnAcceleratedWidgetAvailable(); |
// Returns the location of the RootWindow on native screen. |
- virtual gfx::Point GetLocationOnNativeScreen() const = 0; |
+ virtual gfx::Point GetLocationOnNativeScreenInPixels() const = 0; |
- void OnHostMoved(const gfx::Point& new_location); |
- void OnHostResized(const gfx::Size& new_size); |
+ void OnHostMovedInPixels(const gfx::Point& new_location_in_pixels); |
+ void OnHostResizedInPixels(const gfx::Size& new_size_in_pixels); |
void OnHostWorkspaceChanged(); |
void OnHostCloseRequested(); |
void OnHostActivated(); |
@@ -208,7 +210,8 @@ class AURA_EXPORT WindowTreeHost : public ui::internal::InputMethodDelegate, |
virtual void SetCursorNative(gfx::NativeCursor cursor) = 0; |
// Moves the cursor to the specified location relative to the root window. |
- virtual void MoveCursorToNative(const gfx::Point& location) = 0; |
+ virtual void MoveCursorToNativeInPixels( |
sky
2016/11/26 17:09:54
MoveCursorToScreenLocationInPixels?
|
+ const gfx::Point& location_in_pixels) = 0; |
// kCalled when the cursor visibility has changed. |
virtual void OnCursorVisibilityChangedNative(bool show) = 0; |
@@ -228,7 +231,7 @@ class AURA_EXPORT WindowTreeHost : public ui::internal::InputMethodDelegate, |
friend class test::WindowTreeHostTestApi; |
// Moves the cursor to the specified location. This method is internally used |
- // by MoveCursorTo() and MoveCursorToHostLocation(). |
+ // by MoveCursorToLocationInDIP() and MoveCursorToHostLocationInPixels(). |
void MoveCursorToInternal(const gfx::Point& root_location, |
const gfx::Point& host_location); |
@@ -258,7 +261,7 @@ class AURA_EXPORT WindowTreeHost : public ui::internal::InputMethodDelegate, |
// Whether the InputMethod instance is owned by this WindowTreeHost. |
bool owned_input_method_; |
- gfx::Insets output_surface_padding_; |
+ gfx::Insets output_surface_padding_in_pixels_; |
DISALLOW_COPY_AND_ASSIGN(WindowTreeHost); |
}; |