feat: add webContents 'zoom-changed' event (#17747)

This commit is contained in:
Milan Burda 2019-05-14 08:40:40 +02:00 committed by Alexey Kuzmin
parent 23b0487e9b
commit 6609138959
4 changed files with 52 additions and 0 deletions

View file

@ -636,6 +636,10 @@ content::KeyboardEventProcessingResult WebContents::PreHandleKeyboardEvent(
return content::KeyboardEventProcessingResult::NOT_HANDLED;
}
void WebContents::ContentsZoomChange(bool zoom_in) {
Emit("zoom-changed", zoom_in ? "in" : "out");
}
void WebContents::EnterFullscreenModeForTab(
content::WebContents* source,
const GURL& origin,

View file

@ -369,6 +369,7 @@ class WebContents : public mate::TrackableObject<WebContents>,
content::KeyboardEventProcessingResult PreHandleKeyboardEvent(
content::WebContents* source,
const content::NativeWebKeyboardEvent& event) override;
void ContentsZoomChange(bool zoom_in) override;
void EnterFullscreenModeForTab(
content::WebContents* source,
const GURL& origin,