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

Unified Diff: content/browser/frame_host/render_widget_host_view_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
« no previous file with comments | « content/browser/browser_plugin/browser_plugin_guest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/render_widget_host_view_guest.cc
diff --git a/content/browser/frame_host/render_widget_host_view_guest.cc b/content/browser/frame_host/render_widget_host_view_guest.cc
index 925336a488946c8db87195e436ba9f7ea90ed7fa..c4e5a141849b1a69ebe7b6660f2eb5cb1ed4315a 100644
--- a/content/browser/frame_host/render_widget_host_view_guest.cc
+++ b/content/browser/frame_host/render_widget_host_view_guest.cc
@@ -128,9 +128,10 @@ gfx::Rect RenderWidgetHostViewGuest::GetViewBounds() const {
gfx::Rect embedder_bounds;
if (rwhv)
embedder_bounds = rwhv->GetViewBounds();
- gfx::Rect shifted_rect = guest_->ToGuestRect(embedder_bounds);
- shifted_rect.set_width(size_.width());
- shifted_rect.set_height(size_.height());
+ gfx::Rect shifted_rect;
lazyboy 2014/09/08 19:00:57 Would be easier to read by constructing the Rect d
Fady Samuel 2014/09/08 19:17:05 Done.
+ shifted_rect.set_origin(
+ guest_->GetScreenCoordinates(embedder_bounds.origin()));
+ shifted_rect.set_size(size_);
return shifted_rect;
}
@@ -297,7 +298,10 @@ void RenderWidgetHostViewGuest::ImeCompositionRangeChanged(
return;
std::vector<gfx::Rect> guest_character_bounds;
for (size_t i = 0; i < character_bounds.size(); ++i) {
- gfx::Rect guest_rect = guest_->ToGuestRect(character_bounds[i]);
+ gfx::Rect guest_rect;
+ guest_rect.set_origin(guest_->GetScreenCoordinates(
+ character_bounds[i].origin()));
+ guest_rect.set_size(character_bounds[i].size());
guest_character_bounds.push_back(guest_rect);
}
// Forward the information to embedding RWHV.
@@ -320,8 +324,10 @@ void RenderWidgetHostViewGuest::SelectionBoundsChanged(
if (!rwhv)
return;
ViewHostMsg_SelectionBounds_Params guest_params(params);
- guest_params.anchor_rect = guest_->ToGuestRect(params.anchor_rect);
- guest_params.focus_rect = guest_->ToGuestRect(params.focus_rect);
+ guest_params.anchor_rect.set_origin(
+ guest_->GetScreenCoordinates(params.anchor_rect.origin()));
+ guest_params.focus_rect.set_origin(
+ guest_->GetScreenCoordinates(params.focus_rect.origin()));
rwhv->SelectionBoundsChanged(guest_params);
}
« no previous file with comments | « content/browser/browser_plugin/browser_plugin_guest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698