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

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

Issue 858333006: [PATCH 9.6/11] ozone: evdev: Remove extra PostTask during dispatch from EventFactoryEvdev (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 10 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 protected: 75 protected:
76 // DeviceEventObserver overrides: 76 // DeviceEventObserver overrides:
77 // 77 //
78 // Callback for device add (on UI thread). 78 // Callback for device add (on UI thread).
79 void OnDeviceEvent(const DeviceEvent& event) override; 79 void OnDeviceEvent(const DeviceEvent& event) override;
80 80
81 // PlatformEventSource: 81 // PlatformEventSource:
82 void OnDispatcherListChanged() override; 82 void OnDispatcherListChanged() override;
83 83
84 private: 84 private:
85 // Post a task to dispatch an event.
86 virtual void PostUiEvent(scoped_ptr<Event> event);
87
88 // Dispatch event via PlatformEventSource. 85 // Dispatch event via PlatformEventSource.
89 void DispatchUiEventTask(scoped_ptr<Event> event); 86 void DispatchUiEvent(ui::Event* event);
90 87
91 int NextDeviceId(); 88 int NextDeviceId();
92 89
93 // Used to uniquely identify input devices. 90 // Used to uniquely identify input devices.
94 int last_device_id_; 91 int last_device_id_;
95 92
96 // Interface for scanning & monitoring input devices. 93 // Interface for scanning & monitoring input devices.
97 DeviceManager* device_manager_; // Not owned. 94 DeviceManager* device_manager_; // Not owned.
98 95
99 // Factory for per-device objects. 96 // Factory for per-device objects.
100 scoped_ptr<InputDeviceFactoryEvdev> input_device_factory_; 97 scoped_ptr<InputDeviceFactoryEvdev> input_device_factory_;
101 98
102 // Dispatch callback for events.
103 EventDispatchCallback dispatch_callback_;
104
105 // Modifier key state (shift, ctrl, etc). 99 // Modifier key state (shift, ctrl, etc).
106 EventModifiersEvdev modifiers_; 100 EventModifiersEvdev modifiers_;
107 101
108 // Mouse button map. 102 // Mouse button map.
109 MouseButtonMapEvdev button_map_; 103 MouseButtonMapEvdev button_map_;
110 104
111 // Keyboard state. 105 // Keyboard state.
112 KeyboardEvdev keyboard_; 106 KeyboardEvdev keyboard_;
113 107
114 // Cursor movement. 108 // Cursor movement.
115 CursorDelegateEvdev* cursor_; 109 CursorDelegateEvdev* cursor_;
116 110
117 // Object for controlling input devices. 111 // Object for controlling input devices.
118 InputControllerEvdev input_controller_; 112 InputControllerEvdev input_controller_;
119 113
120 // Whether we've set up the device factory & done initial scan. 114 // Whether we've set up the device factory & done initial scan.
121 bool initialized_; 115 bool initialized_;
122 116
123 // Support weak pointers for attach & detach callbacks. 117 // Support weak pointers for attach & detach callbacks.
124 base::WeakPtrFactory<EventFactoryEvdev> weak_ptr_factory_; 118 base::WeakPtrFactory<EventFactoryEvdev> weak_ptr_factory_;
125 119
126 DISALLOW_COPY_AND_ASSIGN(EventFactoryEvdev); 120 DISALLOW_COPY_AND_ASSIGN(EventFactoryEvdev);
127 }; 121 };
128 122
129 } // namespace ui 123 } // namespace ui
130 124
131 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_FACTORY_EVDEV_H_ 125 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_FACTORY_EVDEV_H_
OLDNEW
« no previous file with comments | « ui/events/ozone/evdev/event_dispatch_callback.h ('k') | ui/events/ozone/evdev/event_factory_evdev.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698