Commit 031f9b9b authored by Kevin McNee's avatar Kevin McNee Committed by Commit Bot

Have a guest view's embedder handle control wheel zoom changes

Currently, a guest view responds to control wheel zoom changes by
zooming the embedder. However, the embedder itself may not respond
to control wheel zoom changes. So a user could zoom an otherwise
non-zoomable embedder by control wheel zooming inside a guest.

We now have the guest view inform the embedder that a control wheel
zoom change has occurred so that the embedder can decide how to handle
it.

Bug: 874189
Change-Id: Icd49a2590e502bb60b7e3d6d372de3a133e2277f
Reviewed-on: https://chromium-review.googlesource.com/1175006Reviewed-by: default avatarJames MacLean <wjmaclean@chromium.org>
Commit-Queue: Kevin McNee <mcnee@chromium.org>
Cr-Commit-Position: refs/heads/master@{#583031}
parent f0e8e86f
...@@ -626,9 +626,9 @@ void GuestViewBase::ContentsMouseEvent(WebContents* source, ...@@ -626,9 +626,9 @@ void GuestViewBase::ContentsMouseEvent(WebContents* source,
} }
void GuestViewBase::ContentsZoomChange(bool zoom_in) { void GuestViewBase::ContentsZoomChange(bool zoom_in) {
zoom::PageZoom::Zoom(embedder_web_contents(), zoom_in if (!attached() || !embedder_web_contents()->GetDelegate())
? content::PAGE_ZOOM_IN return;
: content::PAGE_ZOOM_OUT); embedder_web_contents()->GetDelegate()->ContentsZoomChange(zoom_in);
} }
void GuestViewBase::HandleKeyboardEvent( void GuestViewBase::HandleKeyboardEvent(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment