| 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 3bb449e91cd0539f44c54adc851bd5ae8fe94577..20f2970e66498cd0a1fee246ed567fe278f6a799 100644
|
| --- a/ui/views/mus/desktop_window_tree_host_mus.cc
|
| +++ b/ui/views/mus/desktop_window_tree_host_mus.cc
|
| @@ -51,7 +51,7 @@ void DesktopWindowTreeHostMus::Init(aura::Window* content_window,
|
| const Widget::InitParams& params) {
|
| // TODO: handle device scale, http://crbug.com/663524.
|
| if (!params.bounds.IsEmpty())
|
| - SetBounds(params.bounds);
|
| + SetBoundsInPixel(params.bounds);
|
| }
|
|
|
| void DesktopWindowTreeHostMus::OnNativeWidgetCreated(
|
| @@ -152,11 +152,11 @@ bool DesktopWindowTreeHostMus::IsVisible() const {
|
|
|
| void DesktopWindowTreeHostMus::SetSize(const gfx::Size& size) {
|
| // Use GetBounds() as the origin of window() is always at 0, 0.
|
| - gfx::Rect screen_bounds = GetBounds();
|
| + gfx::Rect screen_bounds = GetBoundsInPixel();
|
| // TODO: handle device scale, http://crbug.com/663524. Also, |screen_bounds|
|
| // is in pixels and should be dip.
|
| screen_bounds.set_size(size);
|
| - SetBounds(screen_bounds);
|
| + SetBoundsInPixel(screen_bounds);
|
| }
|
|
|
| void DesktopWindowTreeHostMus::StackAbove(aura::Window* window) {
|
| @@ -186,9 +186,9 @@ void DesktopWindowTreeHostMus::CenterWindow(const gfx::Size& size) {
|
| gfx::Rect resulting_bounds(bounds_to_center_in);
|
| resulting_bounds.ClampToCenteredSize(size);
|
|
|
| - // TODO: handle device scale, http://crbug.com/663524. SetBounds() expects
|
| - // pixels.
|
| - SetBounds(resulting_bounds);
|
| + // TODO: handle device scale, http://crbug.com/663524. SetBoundsInPixel()
|
| + // expects pixels.
|
| + SetBoundsInPixel(resulting_bounds);
|
| }
|
|
|
| void DesktopWindowTreeHostMus::GetWindowPlacement(
|
| @@ -201,7 +201,7 @@ void DesktopWindowTreeHostMus::GetWindowPlacement(
|
|
|
| gfx::Rect DesktopWindowTreeHostMus::GetWindowBoundsInScreen() const {
|
| // TODO: convert to dips, http://crbug.com/663524.
|
| - return GetBounds();
|
| + return GetBoundsInPixel();
|
| }
|
|
|
| gfx::Rect DesktopWindowTreeHostMus::GetClientAreaBoundsInScreen() const {
|
| @@ -430,10 +430,11 @@ void DesktopWindowTreeHostMus::HideImpl() {
|
| native_widget_delegate_->OnNativeWidgetVisibilityChanged(false);
|
| }
|
|
|
| -void DesktopWindowTreeHostMus::SetBounds(const gfx::Rect& bounds_in_pixels) {
|
| +void DesktopWindowTreeHostMus::SetBoundsInPixel(
|
| + const gfx::Rect& bounds_in_pixels) {
|
| // TODO: handle conversion to dips, http://crbug.com/663524.
|
| gfx::Rect final_bounds_in_pixels = bounds_in_pixels;
|
| - if (GetBounds().size() != bounds_in_pixels.size()) {
|
| + if (GetBoundsInPixel().size() != bounds_in_pixels.size()) {
|
| gfx::Size size = bounds_in_pixels.size();
|
| size.SetToMax(native_widget_delegate_->GetMinimumSize());
|
| const gfx::Size max_size = native_widget_delegate_->GetMaximumSize();
|
| @@ -441,7 +442,7 @@ void DesktopWindowTreeHostMus::SetBounds(const gfx::Rect& bounds_in_pixels) {
|
| size.SetToMin(max_size);
|
| final_bounds_in_pixels.set_size(size);
|
| }
|
| - WindowTreeHostMus::SetBounds(final_bounds_in_pixels);
|
| + WindowTreeHostMus::SetBoundsInPixel(final_bounds_in_pixels);
|
| }
|
|
|
| void DesktopWindowTreeHostMus::OnWindowInitialized(aura::Window* window) {}
|
|
|