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

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

Issue 2625113004: Unify window fullscreen and minimizing implementation (Closed)
Patch Set: Fix review issue Created 3 years, 11 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 | « ui/views/mus/desktop_window_tree_host_mus.h ('k') | ui/views/widget/native_widget_aura.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/mus/desktop_window_tree_host_mus.cc
diff --git a/ui/views/mus/desktop_window_tree_host_mus.cc b/ui/views/mus/desktop_window_tree_host_mus.cc
index 12d11166f2452f579f464c2aa520cc1357488595..0b6a2aad31946504f7359a158ad655a1c9a0614b 100644
--- a/ui/views/mus/desktop_window_tree_host_mus.cc
+++ b/ui/views/mus/desktop_window_tree_host_mus.cc
@@ -177,7 +177,6 @@ DesktopWindowTreeHostMus::DesktopWindowTreeHostMus(
mus_properties),
native_widget_delegate_(native_widget_delegate),
desktop_native_widget_aura_(desktop_native_widget_aura),
- fullscreen_restore_state_(ui::SHOW_STATE_DEFAULT),
close_widget_factory_(this) {
aura::Env::GetInstance()->AddObserver(this);
MusClient::Get()->AddObserver(this);
@@ -606,16 +605,7 @@ void DesktopWindowTreeHostMus::SetFullscreen(bool fullscreen) {
if (IsFullscreen() == fullscreen)
return; // Nothing to do.
- // Save window state before entering full screen so that it could restored
- // when exiting full screen.
- if (fullscreen) {
- fullscreen_restore_state_ =
- window()->GetProperty(aura::client::kShowStateKey);
- }
-
- window()->SetProperty(
- aura::client::kShowStateKey,
- fullscreen ? ui::SHOW_STATE_FULLSCREEN : fullscreen_restore_state_);
+ wm::SetWindowFullscreen(window(), fullscreen);
}
bool DesktopWindowTreeHostMus::IsFullscreen() const {
« no previous file with comments | « ui/views/mus/desktop_window_tree_host_mus.h ('k') | ui/views/widget/native_widget_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698