| 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 "ui/events/ozone/device/device_manager_manual.h" | 5 #include "ui/events/ozone/device/device_manager_manual.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/files/file_enumerator.h" | 9 #include "base/files/file_enumerator.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 void DeviceManagerManual::RemoveObserver(DeviceEventObserver* observer) { | 59 void DeviceManagerManual::RemoveObserver(DeviceEventObserver* observer) { |
| 60 observers_.RemoveObserver(observer); | 60 observers_.RemoveObserver(observer); |
| 61 } | 61 } |
| 62 | 62 |
| 63 void DeviceManagerManual::OnDevicesScanned( | 63 void DeviceManagerManual::OnDevicesScanned( |
| 64 std::vector<base::FilePath>* result) { | 64 std::vector<base::FilePath>* result) { |
| 65 std::vector<base::FilePath>::const_iterator it = result->begin(); | 65 std::vector<base::FilePath>::const_iterator it = result->begin(); |
| 66 for (; it != result->end(); ++it) { | 66 for (; it != result->end(); ++it) { |
| 67 devices_.push_back(*it); | 67 devices_.push_back(*it); |
| 68 DeviceEvent event(DeviceEvent::INPUT, DeviceEvent::ADD, *it); | 68 DeviceEvent event(DeviceEvent::INPUT, DeviceEvent::ADD, *it); |
| 69 FOR_EACH_OBSERVER(DeviceEventObserver, observers_, OnDeviceEvent(event)); | 69 for (DeviceEventObserver& observer : observers_) |
| 70 observer.OnDeviceEvent(event); |
| 70 } | 71 } |
| 71 } | 72 } |
| 72 | 73 |
| 73 } // namespace ui | 74 } // namespace ui |
| OLD | NEW |