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/macros.h" |
| 12 #include "base/memory/weak_ptr.h" |
| 13 |
| 14 namespace ui { |
| 15 |
| 16 class ImageCursors; |
| 17 |
| 18 // Helper class wrapping a set of ImageCursors objects. |
| 19 class ImageCursorsSet { |
| 20 public: |
| 21 ImageCursorsSet(); |
| 22 ~ImageCursorsSet(); |
| 23 |
| 24 void AddImageCursors(std::unique_ptr<ImageCursors> image_cursors); |
| 25 void DeleteImageCursors(ImageCursors* image_cursors); |
| 26 base::WeakPtr<ImageCursorsSet> GetWeakPtr(); |
| 27 |
| 28 private: |
| 29 std::set<std::unique_ptr<ImageCursors>> image_cursors_set_; |
| 30 base::WeakPtrFactory<ImageCursorsSet> weak_ptr_factory_; |
| 31 |
| 32 DISALLOW_COPY_AND_ASSIGN(ImageCursorsSet); |
| 33 }; |
| 34 |
| 35 } // namespace ui |
| 36 |
| 37 #endif // SERVICES_UI_COMMON_IMAGE_CURSORS_SET_H_ |
OLD | NEW |