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

Unified Diff: ui/views/mus/native_widget_mus.cc

Issue 1962043002: Move Show and Hide impls from PlatformWindowMus to NativeWidgetMus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 7 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 | « no previous file | ui/views/mus/platform_window_mus.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/mus/native_widget_mus.cc
diff --git a/ui/views/mus/native_widget_mus.cc b/ui/views/mus/native_widget_mus.cc
index 4d5cf0b3570bc5ef16d91fdeacdb0be85ac8258d..ca04c519c22a36467feb9488b854b8f0a38f5f33 100644
--- a/ui/views/mus/native_widget_mus.cc
+++ b/ui/views/mus/native_widget_mus.cc
@@ -794,10 +794,11 @@ void NativeWidgetMus::Show() {
}
void NativeWidgetMus::Hide() {
- if (!window_tree_host_)
+ if (!(window_ && window_tree_host_))
return;
window_tree_host_->Hide();
+ window_->SetVisible(false);
GetNativeWindow()->Hide();
}
@@ -807,10 +808,11 @@ void NativeWidgetMus::ShowMaximizedWithBounds(
}
void NativeWidgetMus::ShowWithWindowState(ui::WindowShowState state) {
- if (!window_tree_host_)
+ if (!(window_ && window_tree_host_))
return;
window_tree_host_->Show();
+ window_->SetVisible(true);
GetNativeWindow()->Show();
if (native_widget_delegate_->CanActivate()) {
if (state != ui::SHOW_STATE_INACTIVE)
@@ -1148,9 +1150,11 @@ void NativeWidgetMus::OnMusWindowVisibilityChanging(mus::Window* window) {
void NativeWidgetMus::OnMusWindowVisibilityChanged(mus::Window* window) {
if (window->visible()) {
window_tree_host_->Show();
+ window_->SetVisible(true);
GetNativeWindow()->Show();
} else {
window_tree_host_->Hide();
+ window_->SetVisible(false);
GetNativeWindow()->Hide();
}
native_widget_delegate_->OnNativeWidgetVisibilityChanged(window->visible());
« no previous file with comments | « no previous file | ui/views/mus/platform_window_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698