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

Side by Side Diff: content/common/cursors/webcursor.h

Issue 201473002: Move webcursors code from webkit/ to content. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes Created 6 years, 9 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 | Annotate | Revision Log
OLDNEW
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_COMMON_CURSORS_WEBCURSOR_H_ 5 #ifndef CONTENT_COMMON_CURSORS_WEBCURSOR_H_
6 #define WEBKIT_COMMON_CURSORS_WEBCURSOR_H_ 6 #define CONTENT_COMMON_CURSORS_WEBCURSOR_H_
7
8 #include <vector>
7 9
8 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "content/common/content_export.h"
9 #include "third_party/WebKit/public/platform/WebCursorInfo.h" 12 #include "third_party/WebKit/public/platform/WebCursorInfo.h"
10 #include "ui/gfx/display.h" 13 #include "ui/gfx/display.h"
11 #include "ui/gfx/native_widget_types.h" 14 #include "ui/gfx/native_widget_types.h"
12 #include "ui/gfx/point.h" 15 #include "ui/gfx/point.h"
13 #include "ui/gfx/size.h" 16 #include "ui/gfx/size.h"
14 #include "webkit/common/webkit_common_export.h"
15
16 #include <vector>
17 17
18 #if defined(USE_AURA) 18 #if defined(USE_AURA)
19 #include "ui/base/cursor/cursor.h" 19 #include "ui/base/cursor/cursor.h"
20 #endif 20 #endif
21 21
22 #if defined(OS_WIN) 22 #if defined(OS_WIN)
23 typedef struct HINSTANCE__* HINSTANCE; 23 typedef struct HINSTANCE__* HINSTANCE;
24 typedef struct HICON__* HICON; 24 typedef struct HICON__* HICON;
25 typedef HICON HCURSOR; 25 typedef HICON HCURSOR;
26 #elif defined(TOOLKIT_GTK) 26 #elif defined(TOOLKIT_GTK)
27 typedef struct _GdkCursor GdkCursor; 27 typedef struct _GdkCursor GdkCursor;
28 #elif defined(OS_MACOSX) 28 #elif defined(OS_MACOSX)
29 #ifdef __OBJC__ 29 #ifdef __OBJC__
30 @class NSCursor; 30 @class NSCursor;
31 #else 31 #else
32 class NSCursor; 32 class NSCursor;
33 #endif 33 #endif
34 #endif 34 #endif
35 35
36 class Pickle; 36 class Pickle;
37 class PickleIterator; 37 class PickleIterator;
38 38
39 // This class encapsulates a cross-platform description of a cursor. Platform 39 // This class encapsulates a cross-platform description of a cursor. Platform
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 WEBKIT_COMMON_EXPORT WebCursor { 43 class CONTENT_EXPORT WebCursor {
jam 2014/03/17 19:56:24 need to put this in the content namespace
tfarina 2014/03/19 04:17:19 Done.
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 = NULL;
51 #endif 51 #endif
52 } 52 }
53 53
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 gfx::Display::Rotation rotation_; 185 gfx::Display::Rotation rotation_;
186 #elif defined(OS_WIN) 186 #elif defined(OS_WIN)
187 // A custom cursor created from custom bitmap data by Webkit. 187 // A custom cursor created from custom bitmap data by Webkit.
188 HCURSOR custom_cursor_; 188 HCURSOR custom_cursor_;
189 #elif defined(TOOLKIT_GTK) 189 #elif defined(TOOLKIT_GTK)
190 // A custom cursor created that should be unref'ed from the destructor. 190 // A custom cursor created that should be unref'ed from the destructor.
191 GdkCursor* unref_; 191 GdkCursor* unref_;
192 #endif 192 #endif
193 }; 193 };
194 194
195 #endif // WEBKIT_COMMON_CURSORS_WEBCURSOR_H_ 195 #endif // CONTENT_COMMON_CURSORS_WEBCURSOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698