Commit 1241d6c8 authored by Grzegorz Król Żyszkiewicz's avatar Grzegorz Król Żyszkiewicz Committed by Commit Bot

Notify WebContentsObservers of lost webcontents focus on MAC

Seems the mechanism implemented for aura web contents view was
not moved correctly to mac web contents view. This change applies
the needed changes to make web contents observers to be notified
of lost focus on MAC.

This omission on Mac seems to only affect UMA histograms.

BUG=680809

Change-Id: I47d8063d3258b9e6c684899f763198b5f9f8ffff
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1611821Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
Reviewed-by: default avatarTrent Apted <tapted@chromium.org>
Commit-Queue: Trent Apted <tapted@chromium.org>
Cr-Commit-Position: refs/heads/master@{#660312}
parent d3d2b193
......@@ -94,6 +94,7 @@ class WebContentsViewMac : public WebContentsView,
RenderWidgetHostImpl* source_rwh) override;
void UpdateDragCursor(blink::WebDragOperation operation) override;
void GotFocus(RenderWidgetHostImpl* render_widget_host) override;
void LostFocus(RenderWidgetHostImpl* render_widget_host) override;
void TakeFocus(bool reverse) override;
void ShowContextMenu(RenderFrameHost* render_frame_host,
const ContextMenuParams& params) override;
......
......@@ -246,6 +246,10 @@ void WebContentsViewMac::GotFocus(RenderWidgetHostImpl* render_widget_host) {
web_contents_->NotifyWebContentsFocused(render_widget_host);
}
void WebContentsViewMac::LostFocus(RenderWidgetHostImpl* render_widget_host) {
web_contents_->NotifyWebContentsLostFocus(render_widget_host);
}
// This is called when the renderer asks us to take focus back (i.e., it has
// iterated past the last focusable element on the page).
void WebContentsViewMac::TakeFocus(bool reverse) {
......
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