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

Side by Side Diff: mash/wm/window_manager_application.cc

Issue 1814533002: Use ui::Event instead of mojom::EventPtr in mash/wm. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_eventptr
Patch Set: Created 4 years, 9 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
« no previous file with comments | « mash/wm/window_manager_application.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "mash/wm/window_manager_application.h" 5 #include "mash/wm/window_manager_application.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "components/mus/public/cpp/event_matcher.h" 10 #include "components/mus/public/cpp/event_matcher.h"
11 #include "components/mus/public/cpp/window.h" 11 #include "components/mus/public/cpp/window.h"
12 #include "components/mus/public/interfaces/window_manager_factory.mojom.h" 12 #include "components/mus/public/interfaces/window_manager_factory.mojom.h"
13 #include "mash/wm/accelerator_registrar_impl.h" 13 #include "mash/wm/accelerator_registrar_impl.h"
14 #include "mash/wm/root_window_controller.h" 14 #include "mash/wm/root_window_controller.h"
15 #include "mash/wm/root_windows_observer.h" 15 #include "mash/wm/root_windows_observer.h"
16 #include "mash/wm/user_window_controller_impl.h" 16 #include "mash/wm/user_window_controller_impl.h"
17 #include "mojo/converters/input_events/input_events_type_converters.h"
17 #include "mojo/services/tracing/public/cpp/tracing_impl.h" 18 #include "mojo/services/tracing/public/cpp/tracing_impl.h"
18 #include "mojo/shell/public/cpp/connection.h" 19 #include "mojo/shell/public/cpp/connection.h"
19 #include "mojo/shell/public/cpp/connector.h" 20 #include "mojo/shell/public/cpp/connector.h"
21 #include "ui/events/event.h"
20 #include "ui/mojo/init/ui_init.h" 22 #include "ui/mojo/init/ui_init.h"
21 #include "ui/views/mus/aura_init.h" 23 #include "ui/views/mus/aura_init.h"
22 #include "ui/views/mus/display_converter.h" 24 #include "ui/views/mus/display_converter.h"
23 25
24 namespace mash { 26 namespace mash {
25 namespace wm { 27 namespace wm {
26 28
27 WindowManagerApplication::WindowManagerApplication() 29 WindowManagerApplication::WindowManagerApplication()
28 : connector_(nullptr), window_manager_factory_binding_(this) {} 30 : connector_(nullptr), window_manager_factory_binding_(this) {}
29 31
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 OnRootWindowControllerAdded(root_controller)); 74 OnRootWindowControllerAdded(root_controller));
73 } 75 }
74 76
75 void WindowManagerApplication::OnRootWindowDestroyed( 77 void WindowManagerApplication::OnRootWindowDestroyed(
76 RootWindowController* root_controller) { 78 RootWindowController* root_controller) {
77 root_controllers_.erase(root_controller); 79 root_controllers_.erase(root_controller);
78 user_window_controller_.reset(nullptr); 80 user_window_controller_.reset(nullptr);
79 } 81 }
80 82
81 void WindowManagerApplication::OnAccelerator(uint32_t id, 83 void WindowManagerApplication::OnAccelerator(uint32_t id,
82 mus::mojom::EventPtr event) { 84 const ui::Event& event) {
83 for (auto* registrar : accelerator_registrars_) { 85 for (auto* registrar : accelerator_registrars_) {
84 if (registrar->OwnsAccelerator(id)) { 86 if (registrar->OwnsAccelerator(id)) {
85 registrar->ProcessAccelerator(id, std::move(event)); 87 registrar->ProcessAccelerator(id, mus::mojom::Event::From(event));
86 break; 88 break;
87 } 89 }
88 } 90 }
89 } 91 }
90 92
91 void WindowManagerApplication::AddRootWindowsObserver( 93 void WindowManagerApplication::AddRootWindowsObserver(
92 RootWindowsObserver* observer) { 94 RootWindowsObserver* observer) {
93 root_windows_observers_.AddObserver(observer); 95 root_windows_observers_.AddObserver(observer);
94 } 96 }
95 97
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 164
163 void WindowManagerApplication::CreateWindowManager( 165 void WindowManagerApplication::CreateWindowManager(
164 mus::mojom::DisplayPtr display, 166 mus::mojom::DisplayPtr display,
165 mojo::InterfaceRequest<mus::mojom::WindowTreeClient> client_request) { 167 mojo::InterfaceRequest<mus::mojom::WindowTreeClient> client_request) {
166 root_controllers_.insert(RootWindowController::CreateFromDisplay( 168 root_controllers_.insert(RootWindowController::CreateFromDisplay(
167 this, std::move(display), std::move(client_request))); 169 this, std::move(display), std::move(client_request)));
168 } 170 }
169 171
170 } // namespace wm 172 } // namespace wm
171 } // namespace mash 173 } // namespace mash
OLDNEW
« no previous file with comments | « mash/wm/window_manager_application.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698