OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef WEBKIT_GLUE_WEBCURSOR_H_ | 5 #ifndef WEBKIT_COMMON_CURSORS_WEBCURSOR_H_ |
6 #define WEBKIT_GLUE_WEBCURSOR_H_ | 6 #define WEBKIT_COMMON_CURSORS_WEBCURSOR_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h" | 9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h" |
10 #include "ui/gfx/native_widget_types.h" | 10 #include "ui/gfx/native_widget_types.h" |
11 #include "ui/gfx/point.h" | 11 #include "ui/gfx/point.h" |
12 #include "ui/gfx/size.h" | 12 #include "ui/gfx/size.h" |
13 #include "webkit/glue/webkit_glue_export.h" | 13 #include "webkit/common/webkit_common_export.h" |
14 | 14 |
15 #include <vector> | 15 #include <vector> |
16 | 16 |
17 #if defined(OS_WIN) | 17 #if defined(OS_WIN) |
18 typedef struct HINSTANCE__* HINSTANCE; | 18 typedef struct HINSTANCE__* HINSTANCE; |
19 typedef struct HICON__* HICON; | 19 typedef struct HICON__* HICON; |
20 typedef HICON HCURSOR; | 20 typedef HICON HCURSOR; |
21 #elif defined(TOOLKIT_GTK) | 21 #elif defined(TOOLKIT_GTK) |
22 typedef struct _GdkCursor GdkCursor; | 22 typedef struct _GdkCursor GdkCursor; |
23 #elif defined(OS_MACOSX) | 23 #elif defined(OS_MACOSX) |
24 #ifdef __OBJC__ | 24 #ifdef __OBJC__ |
25 @class NSCursor; | 25 @class NSCursor; |
26 #else | 26 #else |
27 class NSCursor; | 27 class NSCursor; |
28 #endif | 28 #endif |
29 #endif | 29 #endif |
30 | 30 |
31 class Pickle; | 31 class Pickle; |
32 class PickleIterator; | 32 class PickleIterator; |
33 | 33 |
34 // This class encapsulates a cross-platform description of a cursor. Platform | 34 // This class encapsulates a cross-platform description of a cursor. Platform |
35 // specific methods are provided to translate the cross-platform cursor into a | 35 // specific methods are provided to translate the cross-platform cursor into a |
36 // platform specific cursor. It is also possible to serialize / de-serialize a | 36 // platform specific cursor. It is also possible to serialize / de-serialize a |
37 // WebCursor. | 37 // WebCursor. |
38 class WEBKIT_GLUE_EXPORT WebCursor { | 38 class WEBKIT_COMMON_EXPORT WebCursor { |
39 public: | 39 public: |
40 struct CursorInfo { | 40 struct CursorInfo { |
41 explicit CursorInfo(WebKit::WebCursorInfo::Type cursor_type) | 41 explicit CursorInfo(WebKit::WebCursorInfo::Type cursor_type) |
42 : type(cursor_type), | 42 : type(cursor_type), |
43 image_scale_factor(1) { | 43 image_scale_factor(1) { |
44 #if defined(OS_WIN) | 44 #if defined(OS_WIN) |
45 external_handle = NULL; | 45 external_handle = NULL; |
46 #endif | 46 #endif |
47 } | 47 } |
48 | 48 |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 float device_scale_factor_; | 177 float device_scale_factor_; |
178 #elif defined(OS_WIN) | 178 #elif defined(OS_WIN) |
179 // A custom cursor created from custom bitmap data by Webkit. | 179 // A custom cursor created from custom bitmap data by Webkit. |
180 HCURSOR custom_cursor_; | 180 HCURSOR custom_cursor_; |
181 #elif defined(TOOLKIT_GTK) | 181 #elif defined(TOOLKIT_GTK) |
182 // A custom cursor created that should be unref'ed from the destructor. | 182 // A custom cursor created that should be unref'ed from the destructor. |
183 GdkCursor* unref_; | 183 GdkCursor* unref_; |
184 #endif | 184 #endif |
185 }; | 185 }; |
186 | 186 |
187 #endif // WEBKIT_GLUE_WEBCURSOR_H_ | 187 #endif // WEBKIT_COMMON_CURSORS_WEBCURSOR_H_ |
OLD | NEW |