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

Unified Diff: content/public/browser/render_widget_host_view.h

Issue 2695093005: Remove RWHV::SetBounds() from the public API, and make comments clearer.
Patch Set: Revert web_contents_sizer to its previous shenanigans (http://crbug.com/693953). Created 3 years, 10 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/renderer_host/render_widget_host_view_mac.mm ('k') | content/test/test_render_view_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/render_widget_host_view.h
diff --git a/content/public/browser/render_widget_host_view.h b/content/public/browser/render_widget_host_view.h
index 71c693bf7c3c09c90b6df776d1afe9dff015fbf2..777aea106956b50e013a91b0d68b45ed2d5a3505 100644
--- a/content/public/browser/render_widget_host_view.h
+++ b/content/public/browser/render_widget_host_view.h
@@ -54,13 +54,12 @@ class CONTENT_EXPORT RenderWidgetHostView {
// Returns the associated RenderWidgetHost.
virtual RenderWidgetHost* GetRenderWidgetHost() const = 0;
- // Tells the View to size itself to the specified size.
+ // Tells the View to size itself, or its top-level window (impl-dependent), to
+ // the specified size in screen coordinates. Note that this will not take
+ // effect permanently if this View's native view is being managed by the auto-
+ // layout heuristics of the native UI toolkit.
virtual void SetSize(const gfx::Size& size) = 0;
- // Tells the View to size and move itself to the specified size and point in
- // screen space.
- virtual void SetBounds(const gfx::Rect& rect) = 0;
-
// Retrieves the last known scroll position.
virtual gfx::Vector2dF GetLastScrollOffset() const = 0;
@@ -115,7 +114,15 @@ class CONTENT_EXPORT RenderWidgetHostView {
virtual void WasUnOccluded() = 0;
virtual void WasOccluded() = 0;
- // Retrieve the bounds of the View, in screen coordinates.
+ // Retrieves the bounds of the View, in screen coordinates. Note that this
+ // reflects the region the view occupies on-screen, accounting for any scaling
+ // performed on the native view by the platform or UI toolkit. Callers should
+ // NOT assume the size of this region is equal to to the View's actual
+ // rendering size, and NOT assume a device scale factor will resolve this
+ // discrepancy.
+ //
+ // TODO(miu): Provide a GetRenderingSize() method for use cases that need the
+ // actual DIP rendering size. http://crbug.com/73362
virtual gfx::Rect GetViewBounds() const = 0;
// Returns true if the View's context menu is showing.
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_mac.mm ('k') | content/test/test_render_view_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698