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. |