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

Side by Side Diff: content/common/cursors/webcursor_ozone.cc

Issue 538333002: gn/linux: warnings as errors, turn on Wextra (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 3 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 | « content/common/cursors/webcursor_aurax11.cc ('k') | net/tools/quic/quic_in_memory_cache.h » ('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/common/cursors/webcursor.h" 5 #include "content/common/cursors/webcursor.h"
6 6
7 #include "third_party/WebKit/public/platform/WebCursorInfo.h" 7 #include "third_party/WebKit/public/platform/WebCursorInfo.h"
8 #include "ui/base/cursor/cursor.h" 8 #include "ui/base/cursor/cursor.h"
9 #include "ui/base/cursor/cursor_util.h" 9 #include "ui/base/cursor/cursor_util.h"
10 #include "ui/ozone/public/cursor_factory_ozone.h" 10 #include "ui/ozone/public/cursor_factory_ozone.h"
11 11
12 namespace content { 12 namespace content {
13 13
14 const ui::PlatformCursor WebCursor::GetPlatformCursor() { 14 ui::PlatformCursor WebCursor::GetPlatformCursor() {
15 if (platform_cursor_) 15 if (platform_cursor_)
16 return platform_cursor_; 16 return platform_cursor_;
17 17
18 SkBitmap bitmap; 18 SkBitmap bitmap;
19 ImageFromCustomData(&bitmap); 19 ImageFromCustomData(&bitmap);
20 gfx::Point hotspot = hotspot_; 20 gfx::Point hotspot = hotspot_;
21 ui::ScaleAndRotateCursorBitmapAndHotpoint( 21 ui::ScaleAndRotateCursorBitmapAndHotpoint(
22 device_scale_factor_, rotation_, &bitmap, &hotspot); 22 device_scale_factor_, rotation_, &bitmap, &hotspot);
23 23
24 return ui::CursorFactoryOzone::GetInstance()->CreateImageCursor(bitmap, 24 return ui::CursorFactoryOzone::GetInstance()->CreateImageCursor(bitmap,
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 if (platform_cursor_) 68 if (platform_cursor_)
69 ui::CursorFactoryOzone::GetInstance()->UnrefImageCursor(platform_cursor_); 69 ui::CursorFactoryOzone::GetInstance()->UnrefImageCursor(platform_cursor_);
70 platform_cursor_ = other.platform_cursor_; 70 platform_cursor_ = other.platform_cursor_;
71 if (platform_cursor_) 71 if (platform_cursor_)
72 ui::CursorFactoryOzone::GetInstance()->RefImageCursor(platform_cursor_); 72 ui::CursorFactoryOzone::GetInstance()->RefImageCursor(platform_cursor_);
73 73
74 device_scale_factor_ = other.device_scale_factor_; 74 device_scale_factor_ = other.device_scale_factor_;
75 } 75 }
76 76
77 } // namespace content 77 } // namespace content
OLDNEW
« no previous file with comments | « content/common/cursors/webcursor_aurax11.cc ('k') | net/tools/quic/quic_in_memory_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698