OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef SERVICES_UI_COMMON_IMAGE_CURSORS_SET_H_ | |
6 #define SERVICES_UI_COMMON_IMAGE_CURSORS_SET_H_ | |
7 | |
8 #include <memory> | |
9 #include <set> | |
10 | |
11 #include "base/memory/weak_ptr.h" | |
sky
2017/07/13 17:14:58
inlucde base/macros too.
mfomitchev
2017/07/13 17:53:06
Done.
| |
12 | |
13 namespace ui { | |
14 | |
15 class ImageCursors; | |
16 | |
17 // Helper class wrapping a set of ImageCursors objects. | |
18 class ImageCursorsSet { | |
19 public: | |
20 ImageCursorsSet(); | |
21 virtual ~ImageCursorsSet(); | |
sky
2017/07/13 17:14:58
Is the virtual needed?
mfomitchev
2017/07/13 17:53:06
Removed
| |
22 | |
23 void AddImageCursors(std::unique_ptr<ImageCursors> image_cursors); | |
24 void RemoveImageCursors(ImageCursors* image_cursors); | |
sky
2017/07/13 17:14:58
How about naming this DeleteImageCursors given tha
mfomitchev
2017/07/13 17:53:06
Done.
| |
25 base::WeakPtr<ImageCursorsSet> GetWeakPtr(); | |
26 | |
27 private: | |
28 std::set<std::unique_ptr<ImageCursors>> image_cursors_set_; | |
29 base::WeakPtrFactory<ImageCursorsSet> weak_ptr_factory_; | |
30 | |
31 DISALLOW_COPY_AND_ASSIGN(ImageCursorsSet); | |
32 }; | |
33 | |
34 } // namespace ui | |
35 | |
36 #endif // SERVICES_UI_COMMON_IMAGE_CURSORS_SET_H_ | |
OLD | NEW |