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

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

Issue 351683002: Adds link disambiguation popup support to Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: responding to cpu's feedback Created 6 years, 5 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
Index: content/browser/renderer_host/render_widget_host_impl.cc
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index 8ca48bc231fa6c421265c9822173a90db1ea9570..f641c41f2a443ed3061d4e22d0bc229a85e05b83 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -1637,13 +1637,17 @@ void RenderWidgetHostImpl::OnShowDisambiguationPopup(
SkBitmap zoomed_bitmap;
zoomed_bitmap.installPixels(info, bitmap->pixels(), info.minRowBytes());
-#if defined(OS_ANDROID)
+#if defined(OS_ANDROID) || defined(OS_WIN)
+ // Note that |rect| is in coordinates of pixels relative to the window origin.
+ // Aura-based systems will want to convert this to DIPs.
if (view_)
view_->ShowDisambiguationPopup(rect, zoomed_bitmap);
#else
NOTIMPLEMENTED();
#endif
+ // It is assumed that the disambiguation popup will make a copy of the
+ // provided zoomed image, so we delete this one.
zoomed_bitmap.setPixels(0);
Send(new ViewMsg_ReleaseDisambiguationPopupBitmap(GetRoutingID(), id));
}

Powered by Google App Engine
This is Rietveld 408576698