| Index: ui/views/controls/native/native_view_host.cc
|
| diff --git a/ui/views/controls/native/native_view_host.cc b/ui/views/controls/native/native_view_host.cc
|
| index 736ff6125b9ea17d82599d8e2308de1d201c351e..3b5b18b1cc940c053666557e689d5f7fe1467bc8 100644
|
| --- a/ui/views/controls/native/native_view_host.cc
|
| +++ b/ui/views/controls/native/native_view_host.cc
|
| @@ -5,6 +5,7 @@
|
| #include "ui/views/controls/native/native_view_host.h"
|
|
|
| #include "base/logging.h"
|
| +#include "ui/base/win/dpi.h"
|
| #include "ui/gfx/canvas.h"
|
| #include "ui/views/controls/native/native_view_host_wrapper.h"
|
| #include "ui/views/widget/widget.h"
|
| @@ -99,7 +100,15 @@ void NativeViewHost::Layout() {
|
| // positioned in the coordinate system of the Widget, not the current
|
| // view. Also, they should be positioned respecting the border insets
|
| // of the native view.
|
| - gfx::Rect local_bounds = ConvertRectToWidget(GetContentsBounds());
|
| + gfx::Rect contents_bounds = GetContentsBounds();
|
| +#if defined(ENABLE_HIDPI)
|
| + // TODO: This code probably needs to be copied into the fast_resize handler, above.
|
| + static float dpi_scale = ui::GetDPIScale();
|
| + contents_bounds.SetRect(dpi_scale * contents_bounds.x(),
|
| + dpi_scale * contents_bounds.y(), dpi_scale * contents_bounds.width(),
|
| + dpi_scale * contents_bounds.height());
|
| +#endif
|
| + gfx::Rect local_bounds = ConvertRectToWidget(contents_bounds);
|
| native_wrapper_->ShowWidget(local_bounds.x(), local_bounds.y(),
|
| local_bounds.width(),
|
| local_bounds.height());
|
|
|