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

Unified Diff: ui/views/controls/native/native_view_host_aura.cc

Issue 564553002: 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: Fixed RemoveClippingWindowOrder views test 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
Index: ui/views/controls/native/native_view_host_aura.cc
diff --git a/ui/views/controls/native/native_view_host_aura.cc b/ui/views/controls/native/native_view_host_aura.cc
index 3b36b987e78b29f1ff6a4092e09f454209fde20d..a10911fefb0347b165ff2013819c61b03be34abd 100644
--- a/ui/views/controls/native/native_view_host_aura.cc
+++ b/ui/views/controls/native/native_view_host_aura.cc
@@ -97,12 +97,15 @@ void NativeViewHostAura::AttachNativeView() {
void NativeViewHostAura::NativeViewDetaching(bool destroyed) {
clipping_window_delegate_->set_native_view(NULL);
+ if (!destroyed)
+ host_->native_view()->Hide();
sky 2014/09/11 16:03:19 Why do we need to hide at all here?
ananta 2014/09/11 16:21:07 If we don't hide it the WCVA code which listens fo
sky 2014/09/11 16:43:36 Here's what the code for windows did eons ago: vo
+
RemoveClippingWindow();
+
if (!destroyed) {
host_->native_view()->RemoveObserver(this);
host_->native_view()->ClearProperty(views::kHostViewKey);
host_->native_view()->ClearProperty(aura::client::kHostWindowKey);
- host_->native_view()->Hide();
if (host_->native_view()->parent())
Widget::ReparentNativeView(host_->native_view(), NULL);
}

Powered by Google App Engine
This is Rietveld 408576698