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

Unified Diff: remoting/base/cursor_shape_data.h

Issue 10382184: [Chromoting] Initial plumbing for cursor shape. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove extra LOGs Created 8 years, 7 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
« no previous file with comments | « no previous file | remoting/base/cursor_shape_data.cc » ('j') | remoting/client/chromoting_client.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
« no previous file with comments | « no previous file | remoting/base/cursor_shape_data.cc » ('j') | remoting/client/chromoting_client.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698