Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Side by Side Diff: ash/mus/window_manager_application.cc

Issue 1939133002: StructTraits to map mus::mojom::Event to unique_ptr<ui::Event> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed feedback. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ash/mus/accelerator_registrar_unittest.cc ('k') | components/mus/public/cpp/lib/window_tree_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698