Chromium Code Reviews| 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/devices/device_data_manager.h" | 5 #include "ui/events/devices/device_data_manager.h" |
| 6 | 6 |
| 7 #include "base/at_exit.h" | 7 #include "base/at_exit.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "ui/display/display.h" | 10 #include "ui/display/display.h" |
| 11 #include "ui/events/devices/input_device_event_observer.h" | 11 #include "ui/events/devices/input_device_event_observer.h" |
| 12 #include "ui/gfx/geometry/point3_f.h" | 12 #include "ui/gfx/geometry/point3_f.h" |
| 13 | 13 |
| 14 // This macro provides the implementation for the observer notification methods. | 14 // This macro provides the implementation for the observer notification methods. |
| 15 #define NOTIFY_OBSERVERS(method_decl, observer_call) \ | 15 #define NOTIFY_OBSERVERS(method_decl, observer_call) \ |
| 16 void DeviceDataManager::method_decl { \ | 16 void DeviceDataManager::method_decl { \ |
| 17 FOR_EACH_OBSERVER(InputDeviceEventObserver, observers_, observer_call); \ | 17 for (InputDeviceEventObserver & observer : observers_) \ |
|
sky
2016/10/18 16:52:33
Remove space between InputDeviceEventObserver and
Eric Willigers
2016/10/18 22:55:43
Done.
| |
| 18 observer.observer_call; \ | |
| 18 } | 19 } |
| 19 | 20 |
| 20 namespace ui { | 21 namespace ui { |
| 21 | 22 |
| 22 namespace { | 23 namespace { |
| 23 | 24 |
| 24 bool InputDeviceEquals(const ui::InputDevice& a, const ui::InputDevice& b) { | 25 bool InputDeviceEquals(const ui::InputDevice& a, const ui::InputDevice& b) { |
| 25 return a.id == b.id; | 26 return a.id == b.id; |
| 26 } | 27 } |
| 27 | 28 |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 251 | 252 |
| 252 void DeviceDataManager::SetTouchscreensEnabled(bool enabled) { | 253 void DeviceDataManager::SetTouchscreensEnabled(bool enabled) { |
| 253 touch_screens_enabled_ = enabled; | 254 touch_screens_enabled_ = enabled; |
| 254 } | 255 } |
| 255 | 256 |
| 256 bool DeviceDataManager::AreTouchscreensEnabled() const { | 257 bool DeviceDataManager::AreTouchscreensEnabled() const { |
| 257 return touch_screens_enabled_; | 258 return touch_screens_enabled_; |
| 258 } | 259 } |
| 259 | 260 |
| 260 } // namespace ui | 261 } // namespace ui |
| OLD | NEW |