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

Side by Side Diff: services/ui/ws/event_dispatcher.h

Issue 2520093003: WindowManagerClient::AddAccelerator() should take an array (Closed)
Patch Set: Forget to add these files to previous patch. Created 4 years, 1 month 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 #ifndef SERVICES_UI_WS_EVENT_DISPATCHER_H_ 5 #ifndef SERVICES_UI_WS_EVENT_DISPATCHER_H_
6 #define SERVICES_UI_WS_EVENT_DISPATCHER_H_ 6 #define SERVICES_UI_WS_EVENT_DISPATCHER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
11 #include <memory> 11 #include <memory>
12 #include <utility> 12 #include <utility>
13 13
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "services/ui/common/types.h" 15 #include "services/ui/common/types.h"
16 #include "services/ui/public/interfaces/cursor.mojom.h" 16 #include "services/ui/public/interfaces/cursor.mojom.h"
17 #include "services/ui/public/interfaces/event_matcher.mojom.h" 17 #include "services/ui/public/interfaces/event_matcher.mojom.h"
18 #include "services/ui/public/interfaces/window_manager.mojom.h"
18 #include "services/ui/ws/drag_cursor_updater.h" 19 #include "services/ui/ws/drag_cursor_updater.h"
19 #include "services/ui/ws/modal_window_controller.h" 20 #include "services/ui/ws/modal_window_controller.h"
20 #include "services/ui/ws/server_window_observer.h" 21 #include "services/ui/ws/server_window_observer.h"
21 #include "ui/gfx/geometry/rect_f.h" 22 #include "ui/gfx/geometry/rect_f.h"
22 23
23 namespace ui { 24 namespace ui {
24 class Event; 25 class Event;
25 class KeyEvent; 26 class KeyEvent;
26 class LocatedEvent; 27 class LocatedEvent;
27 28
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 void UpdateNonClientAreaForCurrentWindow(); 119 void UpdateNonClientAreaForCurrentWindow();
119 120
120 // Possibly updates the cursor. If we aren't in an implicit capture, we take 121 // Possibly updates the cursor. If we aren't in an implicit capture, we take
121 // the last known location of the mouse pointer, and look for the 122 // the last known location of the mouse pointer, and look for the
122 // ServerWindow* under it. 123 // ServerWindow* under it.
123 void UpdateCursorProviderByLastKnownLocation(); 124 void UpdateCursorProviderByLastKnownLocation();
124 125
125 // Adds an accelerator with the given id and event-matcher. If an accelerator 126 // Adds an accelerator with the given id and event-matcher. If an accelerator
126 // already exists with the same id or the same matcher, then the accelerator 127 // already exists with the same id or the same matcher, then the accelerator
127 // is not added. Returns whether adding the accelerator was successful or not. 128 // is not added. Returns whether adding the accelerator was successful or not.
128 bool AddAccelerator(uint32_t id, mojom::EventMatcherPtr event_matcher); 129 bool AddAccelerator(
130 mojo::Array<ui::mojom::AcceleratorEventPtr> multi_accelerators);
131
129 void RemoveAccelerator(uint32_t id); 132 void RemoveAccelerator(uint32_t id);
130 133
131 // Processes the supplied event, informing the delegate as approriate. This 134 // Processes the supplied event, informing the delegate as approriate. This
132 // may result in generating any number of events. If |match_phase| is 135 // may result in generating any number of events. If |match_phase| is
133 // ANY and there is a matching accelerator with PRE_TARGET found, than only 136 // ANY and there is a matching accelerator with PRE_TARGET found, than only
134 // OnAccelerator() is called. The expectation is after the PRE_TARGET has been 137 // OnAccelerator() is called. The expectation is after the PRE_TARGET has been
135 // handled this is again called with an AcceleratorMatchPhase of POST_ONLY. 138 // handled this is again called with an AcceleratorMatchPhase of POST_ONLY.
136 void ProcessEvent(const ui::Event& event, AcceleratorMatchPhase match_phase); 139 void ProcessEvent(const ui::Event& event, AcceleratorMatchPhase match_phase);
137 140
138 private: 141 private:
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 AcceleratorMatchPhase::ANY; 274 AcceleratorMatchPhase::ANY;
272 #endif 275 #endif
273 276
274 DISALLOW_COPY_AND_ASSIGN(EventDispatcher); 277 DISALLOW_COPY_AND_ASSIGN(EventDispatcher);
275 }; 278 };
276 279
277 } // namespace ws 280 } // namespace ws
278 } // namespace ui 281 } // namespace ui
279 282
280 #endif // SERVICES_UI_WS_EVENT_DISPATCHER_H_ 283 #endif // SERVICES_UI_WS_EVENT_DISPATCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698