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

Unified Diff: content/browser/browser_plugin/browser_plugin_guest.cc

Issue 1412923009: Route touch-events for WebViewGuest directly to guest renderer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: For WebView, check to make sure surface not already added. Created 5 years, 1 month 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/browser_plugin/browser_plugin_guest.cc
diff --git a/content/browser/browser_plugin/browser_plugin_guest.cc b/content/browser/browser_plugin/browser_plugin_guest.cc
index cef0842a37631d3a1d7493dcc42ed1bb59cca4a9..20046f741977aefbf86973cc5a8c55fd60c5359d 100644
--- a/content/browser/browser_plugin/browser_plugin_guest.cc
+++ b/content/browser/browser_plugin/browser_plugin_guest.cc
@@ -506,6 +506,16 @@ gfx::Point BrowserPluginGuest::GetScreenCoordinates(
return screen_pos;
}
+gfx::PointF BrowserPluginGuest::GetScreenCoordinates(
+ const gfx::PointF& relative_position) const {
+ if (!attached())
+ return relative_position;
+
+ gfx::PointF screen_pos(relative_position);
+ screen_pos += guest_window_rect_.OffsetFromOrigin();
+ return screen_pos;
+}
+
void BrowserPluginGuest::SendMessageToEmbedder(IPC::Message* msg) {
// During tests, attache() may be true when there is no owner_web_contents_;
// in this case just queue any messages we receive.

Powered by Google App Engine
This is Rietveld 408576698