Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(139)

Side by Side Diff: ui/events/ozone/evdev/event_factory_evdev.h

Issue 797483002: ozone: evdev: Populate keyboard list on DeviceDataManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #ifndef UI_EVENTS_OZONE_EVDEV_EVENT_FACTORY_EVDEV_H_ 5 #ifndef UI_EVENTS_OZONE_EVDEV_EVENT_FACTORY_EVDEV_H_
6 #define UI_EVENTS_OZONE_EVDEV_EVENT_FACTORY_EVDEV_H_ 6 #define UI_EVENTS_OZONE_EVDEV_EVENT_FACTORY_EVDEV_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 77
78 // Dispatch event via PlatformEventSource. 78 // Dispatch event via PlatformEventSource.
79 void DispatchUiEventTask(scoped_ptr<Event> event); 79 void DispatchUiEventTask(scoped_ptr<Event> event);
80 80
81 // Open device at path & starting processing events (on UI thread). 81 // Open device at path & starting processing events (on UI thread).
82 void AttachInputDevice(scoped_ptr<EventConverterEvdev> converter); 82 void AttachInputDevice(scoped_ptr<EventConverterEvdev> converter);
83 83
84 // Close device at path (on UI thread). 84 // Close device at path (on UI thread).
85 void DetachInputDevice(const base::FilePath& file_path); 85 void DetachInputDevice(const base::FilePath& file_path);
86 86
87 void NotifyHotplugEventObserver(const EventConverterEvdev& converter); 87 // Update observers on device changes.
88 void NotifyDeviceChange(const EventConverterEvdev& converter);
89 void NotifyKeyboardsUpdated();
90 void NotifyTouchscreensUpdated();
88 91
89 int NextDeviceId(); 92 int NextDeviceId();
90 93
91 // Owned per-device event converters (by path). 94 // Owned per-device event converters (by path).
92 std::map<base::FilePath, EventConverterEvdev*> converters_; 95 std::map<base::FilePath, EventConverterEvdev*> converters_;
93 96
94 // Used to uniquely identify input devices. 97 // Used to uniquely identify input devices.
95 int last_device_id_; 98 int last_device_id_;
96 99
97 // Interface for scanning & monitoring input devices. 100 // Interface for scanning & monitoring input devices.
(...skipping 27 matching lines...) Expand all
125 128
126 // Support weak pointers for attach & detach callbacks. 129 // Support weak pointers for attach & detach callbacks.
127 base::WeakPtrFactory<EventFactoryEvdev> weak_ptr_factory_; 130 base::WeakPtrFactory<EventFactoryEvdev> weak_ptr_factory_;
128 131
129 DISALLOW_COPY_AND_ASSIGN(EventFactoryEvdev); 132 DISALLOW_COPY_AND_ASSIGN(EventFactoryEvdev);
130 }; 133 };
131 134
132 } // namespace ui 135 } // namespace ui
133 136
134 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_FACTORY_EVDEV_H_ 137 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_FACTORY_EVDEV_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698