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

Side by Side Diff: ui/base/cursor/cursor_data.cc

Issue 2830703003: [views-mus] Support custom cursors. (Closed)
Patch Set: fix cast_shell_linux Created 3 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 | « ui/base/cursor/cursor_data.h ('k') | ui/views/mus/desktop_window_tree_host_mus.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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 "ui/base/cursor/cursor_data.h" 5 #include "ui/base/cursor/cursor_data.h"
6 6
7 #include "third_party/skia/include/core/SkBitmap.h" 7 #include "third_party/skia/include/core/SkBitmap.h"
8 #include "ui/base/cursor/cursor.h" 8 #include "ui/base/cursor/cursor.h"
9 9
10 namespace ui { 10 namespace ui {
(...skipping 12 matching lines...) Expand all
23 frame_delay_(frame_delay), 23 frame_delay_(frame_delay),
24 scale_factor_(scale_factor), 24 scale_factor_(scale_factor),
25 hotspot_(hotspot_point), 25 hotspot_(hotspot_point),
26 cursor_frames_(cursor_frames) { 26 cursor_frames_(cursor_frames) {
27 for (SkBitmap& bitmap : cursor_frames_) 27 for (SkBitmap& bitmap : cursor_frames_)
28 generator_ids_.push_back(bitmap.getGenerationID()); 28 generator_ids_.push_back(bitmap.getGenerationID());
29 } 29 }
30 30
31 CursorData::CursorData(const CursorData& cursor) = default; 31 CursorData::CursorData(const CursorData& cursor) = default;
32 32
33 CursorData::CursorData(CursorData&& cursor) = default;
34
33 CursorData::~CursorData() {} 35 CursorData::~CursorData() {}
34 36
35 CursorData& CursorData::operator=(const CursorData& cursor) = default; 37 CursorData& CursorData::operator=(const CursorData& cursor) = default;
36 38
39 CursorData& CursorData::operator=(CursorData&& cursor) = default;
40
37 bool CursorData::IsType(CursorType cursor_type) const { 41 bool CursorData::IsType(CursorType cursor_type) const {
38 return cursor_type_ == cursor_type; 42 return cursor_type_ == cursor_type;
39 } 43 }
40 44
41 bool CursorData::IsSameAs(const CursorData& rhs) const { 45 bool CursorData::IsSameAs(const CursorData& rhs) const {
42 return cursor_type_ == rhs.cursor_type_ && frame_delay_ == rhs.frame_delay_ && 46 return cursor_type_ == rhs.cursor_type_ && frame_delay_ == rhs.frame_delay_ &&
43 hotspot_ == rhs.hotspot_ && scale_factor_ == rhs.scale_factor_ && 47 hotspot_ == rhs.hotspot_ && scale_factor_ == rhs.scale_factor_ &&
44 generator_ids_ == rhs.generator_ids_; 48 generator_ids_ == rhs.generator_ids_;
45 } 49 }
46 50
47 } // namespace ui 51 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/cursor/cursor_data.h ('k') | ui/views/mus/desktop_window_tree_host_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698