Chromium Code Reviews| Index: content/public/common/cursor_info.h |
| diff --git a/content/public/common/cursor_info.h b/content/public/common/cursor_info.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..cdcac5b6598c47a163c9d516f7d2153ec7a8be5b |
| --- /dev/null |
| +++ b/content/public/common/cursor_info.h |
| @@ -0,0 +1,40 @@ |
| +// 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 CONTENT_PUBLIC_COMMON_CURSOR_INFO_H_ |
| +#define CONTENT_PUBLIC_COMMON_CURSOR_INFO_H_ |
| + |
| +#include "build/build_config.h" |
| +#include "content/common/content_export.h" |
| +#include "third_party/WebKit/public/platform/WebCursorInfo.h" |
| +#include "third_party/skia/include/core/SkBitmap.h" |
| + |
| +namespace content { |
| + |
| +// This struct represents the data sufficient to create a cross-platform cursor: |
| +// either a predefined cursor type (from WebCursorInfo) or custom image. |
| +struct CONTENT_EXPORT CursorInfo { |
| + explicit CursorInfo(blink::WebCursorInfo::Type cursor_type) |
| + : type(cursor_type), image_scale_factor(1) {} |
| + |
| + CursorInfo() |
| + : type(blink::WebCursorInfo::kTypePointer), image_scale_factor(1) {} |
| + |
| + // One of the predefined cursors. |
| + blink::WebCursorInfo::Type type; |
| + |
| + // Custom cursor image. |
| + SkBitmap custom_image; |
| + |
| + // Hotspot in custom image in pixels. |
| + gfx::Point hotspot; |
| + |
| + // The scale factor of custom image, used to possible re-scale the image for |
|
Avi (use Gerrit)
2017/04/13 22:12:31
... used to possibly re-scale ... for a different
dgozman
2017/04/13 23:21:09
Done.
|
| + // different density display. |
| + float image_scale_factor; |
| +}; |
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_PUBLIC_COMMON_CURSOR_INFO_H_ |