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

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

Issue 577533003: Revert of When we switch tabs in chrome, the tab being switched away from gets hidden/shown/hidden. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « content/browser/web_contents/web_contents_view_aura.h ('k') | ui/views/controls/webview/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/web_contents/web_contents_view_aura.cc
diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc
index f242e7f149a890fc7999d7851d67404a310a8a03..ecbe02ca04e5d4dd798d5a9a6599dbc6e03229c1 100644
--- a/content/browser/web_contents/web_contents_view_aura.cc
+++ b/content/browser/web_contents/web_contents_view_aura.cc
@@ -1578,6 +1578,19 @@
return ConvertFromWeb(current_drag_op_);
}
+void WebContentsViewAura::OnWindowParentChanged(aura::Window* window,
+ aura::Window* parent) {
+ // Ignore any visibility changes in the hierarchy below.
+ if (window != window_.get() && window_->Contains(window))
+ return;
+
+ // On Windows we will get called with a parent of NULL as part of the shut
+ // down process. As such we do only change the visibility when a parent gets
+ // set.
+ if (parent)
+ UpdateWebContentsVisibility(window->IsVisible());
+}
+
void WebContentsViewAura::OnWindowVisibilityChanged(aura::Window* window,
bool visible) {
// Ignore any visibility changes in the hierarchy below.
« no previous file with comments | « content/browser/web_contents/web_contents_view_aura.h ('k') | ui/views/controls/webview/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698