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

Unified Diff: ui/views/mus/desktop_window_tree_host_mus.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/views/mus/desktop_window_tree_host_mus.cc
diff --git a/ui/views/mus/desktop_window_tree_host_mus.cc b/ui/views/mus/desktop_window_tree_host_mus.cc
index 2ce885e0183274ba062e73e119ffaa1435d235fa..42df64e1311354cfc2c2da7d57906ee5c53c9c05 100644
--- a/ui/views/mus/desktop_window_tree_host_mus.cc
+++ b/ui/views/mus/desktop_window_tree_host_mus.cc
@@ -171,15 +171,14 @@ float DesktopWindowTreeHostMus::GetScaleFactor() const {
.device_scale_factor();
}
-void DesktopWindowTreeHostMus::SetBoundsInDips(
- const gfx::Rect& bounds_in_dips) {
- SetBounds(gfx::ConvertRectToPixel(GetScaleFactor(), bounds_in_dips));
+void DesktopWindowTreeHostMus::SetBoundsInDIP(const gfx::Rect& bounds_in_dip) {
+ SetBounds(gfx::ConvertRectToPixel(GetScaleFactor(), bounds_in_dip));
}
void DesktopWindowTreeHostMus::Init(aura::Window* content_window,
const Widget::InitParams& params) {
if (!params.bounds.IsEmpty())
- SetBoundsInDips(params.bounds);
+ SetBoundsInDIP(params.bounds);
}
void DesktopWindowTreeHostMus::OnNativeWidgetCreated(
@@ -283,7 +282,7 @@ void DesktopWindowTreeHostMus::SetSize(const gfx::Size& size) {
gfx::Rect screen_bounds =
gfx::ConvertRectToDIP(GetScaleFactor(), GetBounds());
screen_bounds.set_size(size);
- SetBoundsInDips(screen_bounds);
+ SetBoundsInDIP(screen_bounds);
}
void DesktopWindowTreeHostMus::StackAbove(aura::Window* window) {
@@ -312,7 +311,7 @@ void DesktopWindowTreeHostMus::CenterWindow(const gfx::Size& size) {
gfx::Rect resulting_bounds(bounds_to_center_in);
resulting_bounds.ClampToCenteredSize(size);
- SetBoundsInDips(resulting_bounds);
+ SetBoundsInDIP(resulting_bounds);
}
void DesktopWindowTreeHostMus::GetWindowPlacement(

Powered by Google App Engine
This is Rietveld 408576698