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

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

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr Created 4 years, 8 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 DeviceManager* device_manager, 52 DeviceManager* device_manager,
53 KeyboardLayoutEngine* keyboard_layout_engine); 53 KeyboardLayoutEngine* keyboard_layout_engine);
54 ~EventFactoryEvdev() override; 54 ~EventFactoryEvdev() override;
55 55
56 // Initialize. Must be called with a valid message loop. 56 // Initialize. Must be called with a valid message loop.
57 void Init(); 57 void Init();
58 58
59 void WarpCursorTo(gfx::AcceleratedWidget widget, 59 void WarpCursorTo(gfx::AcceleratedWidget widget,
60 const gfx::PointF& location); 60 const gfx::PointF& location);
61 61
62 scoped_ptr<SystemInputInjector> CreateSystemInputInjector(); 62 std::unique_ptr<SystemInputInjector> CreateSystemInputInjector();
63 63
64 InputControllerEvdev* input_controller() { return &input_controller_; } 64 InputControllerEvdev* input_controller() { return &input_controller_; }
65 65
66 // User input events. 66 // User input events.
67 void DispatchKeyEvent(const KeyEventParams& params); 67 void DispatchKeyEvent(const KeyEventParams& params);
68 void DispatchMouseMoveEvent(const MouseMoveEventParams& params); 68 void DispatchMouseMoveEvent(const MouseMoveEventParams& params);
69 void DispatchMouseButtonEvent(const MouseButtonEventParams& params); 69 void DispatchMouseButtonEvent(const MouseButtonEventParams& params);
70 void DispatchMouseWheelEvent(const MouseWheelEventParams& params); 70 void DispatchMouseWheelEvent(const MouseWheelEventParams& params);
71 void DispatchPinchEvent(const PinchEventParams& params); 71 void DispatchPinchEvent(const PinchEventParams& params);
72 void DispatchScrollEvent(const ScrollEventParams& params); 72 void DispatchScrollEvent(const ScrollEventParams& params);
(...skipping 19 matching lines...) Expand all
92 92
93 private: 93 private:
94 // Dispatch event via PlatformEventSource. 94 // Dispatch event via PlatformEventSource.
95 void DispatchUiEvent(ui::Event* event); 95 void DispatchUiEvent(ui::Event* event);
96 96
97 int NextDeviceId(); 97 int NextDeviceId();
98 98
99 // Device thread initialization. 99 // Device thread initialization.
100 void StartThread(); 100 void StartThread();
101 void OnThreadStarted( 101 void OnThreadStarted(
102 scoped_ptr<InputDeviceFactoryEvdevProxy> input_device_factory); 102 std::unique_ptr<InputDeviceFactoryEvdevProxy> input_device_factory);
103 103
104 // Used to uniquely identify input devices. 104 // Used to uniquely identify input devices.
105 int last_device_id_ = 0; 105 int last_device_id_ = 0;
106 106
107 // Interface for scanning & monitoring input devices. 107 // Interface for scanning & monitoring input devices.
108 DeviceManager* device_manager_; // Not owned. 108 DeviceManager* device_manager_; // Not owned.
109 109
110 // Proxy for input device factory (manages device I/O objects). 110 // Proxy for input device factory (manages device I/O objects).
111 // The real object lives on a different thread. 111 // The real object lives on a different thread.
112 scoped_ptr<InputDeviceFactoryEvdevProxy> input_device_factory_proxy_; 112 std::unique_ptr<InputDeviceFactoryEvdevProxy> input_device_factory_proxy_;
113 113
114 // Modifier key state (shift, ctrl, etc). 114 // Modifier key state (shift, ctrl, etc).
115 EventModifiersEvdev modifiers_; 115 EventModifiersEvdev modifiers_;
116 116
117 // Mouse button map. 117 // Mouse button map.
118 MouseButtonMapEvdev button_map_; 118 MouseButtonMapEvdev button_map_;
119 119
120 // Keyboard state. 120 // Keyboard state.
121 KeyboardEvdev keyboard_; 121 KeyboardEvdev keyboard_;
122 122
(...skipping 14 matching lines...) Expand all
137 137
138 // Support weak pointers for attach & detach callbacks. 138 // Support weak pointers for attach & detach callbacks.
139 base::WeakPtrFactory<EventFactoryEvdev> weak_ptr_factory_; 139 base::WeakPtrFactory<EventFactoryEvdev> weak_ptr_factory_;
140 140
141 DISALLOW_COPY_AND_ASSIGN(EventFactoryEvdev); 141 DISALLOW_COPY_AND_ASSIGN(EventFactoryEvdev);
142 }; 142 };
143 143
144 } // namespace ui 144 } // namespace ui
145 145
146 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_FACTORY_EVDEV_H_ 146 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_FACTORY_EVDEV_H_
OLDNEW
« no previous file with comments | « ui/events/ozone/evdev/event_converter_test_util.cc ('k') | ui/events/ozone/evdev/event_factory_evdev.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698