OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <libudev.h> | 5 #include <libudev.h> |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 return std::string(); | 70 return std::string(); |
71 std::string result; | 71 std::string result; |
72 base::TrimString(name, "\"", &result); | 72 base::TrimString(name, "\"", &result); |
73 return result; | 73 return result; |
74 } | 74 } |
75 | 75 |
76 class InputServiceLinuxImpl : public InputServiceLinux, | 76 class InputServiceLinuxImpl : public InputServiceLinux, |
77 public DeviceMonitorLinux::Observer { | 77 public DeviceMonitorLinux::Observer { |
78 public: | 78 public: |
79 // Implements DeviceMonitorLinux::Observer: | 79 // Implements DeviceMonitorLinux::Observer: |
80 virtual void OnDeviceAdded(udev_device* device) OVERRIDE; | 80 virtual void OnDeviceAdded(udev_device* device) override; |
81 virtual void OnDeviceRemoved(udev_device* device) OVERRIDE; | 81 virtual void OnDeviceRemoved(udev_device* device) override; |
82 | 82 |
83 private: | 83 private: |
84 friend class InputServiceLinux; | 84 friend class InputServiceLinux; |
85 | 85 |
86 InputServiceLinuxImpl(); | 86 InputServiceLinuxImpl(); |
87 virtual ~InputServiceLinuxImpl(); | 87 virtual ~InputServiceLinuxImpl(); |
88 | 88 |
89 DISALLOW_COPY_AND_ASSIGN(InputServiceLinuxImpl); | 89 DISALLOW_COPY_AND_ASSIGN(InputServiceLinuxImpl); |
90 }; | 90 }; |
91 | 91 |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 void InputServiceLinux::RemoveDevice(const std::string& id) { | 231 void InputServiceLinux::RemoveDevice(const std::string& id) { |
232 devices_.erase(id); | 232 devices_.erase(id); |
233 FOR_EACH_OBSERVER(Observer, observers_, OnInputDeviceRemoved(id)); | 233 FOR_EACH_OBSERVER(Observer, observers_, OnInputDeviceRemoved(id)); |
234 } | 234 } |
235 | 235 |
236 bool InputServiceLinux::CalledOnValidThread() const { | 236 bool InputServiceLinux::CalledOnValidThread() const { |
237 return thread_checker_.CalledOnValidThread(); | 237 return thread_checker_.CalledOnValidThread(); |
238 } | 238 } |
239 | 239 |
240 } // namespace device | 240 } // namespace device |
OLD | NEW |