Index: remoting/base/cursor_shape_data.h |
diff --git a/remoting/base/cursor_shape_data.h b/remoting/base/cursor_shape_data.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..a425ed614a0411d24563087a27aa8d2696f2bb1a |
--- /dev/null |
+++ b/remoting/base/cursor_shape_data.h |
@@ -0,0 +1,44 @@ |
+// Copyright (c) 2012 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 REMOTING_BASE_CURSOR_SHAPE_DATA_H_ |
+#define REMOTING_BASE_CURSOR_SHAPE_DATA_H_ |
+ |
+#include "base/basictypes.h" |
+#include "base/memory/ref_counted.h" |
+#include "base/memory/scoped_ptr.h" |
+#include "third_party/skia/include/core/SkSize.h" |
+ |
+namespace remoting { |
+ |
+// Stores cursor data to pass to the encoder. |
+class CursorShapeData : public base::RefCountedThreadSafe<CursorShapeData> { |
Wez
2012/05/23 00:01:57
This class just duplicates protocol::CursorShapeIn
Wez
2012/05/23 00:01:57
Why does this need to be RefCountedThreadSafe, rat
garykac
2012/05/26 01:58:01
Done.
garykac
2012/05/26 01:58:01
No longer applicable
|
+ public: |
+ CursorShapeData(); |
+ |
+ void Initialize(scoped_array<uint8> data, const SkISize& size, |
+ const SkISize& hotspot, const int bytes_per_pixel); |
+ |
+ // Return the cursor size. |
+ SkISize size() const { return size_; } |
+ |
+ // Return the cursor hotspot. |
+ SkISize hotspot() const { return hotspot_; } |
+ |
+ uint8* data() const { return data_.get(); } |
+ int bytes_per_pixel() const { return bytes_per_pixel_; } |
+ |
+ private: |
+ friend class base::RefCountedThreadSafe<CursorShapeData>; |
+ virtual ~CursorShapeData(); |
+ |
+ scoped_array<uint8> data_; |
+ SkISize size_; |
+ SkISize hotspot_; |
+ int bytes_per_pixel_; |
+}; |
+ |
+} // namespace remoting |
+ |
+#endif // REMOTING_BASE_CURSOR_SHAPE_DATA_H_ |