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

Unified Diff: ui/aura/window_tree_host_x11.cc

Issue 2525113002: Rename WindowTreeHost functions to indicate pixels/dips. (Closed)
Patch Set: win Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/aura/window_tree_host_x11.h ('k') | ui/aura/window_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/window_tree_host_x11.cc
diff --git a/ui/aura/window_tree_host_x11.cc b/ui/aura/window_tree_host_x11.cc
index 7e96d2e8d384c4689ccf663612c7bc91e937df00..9f669ad74515344cae343925c491930f36060e28 100644
--- a/ui/aura/window_tree_host_x11.cc
+++ b/ui/aura/window_tree_host_x11.cc
@@ -312,9 +312,9 @@ uint32_t WindowTreeHostX11::DispatchEvent(const ui::PlatformEvent& event) {
bounds_ = bounds;
OnConfigureNotify();
if (size_changed)
- OnHostResized(bounds.size());
+ OnHostResizedInPixels(bounds.size());
if (origin_changed)
- OnHostMoved(bounds_.origin());
+ OnHostMovedInPixels(bounds_.origin());
break;
}
case GenericEvent:
@@ -433,15 +433,15 @@ void WindowTreeHostX11::SetBoundsInPixels(const gfx::Rect& bounds) {
// |bounds_| later.
bounds_ = bounds;
if (origin_changed)
- OnHostMoved(bounds.origin());
+ OnHostMovedInPixels(bounds.origin());
if (size_changed || current_scale != new_scale) {
- OnHostResized(bounds.size());
+ OnHostResizedInPixels(bounds.size());
} else {
window()->SchedulePaintInRect(window()->bounds());
}
}
-gfx::Point WindowTreeHostX11::GetLocationOnNativeScreen() const {
+gfx::Point WindowTreeHostX11::GetLocationOnScreenInPixels() const {
return bounds_.origin();
}
@@ -465,10 +465,11 @@ void WindowTreeHostX11::SetCursorNative(gfx::NativeCursor cursor) {
SetCursorInternal(cursor);
}
-void WindowTreeHostX11::MoveCursorToNative(const gfx::Point& location) {
+void WindowTreeHostX11::MoveCursorToScreenLocationInPixels(
+ const gfx::Point& location_in_pixels) {
XWarpPointer(xdisplay_, None, x_root_window_, 0, 0, 0, 0,
- bounds_.x() + location.x(),
- bounds_.y() + location.y());
+ bounds_.x() + location_in_pixels.x(),
+ bounds_.y() + location_in_pixels.y());
}
void WindowTreeHostX11::OnCursorVisibilityChangedNative(bool show) {
@@ -570,8 +571,8 @@ void WindowTreeHostX11::TranslateAndDispatchLocatedEvent(
}
// static
-WindowTreeHost* WindowTreeHost::Create(const gfx::Rect& bounds) {
- return new WindowTreeHostX11(bounds);
+WindowTreeHost* WindowTreeHost::Create(const gfx::Rect& bounds_in_pixels) {
+ return new WindowTreeHostX11(bounds_in_pixels);
}
namespace test {
« no previous file with comments | « ui/aura/window_tree_host_x11.h ('k') | ui/aura/window_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698