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

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

Issue 554773002: BrowserPlugin: Remove BrowserPluginGuest::ToGuestRect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed guest_screen_rect Created 6 years, 3 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/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 f9701883548ca89e46c3bf61a0dcde29f2b565a9..d3b2759564023b23b55e40f5b346b2dccbbaf0d5 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();
@@ -648,16 +636,6 @@ void BrowserPluginGuest::OnHandleInputEvent(
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());

Powered by Google App Engine
This is Rietveld 408576698