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 CONTENT_COMMON_CURSORS_WEBCURSOR_H_ | 5 #ifndef CONTENT_COMMON_CURSORS_WEBCURSOR_H_ |
6 #define CONTENT_COMMON_CURSORS_WEBCURSOR_H_ | 6 #define CONTENT_COMMON_CURSORS_WEBCURSOR_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 // specific methods are provided to translate the cross-platform cursor into a | 40 // specific methods are provided to translate the cross-platform cursor into a |
41 // platform specific cursor. It is also possible to serialize / de-serialize a | 41 // platform specific cursor. It is also possible to serialize / de-serialize a |
42 // WebCursor. | 42 // WebCursor. |
43 class CONTENT_EXPORT WebCursor { | 43 class CONTENT_EXPORT WebCursor { |
44 public: | 44 public: |
45 struct CursorInfo { | 45 struct CursorInfo { |
46 explicit CursorInfo(blink::WebCursorInfo::Type cursor_type) | 46 explicit CursorInfo(blink::WebCursorInfo::Type cursor_type) |
47 : type(cursor_type), | 47 : type(cursor_type), |
48 image_scale_factor(1) { | 48 image_scale_factor(1) { |
49 #if defined(OS_WIN) | 49 #if defined(OS_WIN) |
50 external_handle = NULL; | 50 external_handle = nullptr; |
51 #endif | 51 #endif |
52 } | 52 } |
53 | 53 |
54 CursorInfo() | 54 CursorInfo() |
55 : type(blink::WebCursorInfo::TypePointer), | 55 : type(blink::WebCursorInfo::TypePointer), |
56 image_scale_factor(1) { | 56 image_scale_factor(1) { |
57 #if defined(OS_WIN) | 57 #if defined(OS_WIN) |
58 external_handle = NULL; | 58 external_handle = nullptr; |
59 #endif | 59 #endif |
60 } | 60 } |
61 | 61 |
62 blink::WebCursorInfo::Type type; | 62 blink::WebCursorInfo::Type type; |
63 gfx::Point hotspot; | 63 gfx::Point hotspot; |
64 float image_scale_factor; | 64 float image_scale_factor; |
65 SkBitmap custom_image; | 65 SkBitmap custom_image; |
66 #if defined(OS_WIN) | 66 #if defined(OS_WIN) |
67 HCURSOR external_handle; | 67 HCURSOR external_handle; |
68 #endif | 68 #endif |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 #endif | 178 #endif |
179 | 179 |
180 #if defined(USE_OZONE) | 180 #if defined(USE_OZONE) |
181 gfx::Display::Rotation rotation_; | 181 gfx::Display::Rotation rotation_; |
182 #endif | 182 #endif |
183 }; | 183 }; |
184 | 184 |
185 } // namespace content | 185 } // namespace content |
186 | 186 |
187 #endif // CONTENT_COMMON_CURSORS_WEBCURSOR_H_ | 187 #endif // CONTENT_COMMON_CURSORS_WEBCURSOR_H_ |
OLD | NEW |