OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/mus/window_manager_application.h" | 5 #include "ash/mus/window_manager_application.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "ash/mus/accelerator_registrar_impl.h" | 9 #include "ash/mus/accelerator_registrar_impl.h" |
10 #include "ash/mus/bridge/wm_lookup_mus.h" | 10 #include "ash/mus/bridge/wm_lookup_mus.h" |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 void WindowManagerApplication::OnRootWindowDestroyed( | 94 void WindowManagerApplication::OnRootWindowDestroyed( |
95 RootWindowController* root_controller) { | 95 RootWindowController* root_controller) { |
96 root_controllers_.erase(root_controller); | 96 root_controllers_.erase(root_controller); |
97 user_window_controller_.reset(nullptr); | 97 user_window_controller_.reset(nullptr); |
98 } | 98 } |
99 | 99 |
100 void WindowManagerApplication::OnAccelerator(uint32_t id, | 100 void WindowManagerApplication::OnAccelerator(uint32_t id, |
101 const ui::Event& event) { | 101 const ui::Event& event) { |
102 for (auto* registrar : accelerator_registrars_) { | 102 for (auto* registrar : accelerator_registrars_) { |
103 if (registrar->OwnsAccelerator(id)) { | 103 if (registrar->OwnsAccelerator(id)) { |
104 registrar->ProcessAccelerator(id, ::mus::mojom::Event::From(event)); | 104 registrar->ProcessAccelerator(id, event); |
105 break; | 105 break; |
106 } | 106 } |
107 } | 107 } |
108 } | 108 } |
109 | 109 |
110 void WindowManagerApplication::AddRootWindowsObserver( | 110 void WindowManagerApplication::AddRootWindowsObserver( |
111 RootWindowsObserver* observer) { | 111 RootWindowsObserver* observer) { |
112 root_windows_observers_.AddObserver(observer); | 112 root_windows_observers_.AddObserver(observer); |
113 } | 113 } |
114 | 114 |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 | 198 |
199 void WindowManagerApplication::CreateWindowManager( | 199 void WindowManagerApplication::CreateWindowManager( |
200 ::mus::mojom::DisplayPtr display, | 200 ::mus::mojom::DisplayPtr display, |
201 mojo::InterfaceRequest<::mus::mojom::WindowTreeClient> client_request) { | 201 mojo::InterfaceRequest<::mus::mojom::WindowTreeClient> client_request) { |
202 AddRootWindowController(RootWindowController::CreateFromDisplay( | 202 AddRootWindowController(RootWindowController::CreateFromDisplay( |
203 this, std::move(display), std::move(client_request))); | 203 this, std::move(display), std::move(client_request))); |
204 } | 204 } |
205 | 205 |
206 } // namespace mus | 206 } // namespace mus |
207 } // namespace ash | 207 } // namespace ash |
OLD | NEW |