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/key_event_watcher_aura.h" | 9 #include "ash/aura/key_event_watcher_aura.h" |
10 #include "ash/aura/pointer_watcher_adapter.h" | 10 #include "ash/aura/pointer_watcher_adapter.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 | 64 |
65 WmShell::Shutdown(); | 65 WmShell::Shutdown(); |
66 | 66 |
67 Shell::GetInstance()->window_tree_host_manager()->Shutdown(); | 67 Shell::GetInstance()->window_tree_host_manager()->Shutdown(); |
68 } | 68 } |
69 | 69 |
70 bool WmShellAura::IsRunningInMash() const { | 70 bool WmShellAura::IsRunningInMash() const { |
71 return false; | 71 return false; |
72 } | 72 } |
73 | 73 |
74 WmWindow* WmShellAura::NewWindow(ui::wm::WindowType window_type, | |
75 ui::LayerType layer_type) { | |
76 aura::Window* aura_window = new aura::Window(nullptr); | |
77 aura_window->SetType(window_type); | |
78 aura_window->Init(layer_type); | |
79 return WmWindow::Get(aura_window); | |
80 } | |
81 | |
82 WmWindow* WmShellAura::GetFocusedWindow() { | 74 WmWindow* WmShellAura::GetFocusedWindow() { |
83 return WmWindow::Get( | 75 return WmWindow::Get( |
84 aura::client::GetFocusClient(Shell::GetPrimaryRootWindow()) | 76 aura::client::GetFocusClient(Shell::GetPrimaryRootWindow()) |
85 ->GetFocusedWindow()); | 77 ->GetFocusedWindow()); |
86 } | 78 } |
87 | 79 |
88 WmWindow* WmShellAura::GetActiveWindow() { | 80 WmWindow* WmShellAura::GetActiveWindow() { |
89 return WmWindow::Get(wm::GetActiveWindow()); | 81 return WmWindow::Get(wm::GetActiveWindow()); |
90 } | 82 } |
91 | 83 |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 for (auto& observer : display_observers_) | 297 for (auto& observer : display_observers_) |
306 observer.OnDisplayConfigurationChanging(); | 298 observer.OnDisplayConfigurationChanging(); |
307 } | 299 } |
308 | 300 |
309 void WmShellAura::OnDisplayConfigurationChanged() { | 301 void WmShellAura::OnDisplayConfigurationChanged() { |
310 for (auto& observer : display_observers_) | 302 for (auto& observer : display_observers_) |
311 observer.OnDisplayConfigurationChanged(); | 303 observer.OnDisplayConfigurationChanged(); |
312 } | 304 } |
313 | 305 |
314 } // namespace ash | 306 } // namespace ash |
OLD | NEW |