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

Side by Side Diff: content/public/common/cursor_info.h

Issue 2808763009: Allow content embedder to set a cursor for RenderWidgetHost (Closed)
Patch Set: comment Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « content/public/common/BUILD.gn ('k') | content/renderer/cursor_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 possibly re-scale the image
34 // for a different density display.
35 float image_scale_factor;
36 };
37
38 } // namespace content
39
40 #endif // CONTENT_PUBLIC_COMMON_CURSOR_INFO_H_
OLDNEW
« no previous file with comments | « content/public/common/BUILD.gn ('k') | content/renderer/cursor_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698