| 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 #include "ui/base/cursor/cursor_loader_x11.h" |    5 #include "ui/base/cursor/cursor_loader_x11.h" | 
|    6  |    6  | 
|    7 #include <float.h> |    7 #include <float.h> | 
|    8 #include <X11/cursorfont.h> |    8 #include <X11/cursorfont.h> | 
|    9 #include <X11/Xlib.h> |    9 #include <X11/Xlib.h> | 
|   10  |   10  | 
| (...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  339   } |  339   } | 
|  340   if (cursor != None) { |  340   if (cursor != None) { | 
|  341     font_cursors_[id] = cursor; |  341     font_cursors_[id] = cursor; | 
|  342     return cursor; |  342     return cursor; | 
|  343   } |  343   } | 
|  344  |  344  | 
|  345   // If the theme is missing the desired cursor, use a chromium-supplied |  345   // If the theme is missing the desired cursor, use a chromium-supplied | 
|  346   // fallback icon. |  346   // fallback icon. | 
|  347   int resource_id; |  347   int resource_id; | 
|  348   gfx::Point point; |  348   gfx::Point point; | 
|  349   if (ui::GetCursorDataFor(ui::CURSOR_SET_NORMAL, id, scale(), &resource_id, |  349   if (ui::GetCursorDataFor(ui::CursorSize::kNormal, id, scale(), &resource_id, | 
|  350                            &point)) { |  350                            &point)) { | 
|  351     LoadImageCursor(id, resource_id, point); |  351     LoadImageCursor(id, resource_id, point); | 
|  352     return image_cursors_[id]->cursor; |  352     return image_cursors_[id]->cursor; | 
|  353   } |  353   } | 
|  354  |  354  | 
|  355   // As a last resort, return a left pointer. |  355   // As a last resort, return a left pointer. | 
|  356   cursor = XCreateFontCursor(display_, XC_left_ptr); |  356   cursor = XCreateFontCursor(display_, XC_left_ptr); | 
|  357   DCHECK(cursor); |  357   DCHECK(cursor); | 
|  358   font_cursors_[id] = cursor; |  358   font_cursors_[id] = cursor; | 
|  359   return cursor; |  359   return cursor; | 
|  360 } |  360 } | 
|  361  |  361  | 
|  362 }  // namespace ui |  362 }  // namespace ui | 
| OLD | NEW |