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

Issue 287093002: Remove ViewMsg_SetZoomLevel (Closed)

Created:
6 years, 7 months ago by wjmaclean
Modified:
6 years, 6 months ago
CC:
chromium-reviews
Visibility:
Public.

Description

Remove ViewMsg_SetZoomLevel In an effort to simplify zoom, this CL removes ViewMsg_SetZoomLevel and plumbs zoom on WebContentsImpl directly through to HostZoomMap. At present calls to WebContents::SetZoomLevel() invoke up to three cross-process IPCs, and introduce a synchronization requirement for any caller that needs to block until the results of the operation are visible via WebContents::GetZoomLevel(). This CL simplifies this down to one IPC and removal of the synchronization requirement. It adds a new IPC message to signal changes in a view's ability to be zoomed, and removes an ViewMsg_SetZoomLevel that was used only by SetZoomLevel(). BUG=none Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=273854

Patch Set 1 #

Total comments: 20

Patch Set 2 : [Upload for safe keeping only; do not review.] #

Patch Set 3 : Revisions as per suggestions. #

Patch Set 4 : Remove WebContentsImpl::Set/GetZoomLevel. #

Patch Set 5 : Update temporary zoom settings in OnDocumentAvailableInMainFrame #

Total comments: 6

Patch Set 6 : Re-order functions, add comments and DCHECK(). #

Total comments: 36

Patch Set 7 : Revised as per comments. #

Total comments: 4

Patch Set 8 : Revised as per comments. #

Total comments: 2

Patch Set 9 : Remove ViewHostMsg_DidCreateDocument. #

Patch Set 10 : Add std:: namespace to find() to fix Android compile. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+222 lines, -116 lines) Patch
M chrome/browser/chrome_page_zoom.cc View 1 2 3 4 chunks +5 lines, -4 lines 0 comments Download
M chrome/browser/guest_view/web_view/web_view_guest.cc View 1 2 3 4 5 6 7 3 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/ui/webui/ntp/ntp_login_handler.cc View 1 2 3 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/ui/zoom/zoom_controller.cc View 1 2 3 1 chunk +4 lines, -3 lines 0 comments Download
M content/browser/host_zoom_map_impl.h View 1 2 3 4 5 6 7 4 chunks +46 lines, -9 lines 0 comments Download
M content/browser/host_zoom_map_impl.cc View 1 2 3 4 5 6 7 8 9 6 chunks +116 lines, -4 lines 0 comments Download
M content/browser/renderer_host/render_view_host_impl.h View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M content/browser/renderer_host/render_view_host_impl.cc View 1 2 3 4 5 6 7 8 2 chunks +12 lines, -9 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.h View 1 2 3 4 5 6 7 4 chunks +1 line, -8 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 2 3 4 5 6 7 4 chunks +2 lines, -34 lines 0 comments Download
M content/common/view_messages.h View 1 2 3 4 5 6 7 8 3 chunks +8 lines, -15 lines 0 comments Download
M content/public/browser/host_zoom_map.h View 1 2 3 4 5 6 2 chunks +10 lines, -0 lines 0 comments Download
M content/public/browser/web_contents.h View 1 2 3 4 5 2 chunks +0 lines, -7 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 5 6 7 1 chunk +7 lines, -2 lines 0 comments Download
M content/renderer/render_thread_impl.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/render_view_impl.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -1 line 0 comments Download
M content/renderer/render_view_impl.cc View 1 2 3 4 5 6 7 8 4 chunks +2 lines, -15 lines 0 comments Download

Messages

Total messages: 35 (0 generated)
wjmaclean
Fady, can you take an initial look to see if this looks sane? It's incomplete, ...
6 years, 7 months ago (2014-05-15 20:51:29 UTC) #1
Fady Samuel
Let's chat about this tomorrow. https://codereview.chromium.org/287093002/diff/1/content/browser/renderer_host/render_view_host_impl.cc File content/browser/renderer_host/render_view_host_impl.cc (right): https://codereview.chromium.org/287093002/diff/1/content/browser/renderer_host/render_view_host_impl.cc#newcode1624 content/browser/renderer_host/render_view_host_impl.cc:1624: GetProcess()->GetID(), GetRoutingID(), zoom_level); The ...
6 years, 7 months ago (2014-05-15 23:26:53 UTC) #2
wjmaclean
See my replies to your comments, but definitely let's chat about this tomorrow. https://codereview.chromium.org/287093002/diff/1/content/browser/renderer_host/render_view_host_impl.cc File ...
6 years, 7 months ago (2014-05-16 01:57:08 UTC) #3
wjmaclean
https://codereview.chromium.org/287093002/diff/1/content/browser/web_contents/web_contents_impl.cc File content/browser/web_contents/web_contents_impl.cc (right): https://codereview.chromium.org/287093002/diff/1/content/browser/web_contents/web_contents_impl.cc#newcode2283 content/browser/web_contents/web_contents_impl.cc:2283: RenderViewHostImpl* host = GetRenderManager()->current_host(); On 2014/05/16 01:57:08, wjmaclean wrote: ...
6 years, 7 months ago (2014-05-16 12:53:46 UTC) #4
Fady Samuel
https://codereview.chromium.org/287093002/diff/1/content/browser/web_contents/web_contents_impl.cc File content/browser/web_contents/web_contents_impl.cc (left): https://codereview.chromium.org/287093002/diff/1/content/browser/web_contents/web_contents_impl.cc#oldcode2166 content/browser/web_contents/web_contents_impl.cc:2166: double WebContentsImpl::GetZoomLevel() const { Move this to HostZoomMap::GetZoomLevelForWebContents. https://codereview.chromium.org/287093002/diff/1/content/browser/web_contents/web_contents_impl.cc#oldcode2282 ...
6 years, 7 months ago (2014-05-16 19:20:07 UTC) #5
wjmaclean
https://codereview.chromium.org/287093002/diff/1/content/browser/web_contents/web_contents_impl.cc File content/browser/web_contents/web_contents_impl.cc (left): https://codereview.chromium.org/287093002/diff/1/content/browser/web_contents/web_contents_impl.cc#oldcode2166 content/browser/web_contents/web_contents_impl.cc:2166: double WebContentsImpl::GetZoomLevel() const { On 2014/05/16 19:20:07, Fady Samuel ...
6 years, 7 months ago (2014-05-16 19:32:48 UTC) #6
wjmaclean
Here's a more up to date version of the CL. PTAL. https://codereview.chromium.org/287093002/diff/1/content/renderer/render_view_impl.cc File content/renderer/render_view_impl.cc (right): ...
6 years, 7 months ago (2014-05-21 20:59:12 UTC) #7
wjmaclean
John - can you please take a look? We'd like to make this change to ...
6 years, 7 months ago (2014-05-22 18:52:44 UTC) #8
jam
great that zooming is moving to one place. pkasting: are you familiar with the details ...
6 years, 7 months ago (2014-05-23 15:51:03 UTC) #9
wjmaclean
https://codereview.chromium.org/287093002/diff/80001/content/browser/host_zoom_map_impl.h File content/browser/host_zoom_map_impl.h (right): https://codereview.chromium.org/287093002/diff/80001/content/browser/host_zoom_map_impl.h#newcode44 content/browser/host_zoom_map_impl.h:44: const std::string& host); On 2014/05/23 15:51:04, jam wrote: > ...
6 years, 7 months ago (2014-05-23 17:07:09 UTC) #10
Peter Kasting
I will try to review this tomorrow.
6 years, 7 months ago (2014-05-28 02:17:30 UTC) #11
Peter Kasting
So how do we now tell View B to change its zoom level when View ...
6 years, 6 months ago (2014-05-28 22:49:57 UTC) #12
wjmaclean
"So how do we now tell View B to change its zoom level when View ...
6 years, 6 months ago (2014-05-29 14:49:44 UTC) #13
Peter Kasting
> This CL talks to HostZoomMap *first*, and all matching RenderViews are updated > together. ...
6 years, 6 months ago (2014-05-29 18:16:08 UTC) #14
wjmaclean
I'm happy to look at the issue of exposing these APIs through the base class ...
6 years, 6 months ago (2014-05-29 20:14:19 UTC) #15
kenrb
lgtm for IPC change
6 years, 6 months ago (2014-05-29 20:25:31 UTC) #16
wjmaclean
The CQ bit was checked by wjmaclean@chromium.org
6 years, 6 months ago (2014-05-29 20:27:49 UTC) #17
fsamuel
https://codereview.chromium.org/287093002/diff/140001/content/renderer/render_view_impl.cc File content/renderer/render_view_impl.cc (right): https://codereview.chromium.org/287093002/diff/140001/content/renderer/render_view_impl.cc#newcode948 content/renderer/render_view_impl.cc:948: render_view->Send(new ViewHostMsg_DidCreateDocument( Given you pass this information about plugin ...
6 years, 6 months ago (2014-05-29 20:28:57 UTC) #18
wjmaclean
The CQ bit was unchecked by wjmaclean@chromium.org
6 years, 6 months ago (2014-05-29 20:31:09 UTC) #19
wjmaclean
https://codereview.chromium.org/287093002/diff/140001/content/renderer/render_view_impl.cc File content/renderer/render_view_impl.cc (right): https://codereview.chromium.org/287093002/diff/140001/content/renderer/render_view_impl.cc#newcode948 content/renderer/render_view_impl.cc:948: render_view->Send(new ViewHostMsg_DidCreateDocument( On 2014/05/29 20:28:57, fsamuel wrote: > Given ...
6 years, 6 months ago (2014-05-29 20:52:29 UTC) #20
wjmaclean
The CQ bit was checked by wjmaclean@chromium.org
6 years, 6 months ago (2014-05-29 20:52:38 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wjmaclean@chromium.org/287093002/160001
6 years, 6 months ago (2014-05-29 20:54:49 UTC) #22
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_aosp on tryserver.chromium ...
6 years, 6 months ago (2014-05-30 03:30:25 UTC) #23
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-05-30 03:37:59 UTC) #24
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/chromium_presubmit/builds/70580)
6 years, 6 months ago (2014-05-30 03:37:59 UTC) #25
jam
lgtm i defer to peter's review of the details of the zoom changes
6 years, 6 months ago (2014-05-30 06:47:43 UTC) #26
wjmaclean
The CQ bit was checked by wjmaclean@chromium.org
6 years, 6 months ago (2014-05-30 13:17:41 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wjmaclean@chromium.org/287093002/180001
6 years, 6 months ago (2014-05-30 13:18:58 UTC) #28
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_chromium_rel on tryserver.chromium ...
6 years, 6 months ago (2014-05-30 14:58:15 UTC) #29
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-05-30 14:59:09 UTC) #30
commit-bot: I haz the power
Try jobs failed on following builders: win_gpu_triggered_tests on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/win_gpu_triggered_tests/builds/12234)
6 years, 6 months ago (2014-05-30 14:59:10 UTC) #31
wjmaclean
The CQ bit was checked by wjmaclean@chromium.org
6 years, 6 months ago (2014-05-30 15:01:31 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wjmaclean@chromium.org/287093002/180001
6 years, 6 months ago (2014-05-30 15:02:27 UTC) #33
jam
https://codereview.chromium.org/287093002/diff/100001/content/browser/host_zoom_map_impl.cc File content/browser/host_zoom_map_impl.cc (right): https://codereview.chromium.org/287093002/diff/100001/content/browser/host_zoom_map_impl.cc#newcode217 content/browser/host_zoom_map_impl.cc:217: static_cast<const WebContentsImpl&>(web_contents); casting interfaces to objects that are only ...
6 years, 6 months ago (2014-05-30 16:22:20 UTC) #34
commit-bot: I haz the power
6 years, 6 months ago (2014-05-30 16:24:36 UTC) #35
Message was sent while issue was closed.
Change committed as 273854

Powered by Google App Engine
This is Rietveld 408576698