| 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 "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "third_party/WebKit/public/platform/WebCursorInfo.h" | 8 #include "third_party/WebKit/public/platform/WebCursorInfo.h" |
| 9 #include "ui/base/cursor/cursor.h" | 9 #include "ui/base/cursor/cursor.h" |
| 10 #include "ui/base/cursor/cursor_util.h" | 10 #include "ui/base/cursor/cursor_util.h" |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 } | 118 } |
| 119 | 119 |
| 120 void WebCursor::CreateScaledBitmapAndHotspotFromCustomData( | 120 void WebCursor::CreateScaledBitmapAndHotspotFromCustomData( |
| 121 SkBitmap* bitmap, | 121 SkBitmap* bitmap, |
| 122 gfx::Point* hotspot) { | 122 gfx::Point* hotspot) { |
| 123 if (custom_data_.empty()) | 123 if (custom_data_.empty()) |
| 124 return; | 124 return; |
| 125 ImageFromCustomData(bitmap); | 125 ImageFromCustomData(bitmap); |
| 126 *hotspot = hotspot_; | 126 *hotspot = hotspot_; |
| 127 ui::ScaleAndRotateCursorBitmapAndHotpoint( | 127 ui::ScaleAndRotateCursorBitmapAndHotpoint( |
| 128 GetCursorScaleFactor(), gfx::Display::ROTATE_0, bitmap, hotspot); | 128 GetCursorScaleFactor(), display::Display::ROTATE_0, bitmap, hotspot); |
| 129 } | 129 } |
| 130 | 130 |
| 131 // ozone has its own SetDisplayInfo that takes rotation into account | 131 // ozone has its own SetDisplayInfo that takes rotation into account |
| 132 #if !defined(USE_OZONE) | 132 #if !defined(USE_OZONE) |
| 133 void WebCursor::SetDisplayInfo(const gfx::Display& display) { | 133 void WebCursor::SetDisplayInfo(const display::Display& display) { |
| 134 if (device_scale_factor_ == display.device_scale_factor()) | 134 if (device_scale_factor_ == display.device_scale_factor()) |
| 135 return; | 135 return; |
| 136 | 136 |
| 137 device_scale_factor_ = display.device_scale_factor(); | 137 device_scale_factor_ = display.device_scale_factor(); |
| 138 CleanupPlatformData(); | 138 CleanupPlatformData(); |
| 139 } | 139 } |
| 140 #endif | 140 #endif |
| 141 | 141 |
| 142 } // namespace content | 142 } // namespace content |
| OLD | NEW |