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 ASH_MUS_ACCELERATOR_REGISTRAR_IMPL_H_ | 5 #ifndef ASH_MUS_ACCELERATOR_REGISTRAR_IMPL_H_ |
6 #define ASH_MUS_ACCELERATOR_REGISTRAR_IMPL_H_ | 6 #define ASH_MUS_ACCELERATOR_REGISTRAR_IMPL_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 22 matching lines...) Expand all Loading... |
33 uint32_t accelerator_namespace, | 33 uint32_t accelerator_namespace, |
34 mojo::InterfaceRequest<AcceleratorRegistrar> request, | 34 mojo::InterfaceRequest<AcceleratorRegistrar> request, |
35 const DestroyCallback& destroy_callback); | 35 const DestroyCallback& destroy_callback); |
36 | 36 |
37 void Destroy(); | 37 void Destroy(); |
38 | 38 |
39 // Returns true if this AcceleratorRegistrar has an accelerator with the | 39 // Returns true if this AcceleratorRegistrar has an accelerator with the |
40 // specified id. | 40 // specified id. |
41 bool OwnsAccelerator(uint32_t accelerator_id) const; | 41 bool OwnsAccelerator(uint32_t accelerator_id) const; |
42 | 42 |
43 void ProcessAccelerator(uint32_t accelerator_id, | 43 void ProcessAccelerator(uint32_t accelerator_id, const ui::Event& event); |
44 ::mus::mojom::EventPtr event); | |
45 | 44 |
46 private: | 45 private: |
47 struct Accelerator; | 46 struct Accelerator; |
48 | 47 |
49 ~AcceleratorRegistrarImpl() override; | 48 ~AcceleratorRegistrarImpl() override; |
50 | 49 |
51 uint32_t ComputeAcceleratorId(uint32_t accelerator_id) const; | 50 uint32_t ComputeAcceleratorId(uint32_t accelerator_id) const; |
52 void OnBindingGone(); | 51 void OnBindingGone(); |
53 void OnHandlerGone(); | 52 void OnHandlerGone(); |
54 | 53 |
(...skipping 19 matching lines...) Expand all Loading... |
74 std::map<uint32_t, Accelerator> accelerators_; | 73 std::map<uint32_t, Accelerator> accelerators_; |
75 DestroyCallback destroy_callback_; | 74 DestroyCallback destroy_callback_; |
76 | 75 |
77 DISALLOW_COPY_AND_ASSIGN(AcceleratorRegistrarImpl); | 76 DISALLOW_COPY_AND_ASSIGN(AcceleratorRegistrarImpl); |
78 }; | 77 }; |
79 | 78 |
80 } // namespace mus | 79 } // namespace mus |
81 } // namespace ash | 80 } // namespace ash |
82 | 81 |
83 #endif // ASH_MUS_ACCELERATOR_REGISTRAR_IMPL_H_ | 82 #endif // ASH_MUS_ACCELERATOR_REGISTRAR_IMPL_H_ |
OLD | NEW |