OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "ash/wm/aura/wm_globals_aura.h" | 5 #include "ash/wm/aura/wm_globals_aura.h" |
6 | 6 |
7 #include "ash/display/window_tree_host_manager.h" | 7 #include "ash/display/window_tree_host_manager.h" |
8 #include "ash/session/session_state_delegate.h" | 8 #include "ash/session/session_state_delegate.h" |
9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
10 #include "ash/shell_delegate.h" | 10 #include "ash/shell_delegate.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 if (added_activation_observer_) { | 33 if (added_activation_observer_) { |
34 aura::client::GetActivationClient(Shell::GetPrimaryRootWindow()) | 34 aura::client::GetActivationClient(Shell::GetPrimaryRootWindow()) |
35 ->RemoveObserver(this); | 35 ->RemoveObserver(this); |
36 } | 36 } |
37 if (added_display_observer_) | 37 if (added_display_observer_) |
38 Shell::GetInstance()->window_tree_host_manager()->RemoveObserver(this); | 38 Shell::GetInstance()->window_tree_host_manager()->RemoveObserver(this); |
39 | 39 |
40 Shell::GetInstance()->RemoveShellObserver(this); | 40 Shell::GetInstance()->RemoveShellObserver(this); |
41 } | 41 } |
42 | 42 |
| 43 WmWindow* WmGlobalsAura::NewContainerWindow() { |
| 44 aura::Window* aura_window = new aura::Window(nullptr); |
| 45 aura_window->Init(ui::LAYER_NOT_DRAWN); |
| 46 return WmWindowAura::Get(aura_window); |
| 47 } |
| 48 |
43 WmWindow* WmGlobalsAura::GetFocusedWindow() { | 49 WmWindow* WmGlobalsAura::GetFocusedWindow() { |
44 return WmWindowAura::Get( | 50 return WmWindowAura::Get( |
45 aura::client::GetFocusClient(Shell::GetPrimaryRootWindow()) | 51 aura::client::GetFocusClient(Shell::GetPrimaryRootWindow()) |
46 ->GetFocusedWindow()); | 52 ->GetFocusedWindow()); |
47 } | 53 } |
48 | 54 |
49 WmWindow* WmGlobalsAura::GetActiveWindow() { | 55 WmWindow* WmGlobalsAura::GetActiveWindow() { |
50 return WmWindowAura::Get(wm::GetActiveWindow()); | 56 return WmWindowAura::Get(wm::GetActiveWindow()); |
51 } | 57 } |
52 | 58 |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 OnDisplayConfigurationChanged()); | 194 OnDisplayConfigurationChanged()); |
189 } | 195 } |
190 | 196 |
191 void WmGlobalsAura::OnOverviewModeEnded() { | 197 void WmGlobalsAura::OnOverviewModeEnded() { |
192 FOR_EACH_OBSERVER(WmOverviewModeObserver, overview_mode_observers_, | 198 FOR_EACH_OBSERVER(WmOverviewModeObserver, overview_mode_observers_, |
193 OnOverviewModeEnded()); | 199 OnOverviewModeEnded()); |
194 } | 200 } |
195 | 201 |
196 } // namespace wm | 202 } // namespace wm |
197 } // namespace ash | 203 } // namespace ash |
OLD | NEW |