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

Unified Diff: ui/base/ozone/event_converter_ozone.h

Issue 16466003: Event handling support for ozone. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: additional fixes Created 7 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 | « no previous file | ui/base/ozone/event_converter_ozone.cc » ('j') | ui/base/ozone/event_factory_ozone.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/ozone/event_converter_ozone.h
diff --git a/ui/base/ozone/event_converter_ozone.h b/ui/base/ozone/event_converter_ozone.h
new file mode 100644
index 0000000000000000000000000000000000000000..989a21a01b2c733b0589396148d667051f6e2e2d
--- /dev/null
+++ b/ui/base/ozone/event_converter_ozone.h
@@ -0,0 +1,36 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_BASE_OZONE_EVENT_CONVERTER_OZONE_H_
+#define UI_BASE_OZONE_EVENT_CONVERTER_OZONE_H_
+
+#include "base/message_pump_libevent.h"
+
+namespace ui {
+class Event;
+
+// In ozone, Chrome reads events from file descriptors created from Linux device
+// drivers. The |MessagePumpLibevent::Watcher| parent class provides the
+// functionality to watch a file descriptor for the arrival of new data and
+// notify its subclasses. Device-specific event converters turn bytes read from
+// the file descriptor into |ui::Event| instances. This class provides the
+// functionality needed in common across all converters: dispatching the
+// |ui::Event| to aura.
+class EventConverterOzone : public base::MessagePumpLibevent::Watcher {
+ public:
+ EventConverterOzone() {}
sky 2013/06/07 04:57:25 The style guide says no to inlining of constructor
rjkroege 2013/06/07 21:10:42 Done.
+ virtual ~EventConverterOzone() {}
+
+ protected:
+ // Subclasses should use this method to post a task that will dispatch
+ // |event| from the UI message loop. This method takes ownership of
+ // |event|. |event| will be deleted at the end of the posted task.
+ void DispatchEvent(ui::Event* event);
sky 2013/06/07 04:57:25 scoped_ptr<ui::Event> event to make ownership clea
rjkroege 2013/06/07 21:10:42 done.
+
+ DISALLOW_COPY_AND_ASSIGN(EventConverterOzone);
sky 2013/06/07 04:57:25 private:
rjkroege 2013/06/07 21:10:42 Done.
+};
+
+} // namespace ui
+
+#endif // UI_BASE_OZONE_EVENT_CONVERTER_OZONE_H_
« no previous file with comments | « no previous file | ui/base/ozone/event_converter_ozone.cc » ('j') | ui/base/ozone/event_factory_ozone.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698