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

Unified Diff: ui/aura/window_tree_host_platform.cc

Issue 2525113002: Rename WindowTreeHost functions to indicate pixels/dips. (Closed)
Patch Set: DIP + rebase 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
Index: ui/aura/window_tree_host_platform.cc
diff --git a/ui/aura/window_tree_host_platform.cc b/ui/aura/window_tree_host_platform.cc
index e9ecea9e09107c32dfead631de76b8a907a9332d..6f7390c2451f2ab5b12deefc80c5a23d002fdfda 100644
--- a/ui/aura/window_tree_host_platform.cc
+++ b/ui/aura/window_tree_host_platform.cc
@@ -98,7 +98,7 @@ void WindowTreeHostPlatform::SetBounds(const gfx::Rect& bounds) {
window_->SetBounds(bounds);
}
-gfx::Point WindowTreeHostPlatform::GetLocationOnNativeScreen() const {
+gfx::Point WindowTreeHostPlatform::GetLocationOnNativeScreenInPixels() const {
return window_->GetBounds().origin();
}
@@ -123,8 +123,9 @@ void WindowTreeHostPlatform::SetCursorNative(gfx::NativeCursor cursor) {
window_->SetCursor(cursor.platform());
}
-void WindowTreeHostPlatform::MoveCursorToNative(const gfx::Point& location) {
- window_->MoveCursorTo(location);
+void WindowTreeHostPlatform::MoveCursorToNativeInPixels(
+ const gfx::Point& location_in_pixels) {
+ window_->MoveCursorTo(location_in_pixels);
}
void WindowTreeHostPlatform::OnCursorVisibilityChangedNative(bool show) {
@@ -139,10 +140,10 @@ void WindowTreeHostPlatform::OnBoundsChanged(const gfx::Rect& new_bounds) {
gfx::Rect old_bounds = bounds_;
bounds_ = new_bounds;
if (bounds_.origin() != old_bounds.origin()) {
- OnHostMoved(bounds_.origin());
+ OnHostMovedInPixels(bounds_.origin());
}
if (bounds_.size() != old_bounds.size() || current_scale != new_scale) {
- OnHostResized(bounds_.size());
+ OnHostResizedInPixels(bounds_.size());
}
}

Powered by Google App Engine
This is Rietveld 408576698