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

Unified Diff: services/ui/ws/platform_display_default.cc

Issue 2268563003: Replaced CursorLoader in PlatformDisplay with a ImageCursor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years 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 | « services/ui/ws/platform_display_default.h ('k') | services/ui/ws/platform_display_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/platform_display_default.cc
diff --git a/services/ui/ws/platform_display_default.cc b/services/ui/ws/platform_display_default.cc
index 415306896fd640e559b21ce860768df1f1898fdd..c68d87d841c63d1dd4d19a362dd7e17c3ebf0dd7 100644
--- a/services/ui/ws/platform_display_default.cc
+++ b/services/ui/ws/platform_display_default.cc
@@ -8,7 +8,7 @@
#include "services/ui/display/screen_manager.h"
#include "services/ui/ws/platform_display_init_params.h"
#include "services/ui/ws/server_window.h"
-#include "ui/base/cursor/cursor_loader.h"
+#include "ui/base/cursor/image_cursors.h"
#include "ui/display/display.h"
#include "ui/events/event.h"
#include "ui/events/event_utils.h"
@@ -32,7 +32,7 @@ PlatformDisplayDefault::PlatformDisplayDefault(
const PlatformDisplayInitParams& init_params)
: display_id_(init_params.display_id),
#if !defined(OS_ANDROID)
- cursor_loader_(ui::CursorLoader::Create()),
+ image_cursors_(new ImageCursors),
#endif
frame_generator_(new FrameGenerator(this, init_params.root_window)),
metrics_(init_params.metrics) {
@@ -73,6 +73,10 @@ void PlatformDisplayDefault::Init(PlatformDisplayDelegate* delegate) {
#endif
platform_window_->Show();
+#if !defined(OS_ANDROID)
+ image_cursors_->SetDisplay(delegate_->GetDisplay(),
+ metrics_.device_scale_factor);
+#endif
}
int64_t PlatformDisplayDefault::GetId() const {
@@ -103,7 +107,7 @@ void PlatformDisplayDefault::SetCursorById(mojom::Cursor cursor_id) {
//
// We probably also need to deal with different DPIs.
ui::Cursor cursor(static_cast<int32_t>(cursor_id));
- cursor_loader_->SetPlatformCursor(&cursor);
+ image_cursors_->SetPlatformCursor(&cursor);
platform_window_->SetCursor(cursor.platform());
#endif
}
« no previous file with comments | « services/ui/ws/platform_display_default.h ('k') | services/ui/ws/platform_display_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698