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

Side by Side Diff: webkit/common/cursors/webcursor_gtk.cc

Issue 134823003: Define Panning cursors only on Windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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
« no previous file with comments | « webkit/common/cursors/webcursor_aura.cc ('k') | webkit/common/cursors/webcursor_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "webkit/common/cursors/webcursor.h" 5 #include "webkit/common/cursors/webcursor.h"
6 6
7 #include <gdk/gdk.h> 7 #include <gdk/gdk.h>
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 case WebCursorInfo::TypeEastWestResize: 84 case WebCursorInfo::TypeEastWestResize:
85 return GDK_SB_H_DOUBLE_ARROW; 85 return GDK_SB_H_DOUBLE_ARROW;
86 case WebCursorInfo::TypeNorthEastSouthWestResize: 86 case WebCursorInfo::TypeNorthEastSouthWestResize:
87 case WebCursorInfo::TypeNorthWestSouthEastResize: 87 case WebCursorInfo::TypeNorthWestSouthEastResize:
88 // There isn't really a useful cursor available for these. 88 // There isn't really a useful cursor available for these.
89 return GDK_LAST_CURSOR; 89 return GDK_LAST_CURSOR;
90 case WebCursorInfo::TypeColumnResize: 90 case WebCursorInfo::TypeColumnResize:
91 return GDK_SB_H_DOUBLE_ARROW; // TODO(evanm): is this correct? 91 return GDK_SB_H_DOUBLE_ARROW; // TODO(evanm): is this correct?
92 case WebCursorInfo::TypeRowResize: 92 case WebCursorInfo::TypeRowResize:
93 return GDK_SB_V_DOUBLE_ARROW; // TODO(evanm): is this correct? 93 return GDK_SB_V_DOUBLE_ARROW; // TODO(evanm): is this correct?
94 case WebCursorInfo::TypeMiddlePanning:
95 return GDK_FLEUR;
96 case WebCursorInfo::TypeEastPanning:
97 return GDK_SB_RIGHT_ARROW;
98 case WebCursorInfo::TypeNorthPanning:
99 return GDK_SB_UP_ARROW;
100 case WebCursorInfo::TypeNorthEastPanning:
101 return GDK_TOP_RIGHT_CORNER;
102 case WebCursorInfo::TypeNorthWestPanning:
103 return GDK_TOP_LEFT_CORNER;
104 case WebCursorInfo::TypeSouthPanning:
105 return GDK_SB_DOWN_ARROW;
106 case WebCursorInfo::TypeSouthEastPanning:
107 return GDK_BOTTOM_RIGHT_CORNER;
108 case WebCursorInfo::TypeSouthWestPanning:
109 return GDK_BOTTOM_LEFT_CORNER;
110 case WebCursorInfo::TypeWestPanning:
111 return GDK_SB_LEFT_ARROW;
112 case WebCursorInfo::TypeMove: 94 case WebCursorInfo::TypeMove:
113 return GDK_FLEUR; 95 return GDK_FLEUR;
114 case WebCursorInfo::TypeVerticalText: 96 case WebCursorInfo::TypeVerticalText:
115 return GDK_LAST_CURSOR; 97 return GDK_LAST_CURSOR;
116 case WebCursorInfo::TypeCell: 98 case WebCursorInfo::TypeCell:
117 return GDK_LAST_CURSOR; 99 return GDK_LAST_CURSOR;
118 case WebCursorInfo::TypeContextMenu: 100 case WebCursorInfo::TypeContextMenu:
119 return GDK_LAST_CURSOR; 101 return GDK_LAST_CURSOR;
120 case WebCursorInfo::TypeAlias: 102 case WebCursorInfo::TypeAlias:
121 return GDK_LAST_CURSOR; 103 return GDK_LAST_CURSOR;
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 unref_ = NULL; 195 unref_ = NULL;
214 } 196 }
215 return; 197 return;
216 } 198 }
217 199
218 void WebCursor::CopyPlatformData(const WebCursor& other) { 200 void WebCursor::CopyPlatformData(const WebCursor& other) {
219 if (other.unref_) 201 if (other.unref_)
220 unref_ = gdk_cursor_ref(other.unref_); 202 unref_ = gdk_cursor_ref(other.unref_);
221 return; 203 return;
222 } 204 }
OLDNEW
« no previous file with comments | « webkit/common/cursors/webcursor_aura.cc ('k') | webkit/common/cursors/webcursor_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698