Chromium Code Reviews| 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 CONTENT_PUBLIC_COMMON_CURSOR_INFO_H_ | |
| 6 #define CONTENT_PUBLIC_COMMON_CURSOR_INFO_H_ | |
| 7 | |
| 8 #include "build/build_config.h" | |
| 9 #include "content/common/content_export.h" | |
| 10 #include "third_party/WebKit/public/platform/WebCursorInfo.h" | |
| 11 #include "third_party/skia/include/core/SkBitmap.h" | |
| 12 | |
| 13 namespace content { | |
| 14 | |
| 15 // This struct represents the data sufficient to create a cross-platform cursor: | |
| 16 // either a predefined cursor type (from WebCursorInfo) or custom image. | |
| 17 struct CONTENT_EXPORT CursorInfo { | |
| 18 explicit CursorInfo(blink::WebCursorInfo::Type cursor_type) | |
| 19 : type(cursor_type), image_scale_factor(1) {} | |
| 20 | |
| 21 CursorInfo() | |
| 22 : type(blink::WebCursorInfo::kTypePointer), image_scale_factor(1) {} | |
| 23 | |
| 24 // One of the predefined cursors. | |
| 25 blink::WebCursorInfo::Type type; | |
| 26 | |
| 27 // Custom cursor image. | |
| 28 SkBitmap custom_image; | |
| 29 | |
| 30 // Hotspot in custom image in pixels. | |
| 31 gfx::Point hotspot; | |
| 32 | |
| 33 // 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.
| |
| 34 // different density display. | |
| 35 float image_scale_factor; | |
| 36 }; | |
| 37 | |
| 38 } // namespace content | |
| 39 | |
| 40 #endif // CONTENT_PUBLIC_COMMON_CURSOR_INFO_H_ | |
| OLD | NEW |