| 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/aura/wm_shell_aura.h" | 5 #include "ash/aura/wm_shell_aura.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "ash/aura/pointer_watcher_adapter.h" | 9 #include "ash/aura/pointer_watcher_adapter.h" |
| 10 #include "ash/aura/wm_window_aura.h" | 10 #include "ash/aura/wm_window_aura.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 Shell::GetInstance()->activation_client()->RemoveObserver(this); | 68 Shell::GetInstance()->activation_client()->RemoveObserver(this); |
| 69 | 69 |
| 70 if (added_display_observer_) | 70 if (added_display_observer_) |
| 71 Shell::GetInstance()->window_tree_host_manager()->RemoveObserver(this); | 71 Shell::GetInstance()->window_tree_host_manager()->RemoveObserver(this); |
| 72 | 72 |
| 73 pointer_watcher_adapter_.reset(); | 73 pointer_watcher_adapter_.reset(); |
| 74 | 74 |
| 75 WmShell::Shutdown(); | 75 WmShell::Shutdown(); |
| 76 } | 76 } |
| 77 | 77 |
| 78 WmWindow* WmShellAura::NewContainerWindow() { | 78 WmWindow* WmShellAura::NewWindow(ui::wm::WindowType window_type, |
| 79 ui::LayerType layer_type) { |
| 79 aura::Window* aura_window = new aura::Window(nullptr); | 80 aura::Window* aura_window = new aura::Window(nullptr); |
| 80 aura_window->Init(ui::LAYER_NOT_DRAWN); | 81 aura_window->SetType(window_type); |
| 82 aura_window->Init(layer_type); |
| 81 return WmWindowAura::Get(aura_window); | 83 return WmWindowAura::Get(aura_window); |
| 82 } | 84 } |
| 83 | 85 |
| 84 WmWindow* WmShellAura::GetFocusedWindow() { | 86 WmWindow* WmShellAura::GetFocusedWindow() { |
| 85 return WmWindowAura::Get( | 87 return WmWindowAura::Get( |
| 86 aura::client::GetFocusClient(Shell::GetPrimaryRootWindow()) | 88 aura::client::GetFocusClient(Shell::GetPrimaryRootWindow()) |
| 87 ->GetFocusedWindow()); | 89 ->GetFocusedWindow()); |
| 88 } | 90 } |
| 89 | 91 |
| 90 WmWindow* WmShellAura::GetActiveWindow() { | 92 WmWindow* WmShellAura::GetActiveWindow() { |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 FOR_EACH_OBSERVER(WmDisplayObserver, display_observers_, | 309 FOR_EACH_OBSERVER(WmDisplayObserver, display_observers_, |
| 308 OnDisplayConfigurationChanging()); | 310 OnDisplayConfigurationChanging()); |
| 309 } | 311 } |
| 310 | 312 |
| 311 void WmShellAura::OnDisplayConfigurationChanged() { | 313 void WmShellAura::OnDisplayConfigurationChanged() { |
| 312 FOR_EACH_OBSERVER(WmDisplayObserver, display_observers_, | 314 FOR_EACH_OBSERVER(WmDisplayObserver, display_observers_, |
| 313 OnDisplayConfigurationChanged()); | 315 OnDisplayConfigurationChanged()); |
| 314 } | 316 } |
| 315 | 317 |
| 316 } // namespace ash | 318 } // namespace ash |
| OLD | NEW |