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

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

Issue 2524873002: Rename WindowTreeHost G|SetBounds to indicate they are in pixels. (Closed)
Patch Set: 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
« no previous file with comments | « ui/views/mus/desktop_window_tree_host_mus.cc ('k') | ui/views/mus/native_widget_mus_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 996c3aa3cf2a2750702b562a2aaaa493c7321057..e2420ea2e9eb92c158117fdc8ce78ad1fecf092e 100644
--- a/ui/views/mus/native_widget_mus.cc
+++ b/ui/views/mus/native_widget_mus.cc
@@ -471,7 +471,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()->SetBoundsInPixels(new_bounds);
}
void OnWindowFocusChanged(ui::Window* gained_focus,
ui::Window* lost_focus) override {
@@ -1027,14 +1027,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_->GetBoundsInPixels());
}
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_->GetBoundsInPixels();
SetBounds(gfx::Rect(bounds.origin(), size));
}
« no previous file with comments | « ui/views/mus/desktop_window_tree_host_mus.cc ('k') | ui/views/mus/native_widget_mus_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698