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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 2877323002: Add WebContentObserver::OnWebContentsLostFocus() (Closed)
Patch Set: Remove useless include Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 41778bf796aa7223f8ca8e384db023cb4509de19..b8670a91af7e718be096b1e31d1eaa2034c9e949 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -1862,6 +1862,11 @@ void WebContentsImpl::RenderWidgetGotFocus(
}
}
+void WebContentsImpl::RenderWidgetLostFocus(
+ RenderWidgetHostImpl* render_widget_host) {
+ NotifyWebContentsLostFocus();
+}
+
void WebContentsImpl::RenderWidgetWasResized(
RenderWidgetHostImpl* render_widget_host,
bool width_changed) {
@@ -3295,6 +3300,11 @@ void WebContentsImpl::NotifyWebContentsFocused() {
observer.OnWebContentsFocused();
}
+void WebContentsImpl::NotifyWebContentsLostFocus() {
+ for (auto& observer : observers_)
+ observer.OnWebContentsLostFocus();
+}
+
void WebContentsImpl::SystemDragEnded(RenderWidgetHost* source_rwh) {
if (source_rwh)
source_rwh->DragSourceSystemDragEnded();
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/browser/web_contents/web_contents_view_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698