Renamed some cursor types to their CSS names and added a way to handle custom cursors properly.
This commit is contained in:
parent
61e0219e91
commit
066c189249
4 changed files with 53 additions and 45 deletions
|
@ -1043,7 +1043,16 @@ void WebContents::EndFrameSubscription() {
|
|||
}
|
||||
|
||||
void WebContents::OnCursorChange(const content::WebCursor& cursor) {
|
||||
Emit("cursor-changed", CursorTypeToString(cursor));
|
||||
content::WebCursor::CursorInfo* info = new content::WebCursor::CursorInfo();
|
||||
cursor.GetCursorInfo(info);
|
||||
|
||||
if (cursor.IsCustom()) {
|
||||
Emit("cursor-changed", CursorTypeToString(info),
|
||||
gfx::Image::CreateFrom1xBitmap(info->custom_image),
|
||||
info->image_scale_factor);
|
||||
} else {
|
||||
Emit("cursor-changed", CursorTypeToString(info));
|
||||
}
|
||||
}
|
||||
|
||||
void WebContents::SetSize(const SetSizeParams& params) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue