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

Side by Side Diff: ash/mus/accelerator_registrar_impl.h

Issue 1939133002: StructTraits to map mus::mojom::Event to unique_ptr<ui::Event> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed feedback. Created 4 years, 6 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 | « no previous file | ash/mus/accelerator_registrar_impl.cc » ('j') | 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 #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
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
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_
OLDNEW
« no previous file with comments | « no previous file | ash/mus/accelerator_registrar_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698