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

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: NULL root window check 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..168f1b55afd56462858daa6009c1d165e8d467d6 100644
--- a/ui/views/controls/native/native_view_host_aura.cc
+++ b/ui/views/controls/native/native_view_host_aura.cc
@@ -97,7 +97,7 @@ void NativeViewHostAura::AttachNativeView() {
void NativeViewHostAura::NativeViewDetaching(bool destroyed) {
clipping_window_delegate_->set_native_view(NULL);
- RemoveClippingWindow();
+
if (!destroyed) {
host_->native_view()->RemoveObserver(this);
host_->native_view()->ClearProperty(views::kHostViewKey);
@@ -106,6 +106,7 @@ void NativeViewHostAura::NativeViewDetaching(bool destroyed) {
if (host_->native_view()->parent())
Widget::ReparentNativeView(host_->native_view(), NULL);
}
+ RemoveClippingWindow();
}
void NativeViewHostAura::AddedToWidget() {
« no previous file with comments | « no previous file | ui/views/controls/native/native_view_host_aura_unittest.cc » ('j') | ui/views/widget/native_widget_aura.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698