| 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 97ea0475fc3176c9aa7a1d99d4152c5005b901cb..290514b324db47c4e33319ca48a0fce9a0faa31f 100644
|
| --- a/content/browser/browser_plugin/browser_plugin_guest.cc
|
| +++ b/content/browser/browser_plugin/browser_plugin_guest.cc
|
| @@ -485,6 +485,21 @@ void BrowserPluginGuest::ResendEventToEmbedder(
|
| }
|
| }
|
|
|
| +gfx::Point BrowserPluginGuest::GetCoordinatesInEmbedderWebContents(
|
| + const gfx::Point& relative_point) {
|
| + RenderWidgetHostView* owner_rwhv = GetOwnerRenderWidgetHostView();
|
| + if (!owner_rwhv)
|
| + return relative_point;
|
| +
|
| + gfx::Point point(relative_point);
|
| +
|
| + // Add the offset form the embedder web contents view.
|
| + point +=
|
| + owner_rwhv->TransformPointToRootCoordSpace(guest_window_rect_.origin())
|
| + .OffsetFromOrigin();
|
| + return point;
|
| +}
|
| +
|
| WebContentsImpl* BrowserPluginGuest::GetWebContents() const {
|
| return static_cast<WebContentsImpl*>(web_contents());
|
| }
|
|
|