| Index: device/hid/hid_service_linux.h
|
| diff --git a/device/hid/hid_service_linux.h b/device/hid/hid_service_linux.h
|
| index ba58fada58d0c059c012497c213c66762fae35a5..03f0ac1adac5d2bdc3ad14ac25dbd2ee35d93980 100644
|
| --- a/device/hid/hid_service_linux.h
|
| +++ b/device/hid/hid_service_linux.h
|
| @@ -1,4 +1,4 @@
|
| -// Copyright (c) 2014 The Chromium Authors. All rights reserved.
|
| +// Copyright 2014 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.
|
|
|
| @@ -7,10 +7,14 @@
|
|
|
| #include <libudev.h>
|
|
|
| +#include <map>
|
| +#include <string>
|
| +
|
| #include "base/macros.h"
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/message_loop/message_pump_libevent.h"
|
| #include "device/hid/hid_device_info.h"
|
| +#include "device/hid/hid_platform_resource_bidi_map.h"
|
| #include "device/hid/hid_service.h"
|
|
|
| namespace device {
|
| @@ -50,7 +54,7 @@ class HidServiceLinux : public HidService,
|
| public:
|
| HidServiceLinux();
|
|
|
| - virtual scoped_refptr<HidConnection> Connect(std::string device_id) OVERRIDE;
|
| + virtual scoped_refptr<HidConnection> Connect(HidDeviceId device_id) OVERRIDE;
|
|
|
| // Implements base::MessagePumpLibevent::Watcher
|
| virtual void OnFileCanReadWithoutBlocking(int fd) OVERRIDE;
|
| @@ -60,14 +64,17 @@ class HidServiceLinux : public HidService,
|
| virtual ~HidServiceLinux();
|
|
|
| void Enumerate();
|
| - void PlatformDeviceAdd(udev_device* device);
|
| - void PlatformDeviceRemove(udev_device* raw_dev);
|
| + void PlatformAddDevice(udev_device* device);
|
| + void PlatformRemoveDevice(udev_device* raw_dev);
|
|
|
| scoped_ptr<udev, UdevDeleter> udev_;
|
| scoped_ptr<udev_monitor, UdevMonitorDeleter> monitor_;
|
| int monitor_fd_;
|
| base::MessagePumpLibevent::FileDescriptorWatcher monitor_watcher_;
|
|
|
| + // A 1:1 mapping between device ID and system path.
|
| + HidPlatformResourceBidiMap<std::string> platform_resource_map_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(HidServiceLinux);
|
| };
|
|
|
|
|