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

Unified Diff: content/browser/renderer_host/render_widget_host_view_base.h

Issue 2184033003: Refactor browser process coordinate transformation methods (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed problematic DCHECK Created 4 years, 5 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/renderer_host/render_widget_host_view_base.h
diff --git a/content/browser/renderer_host/render_widget_host_view_base.h b/content/browser/renderer_host/render_widget_host_view_base.h
index 0a1e01ebc6587bb1cb833e6101e5325d1b13fbf0..3021fcf82b714d5229eecfad28317d84a0ad4787 100644
--- a/content/browser/renderer_host/render_widget_host_view_base.h
+++ b/content/browser/renderer_host/render_widget_host_view_base.h
@@ -241,15 +241,23 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
// Transform a point that is in the coordinate space of a Surface that is
// embedded within the RenderWidgetHostViewBase's Surface to the
- // coordinate space of the embedding Surface. Typically this means that a
- // point was received from an out-of-process iframe's RenderWidget and needs
- // to be translated to viewport coordinates for the root RWHV, in which case
- // this method is called on the root RWHV with the out-of-process iframe's
- // SurfaceId.
- virtual void TransformPointToLocalCoordSpace(
+ // coordinate space of an embedding, or embedded, Surface. Typically this
+ // means that a point was received from an out-of-process iframe's
+ // RenderWidget and needs to be translated to viewport coordinates for the
+ // root RWHV, in which case this method is called on the root RWHV with the
+ // out-of-process iframe's SurfaceId.
+ // This does not transform points between surfaces where one does not
+ // contain the other. To transform between sibling surfaces, the point must
+ // be transformed to the root's coordinate space as an intermediate step.
+ virtual gfx::Point TransformPointToLocalCoordSpace(
const gfx::Point& point,
- const cc::SurfaceId& original_surface,
- gfx::Point* transformed_point);
+ const cc::SurfaceId& original_surface);
+
+ // Transform a point that is in the coordinate space for the current
+ // RenderWidgetHostView to the coordinate space of the target_view.
+ virtual gfx::Point TransformPointToCoordSpaceForView(
+ const gfx::Point& point,
+ RenderWidgetHostViewBase* target_view);
//----------------------------------------------------------------------------
// The following methods are related to IME.

Powered by Google App Engine
This is Rietveld 408576698