| Index: ui/events/ozone/evdev/scoped_input_device.h
|
| diff --git a/ui/events/ozone/evdev/scoped_input_device.h b/ui/events/ozone/evdev/scoped_input_device.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..24d8aa58c27d3a3a006ce6dc5357b12ed37e598d
|
| --- /dev/null
|
| +++ b/ui/events/ozone/evdev/scoped_input_device.h
|
| @@ -0,0 +1,25 @@
|
| +// Copyright 2017 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_SCOPED_INPUT_DEVICE_H_
|
| +#define UI_EVENTS_OZONE_EVDEV_SCOPED_INPUT_DEVICE_H_
|
| +
|
| +#include "base/scoped_generic.h"
|
| +
|
| +namespace ui {
|
| +namespace internal {
|
| +
|
| +struct ScopedInputDeviceCloseTraits {
|
| + static int InvalidValue() { return -1; }
|
| + static void Free(int fd);
|
| +};
|
| +
|
| +} // namespace internal
|
| +
|
| +typedef base::ScopedGeneric<int, internal::ScopedInputDeviceCloseTraits>
|
| + ScopedInputDevice;
|
| +
|
| +} // namespace ui
|
| +
|
| +#endif // UI_EVENTS_OZONE_EVDEV_SCOPED_INPUT_DEVICE_H_
|
|
|