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

Unified Diff: services/ui/common/image_cursors_set.h

Issue 2979933002: Add support to the UI Service to run it inside the browser's process. (Closed)
Patch Set: Rebase Created 3 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: services/ui/common/image_cursors_set.h
diff --git a/services/ui/common/image_cursors_set.h b/services/ui/common/image_cursors_set.h
new file mode 100644
index 0000000000000000000000000000000000000000..cf775eca01c615b94aa76beb0665c79fbb9ef6c7
--- /dev/null
+++ b/services/ui/common/image_cursors_set.h
@@ -0,0 +1,36 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef SERVICES_UI_COMMON_IMAGE_CURSORS_SET_H_
+#define SERVICES_UI_COMMON_IMAGE_CURSORS_SET_H_
+
+#include <memory>
+#include <set>
+
+#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.
+
+namespace ui {
+
+class ImageCursors;
+
+// Helper class wrapping a set of ImageCursors objects.
+class ImageCursorsSet {
+ public:
+ ImageCursorsSet();
+ virtual ~ImageCursorsSet();
sky 2017/07/13 17:14:58 Is the virtual needed?
mfomitchev 2017/07/13 17:53:06 Removed
+
+ void AddImageCursors(std::unique_ptr<ImageCursors> image_cursors);
+ 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.
+ base::WeakPtr<ImageCursorsSet> GetWeakPtr();
+
+ private:
+ std::set<std::unique_ptr<ImageCursors>> image_cursors_set_;
+ base::WeakPtrFactory<ImageCursorsSet> weak_ptr_factory_;
+
+ DISALLOW_COPY_AND_ASSIGN(ImageCursorsSet);
+};
+
+} // namespace ui
+
+#endif // SERVICES_UI_COMMON_IMAGE_CURSORS_SET_H_

Powered by Google App Engine
This is Rietveld 408576698