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

Unified Diff: ui/events/ozone/evdev/input_device_factory_proxy_evdev.h

Issue 875513005: [PATCH 10/11] ozone: evdev: Add a device factory proxy that forwards to device thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updates for events_unittests Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: ui/events/ozone/evdev/input_device_factory_proxy_evdev.h
diff --git a/ui/events/ozone/evdev/input_device_factory_proxy_evdev.h b/ui/events/ozone/evdev/input_device_factory_proxy_evdev.h
new file mode 100644
index 0000000000000000000000000000000000000000..dad5bbff05af75779f19ae444610c5eefbb8de17
--- /dev/null
+++ b/ui/events/ozone/evdev/input_device_factory_proxy_evdev.h
@@ -0,0 +1,56 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_EVENTS_OZONE_EVDEV_INPUT_DEVICE_FACTORY_PROXY_EVDEV_H_
+#define UI_EVENTS_OZONE_EVDEV_INPUT_DEVICE_FACTORY_PROXY_EVDEV_H_
+
+#include <set>
+
+#include "base/compiler_specific.h"
+#include "base/files/file_path.h"
+#include "base/memory/ref_counted.h"
+#include "base/memory/weak_ptr.h"
+#include "base/single_thread_task_runner.h"
+#include "ui/events/ozone/evdev/events_ozone_evdev_export.h"
+
+namespace ui {
+
+enum class DomCode;
+class InputDeviceFactoryEvdev;
+
+// UI-thread proxy for InputDeviceFactoryEvdev.
+class EVENTS_OZONE_EVDEV_EXPORT InputDeviceFactoryProxyEvdev {
+ public:
+ InputDeviceFactoryProxyEvdev(
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner,
+ base::WeakPtr<InputDeviceFactoryEvdev> input_device_factory);
+ ~InputDeviceFactoryProxyEvdev();
+
+ // See InputDeviceFactoryEvdev for docs. These calls simply forward to
+ // that object on another thread.
+ void AddInputDevice(int id, const base::FilePath& path);
+ void RemoveInputDevice(const base::FilePath& path);
+ void DisableInternalTouchpad();
+ void EnableInternalTouchpad();
+ void DisableInternalKeyboardExceptKeys(
+ scoped_ptr<std::set<DomCode>> excepted_keys);
+ void EnableInternalKeyboard();
+ void SetTouchpadSensitivity(int value);
+ void SetTapToClick(bool enabled);
+ void SetThreeFingerClick(bool enabled);
+ void SetTapDragging(bool enabled);
+ void SetNaturalScroll(bool enabled);
+ void SetMouseSensitivity(int value);
+ void SetTapToClickPaused(bool state);
+
+ private:
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
+ base::WeakPtr<InputDeviceFactoryEvdev> input_device_factory_;
+
+ DISALLOW_COPY_AND_ASSIGN(InputDeviceFactoryProxyEvdev);
+};
+
+} // namespace ui
+
+#endif // UI_EVENTS_OZONE_EVDEV_INPUT_DEVICE_FACTORY_PROXY_EVDEV_H_

Powered by Google App Engine
This is Rietveld 408576698