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

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

Issue 645673003: ozone: evdev: Minor refactor of device open (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months 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 "base/callback.h" 8 #include "base/callback.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 23 matching lines...) Expand all
34 DeviceManager* device_manager); 34 DeviceManager* device_manager);
35 virtual ~EventFactoryEvdev(); 35 virtual ~EventFactoryEvdev();
36 36
37 void DispatchUiEvent(Event* event); 37 void DispatchUiEvent(Event* event);
38 38
39 void WarpCursorTo(gfx::AcceleratedWidget widget, 39 void WarpCursorTo(gfx::AcceleratedWidget widget,
40 const gfx::PointF& location); 40 const gfx::PointF& location);
41 41
42 private: 42 private:
43 // Open device at path & starting processing events (on UI thread). 43 // Open device at path & starting processing events (on UI thread).
44 void AttachInputDevice(const base::FilePath& file_path, 44 void AttachInputDevice(scoped_ptr<EventConverterEvdev> converter);
45 scoped_ptr<EventConverterEvdev> converter);
46 45
47 // Close device at path (on UI thread). 46 // Close device at path (on UI thread).
48 void DetachInputDevice(const base::FilePath& file_path); 47 void DetachInputDevice(const base::FilePath& file_path);
49 48
50 void NotifyHotplugEventObserver(const EventConverterEvdev& converter); 49 void NotifyHotplugEventObserver(const EventConverterEvdev& converter);
51 50
52 int NextDeviceId(); 51 int NextDeviceId();
53 52
54 // DeviceEventObserver overrides: 53 // DeviceEventObserver overrides:
55 // 54 //
(...skipping 26 matching lines...) Expand all
82 81
83 // Support weak pointers for attach & detach callbacks. 82 // Support weak pointers for attach & detach callbacks.
84 base::WeakPtrFactory<EventFactoryEvdev> weak_ptr_factory_; 83 base::WeakPtrFactory<EventFactoryEvdev> weak_ptr_factory_;
85 84
86 DISALLOW_COPY_AND_ASSIGN(EventFactoryEvdev); 85 DISALLOW_COPY_AND_ASSIGN(EventFactoryEvdev);
87 }; 86 };
88 87
89 } // namespace ui 88 } // namespace ui
90 89
91 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_FACTORY_EVDEV_H_ 90 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_FACTORY_EVDEV_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698