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

Unified Diff: mojo/views/native_widget_view_manager.cc

Issue 745743002: Makes views be initially hidden (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: moar Created 6 years, 1 month 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: mojo/views/native_widget_view_manager.cc
diff --git a/mojo/views/native_widget_view_manager.cc b/mojo/views/native_widget_view_manager.cc
index 41d85a70dbdb062ad6d12b05ae9a6fcd57ca35e9..e463fda8d003b28fa4554ed3c1b4f366c82555d9 100644
--- a/mojo/views/native_widget_view_manager.cc
+++ b/mojo/views/native_widget_view_manager.cc
@@ -131,6 +131,14 @@ void NativeWidgetViewManager::InitNativeWidget(
NativeWidgetAura::InitNativeWidget(params);
}
+void NativeWidgetViewManager::OnWindowVisibilityChanged(aura::Window* window,
+ bool visible) {
+ view_->SetVisible(visible);
+ // NOTE: We could also update aura::Window's visibility when the View's
+ // visibilty changes, but this code isn't going to be around for very long so
+ // I'm not bothering.
+}
+
void NativeWidgetViewManager::OnViewDestroyed(View* view) {
DCHECK_EQ(view, view_);
view->RemoveObserver(this);

Powered by Google App Engine
This is Rietveld 408576698