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

Unified Diff: ui/base/cursor/image_cursors.cc

Issue 2949353003: Implement large cursors in Mushrome. (Closed)
Patch Set: rename everything to CursorSize Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/base/cursor/image_cursors.h ('k') | ui/views/mus/desktop_window_tree_host_mus.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/cursor/image_cursors.cc
diff --git a/ui/base/cursor/image_cursors.cc b/ui/base/cursor/image_cursors.cc
index 6b6eea732ff671075e217641152a86f3f92979d2..93c25a9ae3d32f7c4b4a82167d5067b5486e5792 100644
--- a/ui/base/cursor/image_cursors.cc
+++ b/ui/base/cursor/image_cursors.cc
@@ -60,8 +60,7 @@ const CursorType kAnimatedCursorIds[] = {CursorType::kWait,
} // namespace
-ImageCursors::ImageCursors() : cursor_set_(CURSOR_SET_NORMAL) {
-}
+ImageCursors::ImageCursors() : cursor_size_(CursorSize::kNormal) {}
ImageCursors::~ImageCursors() {
}
@@ -109,22 +108,18 @@ void ImageCursors::ReloadCursors() {
for (size_t i = 0; i < arraysize(kImageCursorIds); ++i) {
int resource_id = -1;
gfx::Point hot_point;
- bool success = GetCursorDataFor(cursor_set_,
- kImageCursorIds[i],
- device_scale_factor,
- &resource_id,
- &hot_point);
+ bool success =
+ GetCursorDataFor(cursor_size_, kImageCursorIds[i], device_scale_factor,
+ &resource_id, &hot_point);
DCHECK(success);
cursor_loader_->LoadImageCursor(kImageCursorIds[i], resource_id, hot_point);
}
for (size_t i = 0; i < arraysize(kAnimatedCursorIds); ++i) {
int resource_id = -1;
gfx::Point hot_point;
- bool success = GetAnimatedCursorDataFor(cursor_set_,
- kAnimatedCursorIds[i],
- device_scale_factor,
- &resource_id,
- &hot_point);
+ bool success =
+ GetAnimatedCursorDataFor(cursor_size_, kAnimatedCursorIds[i],
+ device_scale_factor, &resource_id, &hot_point);
DCHECK(success);
cursor_loader_->LoadAnimatedCursor(kAnimatedCursorIds[i],
resource_id,
@@ -133,11 +128,11 @@ void ImageCursors::ReloadCursors() {
}
}
-void ImageCursors::SetCursorSet(CursorSetType cursor_set) {
- if (cursor_set_ == cursor_set)
+void ImageCursors::SetCursorSize(CursorSize cursor_size) {
+ if (cursor_size_ == cursor_size)
return;
- cursor_set_ = cursor_set;
+ cursor_size_ = cursor_size;
if (cursor_loader_.get())
ReloadCursors();
« no previous file with comments | « ui/base/cursor/image_cursors.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