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

Unified Diff: ui/views/mus/native_widget_mus.cc

Issue 2524873002: Rename WindowTreeHost G|SetBounds to indicate they are in pixels. (Closed)
Patch Set: 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/native_widget_mus.cc
diff --git a/ui/views/mus/native_widget_mus.cc b/ui/views/mus/native_widget_mus.cc
index f96f2a2c72be436167026e0693aae80fcd2b77ee..595f765053d7db6280bca20ed3edaab7e7423fb2 100644
--- a/ui/views/mus/native_widget_mus.cc
+++ b/ui/views/mus/native_widget_mus.cc
@@ -470,7 +470,7 @@ class NativeWidgetMus::MusWindowObserver : public ui::WindowObserver {
const gfx::Rect& old_bounds,
const gfx::Rect& new_bounds) override {
DCHECK_EQ(window, mus_window());
- window_tree_host()->SetBounds(new_bounds);
+ window_tree_host()->SetBoundsInPixel(new_bounds);
}
void OnWindowFocusChanged(ui::Window* gained_focus,
ui::Window* lost_focus) override {
@@ -1022,14 +1022,14 @@ void NativeWidgetMus::SetBounds(const gfx::Rect& bounds_in_screen) {
size.SetToMax(min_size);
window_->SetBounds(gfx::Rect(origin, size));
// Observer on |window_tree_host_| expected to synchronously update bounds.
- DCHECK(window_->bounds() == window_tree_host_->GetBounds());
+ DCHECK(window_->bounds() == window_tree_host_->GetBoundsInPixel());
}
void NativeWidgetMus::SetSize(const gfx::Size& size) {
if (!window_tree_host_)
return;
- gfx::Rect bounds = window_tree_host_->GetBounds();
+ gfx::Rect bounds = window_tree_host_->GetBoundsInPixel();
SetBounds(gfx::Rect(bounds.origin(), size));
}

Powered by Google App Engine
This is Rietveld 408576698