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

Unified Diff: content/browser/renderer_host/legacy_render_widget_host_win.cc

Issue 339973002: Miscelleanous fixes for HiDPI issues in plugins. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed compile errors Created 6 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 | « content/browser/plugin_process_host.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/legacy_render_widget_host_win.cc
diff --git a/content/browser/renderer_host/legacy_render_widget_host_win.cc b/content/browser/renderer_host/legacy_render_widget_host_win.cc
index 84d95aced8ba6c667138154caec7a8c9a6e2a6e5..b893e0808157e9ff27450d881eea0ff950e65559 100644
--- a/content/browser/renderer_host/legacy_render_widget_host_win.cc
+++ b/content/browser/renderer_host/legacy_render_widget_host_win.cc
@@ -16,6 +16,7 @@
#include "ui/base/win/internal_constants.h"
#include "ui/base/win/window_event_target.h"
#include "ui/gfx/geometry/rect.h"
+#include "ui/gfx/win/dpi.h"
namespace content {
@@ -79,8 +80,9 @@ void LegacyRenderWidgetHostHWND::Hide() {
}
void LegacyRenderWidgetHostHWND::SetBounds(const gfx::Rect& bounds) {
- ::SetWindowPos(hwnd(), NULL, bounds.x(), bounds.y(), bounds.width(),
- bounds.height(), 0);
+ gfx::Rect bounds_in_pixel = gfx::win::DIPToScreenRect(bounds);
+ ::SetWindowPos(hwnd(), NULL, bounds_in_pixel.x(), bounds_in_pixel.y(),
+ bounds_in_pixel.width(), bounds_in_pixel.height(), 0);
}
void LegacyRenderWidgetHostHWND::OnFinalMessage(HWND hwnd) {
« no previous file with comments | « content/browser/plugin_process_host.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698