diff options
author | fsamuel <fsamuel@chromium.org> | 2014-09-08 23:17:47 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-09 06:21:43 +0000 |
commit | 940e498e0aed4f8881cf83b894754bbdd420f374 (patch) | |
tree | c1d1d81757fc6bff29688b0c4ab11f42eb08e743 /content/browser/browser_plugin/browser_plugin_guest.cc | |
parent | b077ed86906d877f4002118ba65e9d40c39a0a0d (diff) | |
download | chromium_src-940e498e0aed4f8881cf83b894754bbdd420f374.zip chromium_src-940e498e0aed4f8881cf83b894754bbdd420f374.tar.gz chromium_src-940e498e0aed4f8881cf83b894754bbdd420f374.tar.bz2 |
BrowserPlugin: Remove BrowserPluginGuest::ToGuestRect
BrowserPluginGuest::GetScreenCoordinates and BrowserPluginGuest::ToGuestRect
served very similar purposes, and having both around would probably just
increase the likelihood of bugs cropping up. This CL removes ToGuestRect.
BUG=none
Review URL: https://codereview.chromium.org/554773002
Cr-Commit-Position: refs/heads/master@{#293867}
Diffstat (limited to 'content/browser/browser_plugin/browser_plugin_guest.cc')
-rw-r--r-- | content/browser/browser_plugin/browser_plugin_guest.cc | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/content/browser/browser_plugin/browser_plugin_guest.cc b/content/browser/browser_plugin/browser_plugin_guest.cc index f970188..09db70f 100644 --- a/content/browser/browser_plugin/browser_plugin_guest.cc +++ b/content/browser/browser_plugin/browser_plugin_guest.cc @@ -289,18 +289,6 @@ BrowserPluginGuest::GetBrowserPluginGuestManager() const { return GetWebContents()->GetBrowserContext()->GetGuestManager(); } -// screen. -gfx::Rect BrowserPluginGuest::ToGuestRect(const gfx::Rect& bounds) { - gfx::Rect guest_rect(bounds); - guest_rect.Offset(guest_window_rect_.OffsetFromOrigin()); - if (embedder_web_contents()->GetBrowserPluginGuest()) { - BrowserPluginGuest* embedder_guest = - embedder_web_contents()->GetBrowserPluginGuest(); - guest_rect.Offset(embedder_guest->guest_window_rect_.OffsetFromOrigin()); - } - return guest_rect; -} - void BrowserPluginGuest::EmbedderVisibilityChanged(bool visible) { embedder_visible_ = visible; UpdateVisibility(); @@ -647,17 +635,6 @@ void BrowserPluginGuest::OnHandleInputEvent( int browser_plugin_instance_id, const gfx::Rect& guest_window_rect, const blink::WebInputEvent* event) { - guest_window_rect_ = guest_window_rect; - // If the embedder's RWHV is destroyed then that means that the embedder's - // window has been closed but the embedder's WebContents has not yet been - // destroyed. Computing screen coordinates of a BrowserPlugin only makes sense - // if there is a visible embedder. - if (embedder_web_contents_->GetRenderWidgetHostView()) { - guest_screen_rect_ = guest_window_rect; - guest_screen_rect_.Offset( - embedder_web_contents_->GetRenderWidgetHostView()-> - GetViewBounds().OffsetFromOrigin()); - } RenderViewHostImpl* guest_rvh = static_cast<RenderViewHostImpl*>( GetWebContents()->GetRenderViewHost()); |