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

Unified Diff: ui/ozone/platform/dri/dri_window.cc

Issue 527293002: ozone: Remove CursorFactoryOzone::SetCursor, GetCursorWindow (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/ozone/platform/dri/dri_window.h ('k') | ui/ozone/platform/dri/ozone_platform_dri.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/dri/dri_window.cc
diff --git a/ui/ozone/platform/dri/dri_window.cc b/ui/ozone/platform/dri/dri_window.cc
index 2ce243515e3fa8eadebf4f4cf437cc5363844750..cc186a58d597a2077288b85449c26322b90d4bda 100644
--- a/ui/ozone/platform/dri/dri_window.cc
+++ b/ui/ozone/platform/dri/dri_window.cc
@@ -7,6 +7,7 @@
#include "ui/events/event.h"
#include "ui/events/ozone/evdev/event_factory_evdev.h"
#include "ui/events/platform/platform_event_source.h"
+#include "ui/ozone/platform/dri/dri_cursor.h"
#include "ui/ozone/platform/dri/dri_window_delegate.h"
#include "ui/ozone/platform/dri/dri_window_manager.h"
#include "ui/ozone/public/cursor_factory_ozone.h"
@@ -18,13 +19,15 @@ DriWindow::DriWindow(PlatformWindowDelegate* delegate,
const gfx::Rect& bounds,
scoped_ptr<DriWindowDelegate> dri_window_delegate,
EventFactoryEvdev* event_factory,
- DriWindowManager* window_manager)
+ DriWindowManager* window_manager,
+ DriCursor* cursor)
: delegate_(delegate),
bounds_(bounds),
widget_(dri_window_delegate->GetAcceleratedWidget()),
dri_window_delegate_(dri_window_delegate.get()),
event_factory_(event_factory),
- window_manager_(window_manager) {
+ window_manager_(window_manager),
+ cursor_(cursor) {
window_manager_->AddWindowDelegate(widget_, dri_window_delegate.Pass());
}
@@ -70,7 +73,7 @@ void DriWindow::Minimize() {}
void DriWindow::Restore() {}
void DriWindow::SetCursor(PlatformCursor cursor) {
- ui::CursorFactoryOzone::GetInstance()->SetCursor(widget_, cursor);
+ cursor_->SetCursor(widget_, cursor);
}
void DriWindow::MoveCursorTo(const gfx::Point& location) {
@@ -81,7 +84,7 @@ bool DriWindow::CanDispatchEvent(const PlatformEvent& ne) {
DCHECK(ne);
Event* event = static_cast<Event*>(ne);
if (event->IsMouseEvent() || event->IsScrollEvent())
- return ui::CursorFactoryOzone::GetInstance()->GetCursorWindow() == widget_;
+ return cursor_->GetCursorWindow() == widget_;
return true;
}
« no previous file with comments | « ui/ozone/platform/dri/dri_window.h ('k') | ui/ozone/platform/dri/ozone_platform_dri.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698