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

Issue 2695093005: Remove RWHV::SetBounds() from the public API, and make comments clearer.

Created:
3 years, 10 months ago by miu
Modified:
3 years, 9 months ago
CC:
chromium-reviews, creis+watch_chromium.org, yusukes+watch_chromium.org, nona+watch_chromium.org, posciak+watch_chromium.org, chfremer+watch_chromium.org, nasko+codewatch_chromium.org, jam, jbauman+watch_chromium.org, feature-media-reviews_chromium.org, darin-cc_chromium.org, shuchen+watch_chromium.org, mcasas+watch+vc_chromium.org, piman+watch_chromium.org, kalyank, xjz+watch_chromium.org, James Su, danakj+watch_chromium.org, mac-reviews_chromium.org, miu+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove RWHV::SetBounds() from the public API, and make comments clearer. RenderWidgetHostView::SetBounds() is only being called from a single call point within libcontent (within RWHImpl). It's purpose is to position/size top-level windows for pop-up windows, in response to a page calling window.resizeTo() or window.moveTo(). Therefore, this change moves the base declaration of this method to RWHVBase. Furthermore, SetBounds() can be ambiguous since: 1) it doesn't necessarily set the size/position of the view, but maybe its top-level window instead; 2) the coordinate system is that of the screen and not the native view; 3) it's also acceptable for the platform implementation to ignore the request in some circumstances. Therefore, this change accounts for all this by renaming the method to RequestTopLevelBoundsInScreen(). To be clear, there are no functional or behavior changes being made by this change. BUG=73362, 693953 TEST=Explicit unit test coverage from RWHVAura unit tests and SitePerProcess browser tests; and implicit coverage via many others. CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation

Patch Set 1 #

Total comments: 4

Patch Set 2 : Resolve Android compile issue (missed one rename). #

Total comments: 4

Patch Set 3 : Platform-agnostic ResizeWebContents() impl. #

Patch Set 4 : Fix BUILD/link issue on mac (due to making web_contents_sizer.cc for all platforms). #

Patch Set 5 : Revert web_contents_sizer to its previous shenanigans (http://crbug.com/693953). #

Unified diffs Side-by-side diffs Delta from patch set Stats (+76 lines, -39 lines) Patch
M chrome/browser/ui/web_contents_sizer.h View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/ui/web_contents_sizer.cc View 1 2 3 4 2 chunks +10 lines, -3 lines 0 comments Download
M chrome/browser/ui/web_contents_sizer.mm View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M content/browser/frame_host/cross_process_frame_connector.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/frame_host/render_widget_host_view_child_frame.h View 2 chunks +1 line, -1 line 0 comments Download
M content/browser/frame_host/render_widget_host_view_child_frame.cc View 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/frame_host/render_widget_host_view_guest.h View 2 chunks +1 line, -1 line 0 comments Download
M content/browser/frame_host/render_widget_host_view_guest.cc View 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/media/capture/web_contents_video_capture_device_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_impl.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.h View 1 2 3 4 2 chunks +1 line, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.cc View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura.h View 2 chunks +1 line, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura.cc View 2 chunks +3 lines, -2 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura_unittest.cc View 9 chunks +11 lines, -11 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_base.h View 1 chunk +6 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_base.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.h View 2 chunks +1 line, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.mm View 1 2 3 4 1 chunk +7 lines, -4 lines 0 comments Download
M content/public/browser/render_widget_host_view.h View 2 chunks +13 lines, -6 lines 0 comments Download
M content/test/test_render_view_host.h View 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 38 (24 generated)
miu
kenrb: PTAL at content/browser/frame_host/*. Seems you last touched the relevant code here, for OOPIF that ...
3 years, 10 months ago (2017-02-15 23:24:17 UTC) #6
ncarter (slow)
This seems okay to me from a high level. https://codereview.chromium.org/2695093005/diff/1/content/public/browser/render_widget_host_view.h File content/public/browser/render_widget_host_view.h (right): https://codereview.chromium.org/2695093005/diff/1/content/public/browser/render_widget_host_view.h#newcode122 content/public/browser/render_widget_host_view.h:122: ...
3 years, 10 months ago (2017-02-15 23:35:02 UTC) #7
miu
https://codereview.chromium.org/2695093005/diff/1/content/public/browser/render_widget_host_view.h File content/public/browser/render_widget_host_view.h (right): https://codereview.chromium.org/2695093005/diff/1/content/public/browser/render_widget_host_view.h#newcode122 content/public/browser/render_widget_host_view.h:122: // discrepancy. On 2017/02/15 23:35:02, ncarter wrote: > How ...
3 years, 10 months ago (2017-02-16 00:07:07 UTC) #9
miu
+sky: PTAL at changes to chrome/browser/ui/web_contents_sizer.*
3 years, 10 months ago (2017-02-16 00:07:55 UTC) #11
sky
https://codereview.chromium.org/2695093005/diff/20001/chrome/browser/ui/web_contents_sizer.cc File chrome/browser/ui/web_contents_sizer.cc (right): https://codereview.chromium.org/2695093005/diff/20001/chrome/browser/ui/web_contents_sizer.cc#newcode19 chrome/browser/ui/web_contents_sizer.cc:19: // TODO(miu): This is a layering violation, since only ...
3 years, 10 months ago (2017-02-16 00:29:03 UTC) #13
miu
https://codereview.chromium.org/2695093005/diff/20001/chrome/browser/ui/web_contents_sizer.cc File chrome/browser/ui/web_contents_sizer.cc (right): https://codereview.chromium.org/2695093005/diff/20001/chrome/browser/ui/web_contents_sizer.cc#newcode19 chrome/browser/ui/web_contents_sizer.cc:19: // TODO(miu): This is a layering violation, since only ...
3 years, 10 months ago (2017-02-17 00:09:03 UTC) #16
sky
https://codereview.chromium.org/2695093005/diff/20001/chrome/browser/ui/web_contents_sizer.cc File chrome/browser/ui/web_contents_sizer.cc (right): https://codereview.chromium.org/2695093005/diff/20001/chrome/browser/ui/web_contents_sizer.cc#newcode19 chrome/browser/ui/web_contents_sizer.cc:19: // TODO(miu): This is a layering violation, since only ...
3 years, 10 months ago (2017-02-17 16:53:08 UTC) #17
Nico
https://codereview.chromium.org/2695093005/diff/1/content/public/browser/render_widget_host_view.h File content/public/browser/render_widget_host_view.h (right): https://codereview.chromium.org/2695093005/diff/1/content/public/browser/render_widget_host_view.h#newcode121 content/public/browser/render_widget_host_view.h:121: // rendering size, and NOT assume a device scale ...
3 years, 10 months ago (2017-02-17 22:05:11 UTC) #18
miu
https://codereview.chromium.org/2695093005/diff/1/content/public/browser/render_widget_host_view.h File content/public/browser/render_widget_host_view.h (right): https://codereview.chromium.org/2695093005/diff/1/content/public/browser/render_widget_host_view.h#newcode121 content/public/browser/render_widget_host_view.h:121: // rendering size, and NOT assume a device scale ...
3 years, 10 months ago (2017-02-17 23:50:59 UTC) #19
sky
LGTM
3 years, 10 months ago (2017-02-17 23:54:03 UTC) #20
miu
yusufo: PTAL at chrome/browser/ui/web_contents_sizer.*. I'm trying to get rid of this, as part of a ...
3 years, 10 months ago (2017-02-17 23:54:52 UTC) #22
miu
sky: Unfortunately, I had to revert the web_contents_resizer clean-up. tl;dr: Some things were calling ResizeWebContents() ...
3 years, 10 months ago (2017-02-18 23:08:13 UTC) #34
miu
Ping: Everybody except sky@, PTAL.
3 years, 9 months ago (2017-02-28 01:01:07 UTC) #37
kenrb
3 years, 9 months ago (2017-02-28 21:44:44 UTC) #38
lgtm

Powered by Google App Engine
This is Rietveld 408576698