| Index: ui/events/ozone/evdev/device_event_dispatcher_evdev.h
|
| diff --git a/ui/events/ozone/evdev/event_dispatch_callback.h b/ui/events/ozone/evdev/device_event_dispatcher_evdev.h
|
| similarity index 73%
|
| copy from ui/events/ozone/evdev/event_dispatch_callback.h
|
| copy to ui/events/ozone/evdev/device_event_dispatcher_evdev.h
|
| index 77dd488068deb3f60ab98ce4c6b9d907f431437e..f109c9f35af9a20d07a8a025b91b8689215f03e3 100644
|
| --- a/ui/events/ozone/evdev/event_dispatch_callback.h
|
| +++ b/ui/events/ozone/evdev/device_event_dispatcher_evdev.h
|
| @@ -1,11 +1,10 @@
|
| -// Copyright 2014 The Chromium Authors. All rights reserved.
|
| +// Copyright 2015 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_EVENTS_OZONE_EVDEV_EVENT_DISPATCH_CALLBACK_H_
|
| -#define UI_EVENTS_OZONE_EVDEV_EVENT_DISPATCH_CALLBACK_H_
|
| +#ifndef UI_EVENTS_OZONE_EVDEV_DEVICE_EVENT_DISPATCHER_H_
|
| +#define UI_EVENTS_OZONE_EVDEV_DEVICE_EVENT_DISPATCHER_H_
|
|
|
| -#include "base/callback.h"
|
| #include "base/time/time.h"
|
| #include "ui/events/event_constants.h"
|
| #include "ui/events/ozone/evdev/events_ozone_evdev_export.h"
|
| @@ -13,22 +12,8 @@
|
| #include "ui/gfx/geometry/vector2d.h"
|
| #include "ui/gfx/geometry/vector2d_f.h"
|
|
|
| -namespace base {
|
| -class TimeDelta;
|
| -}
|
| -
|
| -namespace gfx {
|
| -class PointF;
|
| -class Vector2d;
|
| -class Vector2dF;
|
| -}
|
| -
|
| namespace ui {
|
|
|
| -class Event;
|
| -
|
| -typedef base::Callback<void(scoped_ptr<Event>)> EventDispatchCallback;
|
| -
|
| struct EVENTS_OZONE_EVDEV_EXPORT KeyEventParams {
|
| KeyEventParams(int device_id, unsigned int code, bool down);
|
| KeyEventParams(const KeyEventParams& other);
|
| @@ -39,9 +24,6 @@ struct EVENTS_OZONE_EVDEV_EXPORT KeyEventParams {
|
| bool down;
|
| };
|
|
|
| -typedef base::Callback<void(const KeyEventParams& params)>
|
| - KeyEventDispatchCallback;
|
| -
|
| struct EVENTS_OZONE_EVDEV_EXPORT MouseMoveEventParams {
|
| MouseMoveEventParams(int device_id, const gfx::PointF& location);
|
| MouseMoveEventParams(const MouseMoveEventParams& other);
|
| @@ -51,9 +33,6 @@ struct EVENTS_OZONE_EVDEV_EXPORT MouseMoveEventParams {
|
| gfx::PointF location;
|
| };
|
|
|
| -typedef base::Callback<void(const MouseMoveEventParams& params)>
|
| - MouseMoveEventDispatchCallback;
|
| -
|
| struct EVENTS_OZONE_EVDEV_EXPORT MouseButtonEventParams {
|
| MouseButtonEventParams(int device_id,
|
| const gfx::PointF& location,
|
| @@ -70,9 +49,6 @@ struct EVENTS_OZONE_EVDEV_EXPORT MouseButtonEventParams {
|
| bool allow_remap;
|
| };
|
|
|
| -typedef base::Callback<void(const MouseButtonEventParams& params)>
|
| - MouseButtonEventDispatchCallback;
|
| -
|
| struct EVENTS_OZONE_EVDEV_EXPORT MouseWheelEventParams {
|
| MouseWheelEventParams(int device_id,
|
| const gfx::PointF& location,
|
| @@ -85,9 +61,6 @@ struct EVENTS_OZONE_EVDEV_EXPORT MouseWheelEventParams {
|
| gfx::Vector2d delta;
|
| };
|
|
|
| -typedef base::Callback<void(const MouseWheelEventParams& params)>
|
| - MouseWheelEventDispatchCallback;
|
| -
|
| struct EVENTS_OZONE_EVDEV_EXPORT ScrollEventParams {
|
| ScrollEventParams(int device_id,
|
| EventType type,
|
| @@ -108,9 +81,6 @@ struct EVENTS_OZONE_EVDEV_EXPORT ScrollEventParams {
|
| const base::TimeDelta timestamp;
|
| };
|
|
|
| -typedef base::Callback<void(const ScrollEventParams& params)>
|
| - ScrollEventDispatchCallback;
|
| -
|
| struct EVENTS_OZONE_EVDEV_EXPORT TouchEventParams {
|
| TouchEventParams(int device_id,
|
| int touch_id,
|
| @@ -131,9 +101,21 @@ struct EVENTS_OZONE_EVDEV_EXPORT TouchEventParams {
|
| base::TimeDelta timestamp;
|
| };
|
|
|
| -typedef base::Callback<void(const TouchEventParams& params)>
|
| - TouchEventDispatchCallback;
|
| +// Interface used by device objects for event dispatch.
|
| +class EVENTS_OZONE_EVDEV_EXPORT DeviceEventDispatcherEvdev {
|
| + public:
|
| + DeviceEventDispatcherEvdev() {}
|
| + virtual ~DeviceEventDispatcherEvdev() {}
|
| +
|
| + virtual void DispatchKeyEvent(const KeyEventParams& params) = 0;
|
| + virtual void DispatchMouseMoveEvent(const MouseMoveEventParams& params) = 0;
|
| + virtual void DispatchMouseButtonEvent(
|
| + const MouseButtonEventParams& params) = 0;
|
| + virtual void DispatchMouseWheelEvent(const MouseWheelEventParams& params) = 0;
|
| + virtual void DispatchScrollEvent(const ScrollEventParams& params) = 0;
|
| + virtual void DispatchTouchEvent(const TouchEventParams& params) = 0;
|
| +};
|
|
|
| -} // namspace ui
|
| +} // namespace ui
|
|
|
| -#endif // UI_EVENTS_OZONE_EVDEV_EVENT_DISPATCH_CALLBACK_H_
|
| +#endif // UI_EVENTS_OZONE_EVDEV_DEVICE_EVENT_DISPATCHER_H_
|
|
|