Index: ui/events/ozone/event_factory_ozone.cc |
diff --git a/ui/events/ozone/event_factory_ozone.cc b/ui/events/ozone/event_factory_ozone.cc |
index 0cc699e04ebe334d7bbd1167d522b40febb2f4c1..3a56ddc968fefcfac468ba4e22bd72c7b8b4316c 100644 |
--- a/ui/events/ozone/event_factory_ozone.cc |
+++ b/ui/events/ozone/event_factory_ozone.cc |
@@ -11,17 +11,21 @@ namespace ui { |
// static |
EventFactoryOzone* EventFactoryOzone::impl_ = NULL; |
-EventFactoryOzone::EventFactoryOzone() {} |
+EventFactoryOzone::EventFactoryOzone() { |
+ CHECK(!impl_) << "There should only be a single EventFactoryOzone"; |
+ impl_ = this; |
+} |
-EventFactoryOzone::~EventFactoryOzone() {} |
+EventFactoryOzone::~EventFactoryOzone() { |
+ CHECK_EQ(impl_, this); |
+ impl_ = NULL; |
+} |
EventFactoryOzone* EventFactoryOzone::GetInstance() { |
CHECK(impl_) << "No EventFactoryOzone implementation set."; |
return impl_; |
} |
-void EventFactoryOzone::SetInstance(EventFactoryOzone* impl) { impl_ = impl; } |
- |
void EventFactoryOzone::StartProcessingEvents() {} |
void EventFactoryOzone::WarpCursorTo(gfx::AcceleratedWidget widget, |