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

Unified Diff: ui/views/controls/native/native_view_host.cc

Issue 16336027: Enable high dpi in win/views. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Cleanup Created 7 years, 6 months 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/gfx/canvas_paint_win.h ('k') | ui/views/widget/aero_tooltip_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
« no previous file with comments | « ui/gfx/canvas_paint_win.h ('k') | ui/views/widget/aero_tooltip_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698