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

Unified Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 944763002: Make Page Visibility API work when the browser window is visible or not Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use of SetWindowVisibility message Created 5 years, 8 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/renderer_host/render_widget_host_view_aura.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index 146355707f08f247446929d5c6c0d22d7b5e11e2..ba754244328f44e716b858e103d96fd63d301ca5 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -1430,6 +1430,12 @@ void RenderWidgetHostViewAura::UnlockMouse() {
host_->LostMouseLock();
}
+void RenderWidgetHostViewAura::SetWindowVisibility(bool visible) {
+ if (host_)
+ host_->Send(new ViewMsg_SetWindowVisibility(host_->GetRoutingID(),
+ visible));
+}
+
////////////////////////////////////////////////////////////////////////////////
// RenderWidgetHostViewAura, ui::TextInputClient implementation:
void RenderWidgetHostViewAura::SetCompositionText(
@@ -2276,6 +2282,10 @@ void RenderWidgetHostViewAura::OnHostMoved(const aura::WindowTreeHost* host,
UpdateScreenInfo(window_);
}
+void RenderWidgetHostViewAura::OnHostSetWindowVisibility(
+ const aura::WindowTreeHost* host, bool visible) {
+ SetWindowVisibility(visible);
+}
////////////////////////////////////////////////////////////////////////////////
// RenderWidgetHostViewAura, private:

Powered by Google App Engine
This is Rietveld 408576698