| 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 "content/common/cursors/webcursor.h" | 5 #include "content/common/cursors/webcursor.h" |
| 6 | 6 |
| 7 #include <X11/cursorfont.h> | 7 #include <X11/cursorfont.h> |
| 8 #include <X11/Xcursor/Xcursor.h> | 8 #include <X11/Xcursor/Xcursor.h> |
| 9 #include <X11/Xlib.h> | 9 #include <X11/Xlib.h> |
| 10 | |
| 11 #include "base/logging.h" | 10 #include "base/logging.h" |
| 12 #include "third_party/WebKit/public/platform/WebCursorInfo.h" | 11 #include "third_party/WebKit/public/platform/WebCursorInfo.h" |
| 13 #include "ui/base/cursor/cursor.h" | 12 #include "ui/base/cursor/cursor.h" |
| 14 #include "ui/base/cursor/cursor_loader_x11.h" | 13 #include "ui/base/cursor/cursor_loader_x11.h" |
| 15 #include "ui/base/x/x11_util.h" | 14 #include "ui/base/x/x11_util.h" |
| 15 #include "ui/base/x/x11_util_internal.h" |
| 16 | 16 |
| 17 namespace content { | 17 namespace content { |
| 18 | 18 |
| 19 ui::PlatformCursor WebCursor::GetPlatformCursor() { | 19 ui::PlatformCursor WebCursor::GetPlatformCursor() { |
| 20 if (platform_cursor_) | 20 if (platform_cursor_) |
| 21 return platform_cursor_; | 21 return platform_cursor_; |
| 22 | 22 |
| 23 SkBitmap bitmap; | 23 SkBitmap bitmap; |
| 24 gfx::Point hotspot; | 24 gfx::Point hotspot; |
| 25 CreateScaledBitmapAndHotspotFromCustomData(&bitmap, &hotspot); | 25 CreateScaledBitmapAndHotspotFromCustomData(&bitmap, &hotspot); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 if (platform_cursor_) | 57 if (platform_cursor_) |
| 58 ui::UnrefCustomXCursor(platform_cursor_); | 58 ui::UnrefCustomXCursor(platform_cursor_); |
| 59 platform_cursor_ = other.platform_cursor_; | 59 platform_cursor_ = other.platform_cursor_; |
| 60 if (platform_cursor_) | 60 if (platform_cursor_) |
| 61 ui::RefCustomXCursor(platform_cursor_); | 61 ui::RefCustomXCursor(platform_cursor_); |
| 62 | 62 |
| 63 device_scale_factor_ = other.device_scale_factor_; | 63 device_scale_factor_ = other.device_scale_factor_; |
| 64 } | 64 } |
| 65 | 65 |
| 66 } // namespace content | 66 } // namespace content |
| OLD | NEW |