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

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: Fix build 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..024e48fa30720e3dec7487dd905732f54191ef88 100644
--- a/content/browser/frame_host/render_widget_host_view_guest.cc
+++ b/content/browser/frame_host/render_widget_host_view_guest.cc
@@ -128,10 +128,8 @@ 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());
- return shifted_rect;
+ return gfx::Rect(
+ guest_->GetScreenCoordinates(embedder_bounds.origin()), size_);
}
void RenderWidgetHostViewGuest::RenderProcessGone(
@@ -297,8 +295,9 @@ 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]);
- guest_character_bounds.push_back(guest_rect);
+ guest_character_bounds.push_back(gfx::Rect(
+ guest_->GetScreenCoordinates(character_bounds[i].origin()),
+ character_bounds[i].size()));
}
// Forward the information to embedding RWHV.
rwhv->ImeCompositionRangeChanged(range, guest_character_bounds);
@@ -320,8 +319,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