| 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 #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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 | 172 |
| 173 // Used to observe a window. Can be called multiple times on a window. To | 173 // Used to observe a window. Can be called multiple times on a window. To |
| 174 // unobserve a window, UnobserveWindow() should be called the same number of | 174 // unobserve a window, UnobserveWindow() should be called the same number of |
| 175 // times. | 175 // times. |
| 176 void ObserveWindow(ServerWindow* winodw); | 176 void ObserveWindow(ServerWindow* winodw); |
| 177 void UnobserveWindow(ServerWindow* winodw); | 177 void UnobserveWindow(ServerWindow* winodw); |
| 178 | 178 |
| 179 // Returns an Accelerator bound to the specified code/flags, and of the | 179 // Returns an Accelerator bound to the specified code/flags, and of the |
| 180 // matching |phase|. Otherwise returns null. | 180 // matching |phase|. Otherwise returns null. |
| 181 Accelerator* FindAccelerator(const ui::KeyEvent& event, | 181 Accelerator* FindAccelerator(const ui::KeyEvent& event, |
| 182 const mojom::AcceleratorPhase phase); | 182 const ui::mojom::AcceleratorPhase phase); |
| 183 | 183 |
| 184 // ServerWindowObserver: | 184 // ServerWindowObserver: |
| 185 void OnWillChangeWindowHierarchy(ServerWindow* window, | 185 void OnWillChangeWindowHierarchy(ServerWindow* window, |
| 186 ServerWindow* new_parent, | 186 ServerWindow* new_parent, |
| 187 ServerWindow* old_parent) override; | 187 ServerWindow* old_parent) override; |
| 188 void OnWindowVisibilityChanged(ServerWindow* window) override; | 188 void OnWindowVisibilityChanged(ServerWindow* window) override; |
| 189 void OnWindowDestroyed(ServerWindow* window) override; | 189 void OnWindowDestroyed(ServerWindow* window) override; |
| 190 | 190 |
| 191 EventDispatcherDelegate* delegate_; | 191 EventDispatcherDelegate* delegate_; |
| 192 ServerWindow* root_; | 192 ServerWindow* root_; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 217 // Keeps track of number of observe requests for each observed window. | 217 // Keeps track of number of observe requests for each observed window. |
| 218 std::map<const ServerWindow*, uint8_t> observed_windows_; | 218 std::map<const ServerWindow*, uint8_t> observed_windows_; |
| 219 | 219 |
| 220 DISALLOW_COPY_AND_ASSIGN(EventDispatcher); | 220 DISALLOW_COPY_AND_ASSIGN(EventDispatcher); |
| 221 }; | 221 }; |
| 222 | 222 |
| 223 } // namespace ws | 223 } // namespace ws |
| 224 } // namespace mus | 224 } // namespace mus |
| 225 | 225 |
| 226 #endif // COMPONENTS_MUS_WS_EVENT_DISPATCHER_H_ | 226 #endif // COMPONENTS_MUS_WS_EVENT_DISPATCHER_H_ |
| OLD | NEW |