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

Side by Side Diff: components/mus/ws/event_dispatcher.h

Issue 1759273002: Add AcceleratorType to EventMatcher (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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
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 COMPONENTS_MUS_WS_EVENT_DISPATCHER_H_ 5 #ifndef COMPONENTS_MUS_WS_EVENT_DISPATCHER_H_
6 #define COMPONENTS_MUS_WS_EVENT_DISPATCHER_H_ 6 #define COMPONENTS_MUS_WS_EVENT_DISPATCHER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 130
131 // Stops sending pointer events to |window|. This does not remove the entry 131 // Stops sending pointer events to |window|. This does not remove the entry
132 // for |window| from |pointer_targets_|, rather it nulls out the window. This 132 // for |window| from |pointer_targets_|, rather it nulls out the window. This
133 // way we continue to eat events until the up/cancel is received. 133 // way we continue to eat events until the up/cancel is received.
134 void CancelPointerEventsToTarget(ServerWindow* window); 134 void CancelPointerEventsToTarget(ServerWindow* window);
135 135
136 // Returns true if we're currently an observer for |window|. We are an 136 // Returns true if we're currently an observer for |window|. We are an
137 // observer for a window if any pointer events are targeting it. 137 // observer for a window if any pointer events are targeting it.
138 bool IsObservingWindow(ServerWindow* window); 138 bool IsObservingWindow(ServerWindow* window);
139 139
140 // Looks to see if there is an accelerator bound to the specified code/flags. 140 // Looks to see if there is an accelerator bound to the specified code/flags,
141 // If there is one, sets |accelerator_id| to the id of the accelerator invoked 141 // and of the matching |phase|. If there is one, sets |accelerator_id| to the
142 // and returns true. If there is none, returns false so normal key event 142 // id of the accelerator invoked and returns true. If there is none, returns
143 // processing can continue. 143 // false so normal key event processing can continue.
144 bool FindAccelerator(const ui::KeyEvent& event, uint32_t* accelerator_id); 144 bool FindAccelerator(const ui::KeyEvent& event,
145 const mojom::AcceleratorPhase phase,
146 uint32_t* accelerator_id);
145 147
146 // ServerWindowObserver: 148 // ServerWindowObserver:
147 void OnWillChangeWindowHierarchy(ServerWindow* window, 149 void OnWillChangeWindowHierarchy(ServerWindow* window,
148 ServerWindow* new_parent, 150 ServerWindow* new_parent,
149 ServerWindow* old_parent) override; 151 ServerWindow* old_parent) override;
150 void OnWindowVisibilityChanged(ServerWindow* window) override; 152 void OnWindowVisibilityChanged(ServerWindow* window) override;
151 void OnWindowDestroyed(ServerWindow* window) override; 153 void OnWindowDestroyed(ServerWindow* window) override;
152 154
153 EventDispatcherDelegate* delegate_; 155 EventDispatcherDelegate* delegate_;
154 ServerWindow* root_; 156 ServerWindow* root_;
(...skipping 19 matching lines...) Expand all
174 // cancel or up. 176 // cancel or up.
175 PointerIdToTargetMap pointer_targets_; 177 PointerIdToTargetMap pointer_targets_;
176 178
177 DISALLOW_COPY_AND_ASSIGN(EventDispatcher); 179 DISALLOW_COPY_AND_ASSIGN(EventDispatcher);
178 }; 180 };
179 181
180 } // namespace ws 182 } // namespace ws
181 } // namespace mus 183 } // namespace mus
182 184
183 #endif // COMPONENTS_MUS_WS_EVENT_DISPATCHER_H_ 185 #endif // COMPONENTS_MUS_WS_EVENT_DISPATCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698