| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/views/corewm/wm_state.h" | 5 #include "ui/views/corewm/wm_state.h" |
| 6 | 6 |
| 7 #include "ui/views/corewm/transient_window_controller.h" |
| 7 #include "ui/views/corewm/transient_window_stacking_client.h" | 8 #include "ui/views/corewm/transient_window_stacking_client.h" |
| 8 | 9 |
| 9 namespace views { | 10 namespace views { |
| 10 namespace corewm { | 11 namespace corewm { |
| 11 | 12 |
| 12 WMState::WMState() | 13 WMState::WMState() |
| 13 : window_stacking_client_(new TransientWindowStackingClient) { | 14 : window_stacking_client_(new TransientWindowStackingClient), |
| 15 transient_window_client_(new TransientWindowController) { |
| 14 aura::client::SetWindowStackingClient(window_stacking_client_.get()); | 16 aura::client::SetWindowStackingClient(window_stacking_client_.get()); |
| 17 aura::client::SetTransientWindowClient(transient_window_client_.get()); |
| 15 } | 18 } |
| 16 | 19 |
| 17 WMState::~WMState() { | 20 WMState::~WMState() { |
| 18 if (aura::client::GetWindowStackingClient() == window_stacking_client_.get()) | 21 if (aura::client::GetWindowStackingClient() == window_stacking_client_.get()) |
| 19 aura::client::SetWindowStackingClient(NULL); | 22 aura::client::SetWindowStackingClient(NULL); |
| 23 |
| 24 if (aura::client::GetTransientWindowClient() == |
| 25 transient_window_client_.get()) { |
| 26 aura::client::SetTransientWindowClient(NULL); |
| 27 } |
| 20 } | 28 } |
| 21 | 29 |
| 22 } // namespace corewm | 30 } // namespace corewm |
| 23 } // namespace views | 31 } // namespace views |
| OLD | NEW |