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

Side by Side Diff: content/browser/devtools/protocol/color_picker.cc

Issue 1975033002: Minor cleanup to webcursors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: delete another function Created 4 years, 7 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
« no previous file with comments | « no previous file | content/browser/renderer_host/input/touch_emulator.cc » ('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 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
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
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/input/touch_emulator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698