| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/browser/devtools/protocol/color_picker.h" | 5 #include "content/browser/devtools/protocol/color_picker.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 #include "content/browser/renderer_host/render_view_host_impl.h" | 9 #include "content/browser/renderer_host/render_view_host_impl.h" |
| 10 #include "content/browser/renderer_host/render_widget_host_view_base.h" | 10 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 canvas.drawCircle(kCursorSize / 2, kCursorSize / 2, kDiameter / 2, paint); | 246 canvas.drawCircle(kCursorSize / 2, kCursorSize / 2, kDiameter / 2, paint); |
| 247 | 247 |
| 248 WebCursor cursor; | 248 WebCursor cursor; |
| 249 WebCursor::CursorInfo cursor_info; | 249 WebCursor::CursorInfo cursor_info; |
| 250 cursor_info.type = blink::WebCursorInfo::TypeCustom; | 250 cursor_info.type = blink::WebCursorInfo::TypeCustom; |
| 251 cursor_info.image_scale_factor = device_scale_factor; | 251 cursor_info.image_scale_factor = device_scale_factor; |
| 252 cursor_info.custom_image = result; | 252 cursor_info.custom_image = result; |
| 253 cursor_info.hotspot = | 253 cursor_info.hotspot = |
| 254 gfx::Point(kHotspotOffset * device_scale_factor, | 254 gfx::Point(kHotspotOffset * device_scale_factor, |
| 255 kHotspotOffset * device_scale_factor); | 255 kHotspotOffset * device_scale_factor); |
| 256 #if defined(OS_WIN) | |
| 257 cursor_info.external_handle = 0; | |
| 258 #endif | |
| 259 | 256 |
| 260 cursor.InitFromCursorInfo(cursor_info); | 257 cursor.InitFromCursorInfo(cursor_info); |
| 261 DCHECK(host_); | 258 DCHECK(host_); |
| 262 host_->SetCursor(cursor); | 259 host_->SetCursor(cursor); |
| 263 } | 260 } |
| 264 | 261 |
| 265 } // namespace page | 262 } // namespace page |
| 266 } // namespace devtools | 263 } // namespace devtools |
| 267 } // namespace content | 264 } // namespace content |
| OLD | NEW |