blob: 7610aff3f7c71dab23c368194a75ad9492ee5465 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
|
// Copyright (c) 2011 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.
#include "webkit/glue/webcursor.h"
#include "base/logging.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h"
#include "ui/aura/cursor.h"
using WebKit::WebCursorInfo;
gfx::NativeCursor WebCursor::GetNativeCursor() {
switch (type_) {
case WebCursorInfo::TypePointer:
return aura::kCursorPointer;
case WebCursorInfo::TypeCross:
return aura::kCursorCross;
case WebCursorInfo::TypeHand:
return aura::kCursorHand;
case WebCursorInfo::TypeIBeam:
return aura::kCursorIBeam;
case WebCursorInfo::TypeWait:
return aura::kCursorWait;
case WebCursorInfo::TypeHelp:
return aura::kCursorHelp;
case WebCursorInfo::TypeEastResize:
return aura::kCursorEastResize;
case WebCursorInfo::TypeNorthResize:
return aura::kCursorNorthResize;
case WebCursorInfo::TypeNorthEastResize:
return aura::kCursorNorthEastResize;
case WebCursorInfo::TypeNorthWestResize:
return aura::kCursorNorthWestResize;
case WebCursorInfo::TypeSouthResize:
return aura::kCursorSouthResize;
case WebCursorInfo::TypeSouthEastResize:
return aura::kCursorSouthEastResize;
case WebCursorInfo::TypeSouthWestResize:
return aura::kCursorSouthWestResize;
case WebCursorInfo::TypeWestResize:
return aura::kCursorWestResize;
case WebCursorInfo::TypeNorthSouthResize:
return aura::kCursorNorthSouthResize;
case WebCursorInfo::TypeEastWestResize:
return aura::kCursorEastWestResize;
case WebCursorInfo::TypeNorthEastSouthWestResize:
return aura::kCursorNorthEastSouthWestResize;
case WebCursorInfo::TypeNorthWestSouthEastResize:
return aura::kCursorNorthWestSouthEastResize;
case WebCursorInfo::TypeColumnResize:
return aura::kCursorColumnResize;
case WebCursorInfo::TypeRowResize:
return aura::kCursorRowResize;
case WebCursorInfo::TypeMiddlePanning:
return aura::kCursorMiddlePanning;
case WebCursorInfo::TypeEastPanning:
return aura::kCursorEastPanning;
case WebCursorInfo::TypeNorthPanning:
return aura::kCursorNorthPanning;
case WebCursorInfo::TypeNorthEastPanning:
return aura::kCursorNorthEastPanning;
case WebCursorInfo::TypeNorthWestPanning:
return aura::kCursorNorthWestPanning;
case WebCursorInfo::TypeSouthPanning:
return aura::kCursorSouthPanning;
case WebCursorInfo::TypeSouthEastPanning:
return aura::kCursorSouthEastPanning;
case WebCursorInfo::TypeSouthWestPanning:
return aura::kCursorSouthWestPanning;
case WebCursorInfo::TypeWestPanning:
return aura::kCursorWestPanning;
case WebCursorInfo::TypeMove:
return aura::kCursorMove;
case WebCursorInfo::TypeVerticalText:
return aura::kCursorVerticalText;
case WebCursorInfo::TypeCell:
return aura::kCursorCell;
case WebCursorInfo::TypeContextMenu:
return aura::kCursorContextMenu;
case WebCursorInfo::TypeAlias:
return aura::kCursorAlias;
case WebCursorInfo::TypeProgress:
return aura::kCursorProgress;
case WebCursorInfo::TypeNoDrop:
return aura::kCursorNoDrop;
case WebCursorInfo::TypeCopy:
return aura::kCursorCopy;
case WebCursorInfo::TypeNone:
return aura::kCursorNone;
case WebCursorInfo::TypeNotAllowed:
return aura::kCursorNotAllowed;
case WebCursorInfo::TypeZoomIn:
return aura::kCursorZoomIn;
case WebCursorInfo::TypeZoomOut:
return aura::kCursorZoomOut;
case WebCursorInfo::TypeGrab:
return aura::kCursorGrab;
case WebCursorInfo::TypeGrabbing:
return aura::kCursorGrabbing;
case WebCursorInfo::TypeCustom:
return aura::kCursorCustom;
default:
NOTREACHED();
return gfx::kNullCursor;
}
}
void WebCursor::InitPlatformData() {
}
bool WebCursor::SerializePlatformData(Pickle* pickle) const {
return true;
}
bool WebCursor::DeserializePlatformData(const Pickle* pickle, void** iter) {
return true;
}
bool WebCursor::IsPlatformDataEqual(const WebCursor& other) const {
return true;
}
void WebCursor::CleanupPlatformData() {
}
void WebCursor::CopyPlatformData(const WebCursor& other) {
}
|