Chromium Code Reviews| 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 a5ae61d33ae7a67f707c0b9a7d5516627a8df030..a463afc0593aecb3f20b15cb1913f3a374d78dab 100644 |
| --- a/ui/views/controls/native/native_view_host.cc |
| +++ b/ui/views/controls/native/native_view_host.cc |
| @@ -9,13 +9,17 @@ |
| #include "ui/views/controls/native/native_view_host_wrapper.h" |
| #include "ui/views/widget/widget.h" |
| +#if defined (OS_WIN) |
| +#include "ui/base/win/dpi.h" |
| +#endif |
| + |
| namespace views { |
| // static |
| const char NativeViewHost::kViewClassName[] = "NativeViewHost"; |
| #if defined(USE_AURA) |
| -// Views implmenetatxion draws the focus. |
| +// Views implementation draws the focus. |
| // TODO(oshima): Eliminate this flag and consolidate |
| // the focus border code. |
| const bool NativeViewHost::kRenderNativeControlFocus = false; |
| @@ -100,9 +104,16 @@ void NativeViewHost::Layout() { |
| // view. Also, they should be positioned respecting the border insets |
| // of the native view. |
| gfx::Rect local_bounds = ConvertRectToWidget(GetContentsBounds()); |
| +#if defined(OS_WIN) && !defined(USE_AURA) |
|
Ben Goodger (Google)
2013/06/11 16:10:43
this file doesn't really have platform stuff in it
girard
2013/06/11 19:12:13
Done. Thanks.
|
| + gfx::Rect mapped_bounds = ui::win::DIPToScreenRect(local_bounds); |
| + native_wrapper_->ShowWidget(mapped_bounds.x(), mapped_bounds.y(), |
| + mapped_bounds.width(), |
| + mapped_bounds.height()); |
| +#else |
| native_wrapper_->ShowWidget(local_bounds.x(), local_bounds.y(), |
| local_bounds.width(), |
| local_bounds.height()); |
| +#endif |
| } else { |
| native_wrapper_->HideWidget(); |
| } |