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

Unified Diff: ui/events/ozone/evdev/input_device_factory_evdev_proxy.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: rebase 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_evdev_proxy.h
diff --git a/ui/events/ozone/evdev/input_device_factory_evdev_proxy.h b/ui/events/ozone/evdev/input_device_factory_evdev_proxy.h
new file mode 100644
index 0000000000000000000000000000000000000000..670afa4e5d5bb4f221fa2b172ed381d7fef8e9bf
--- /dev/null
+++ b/ui/events/ozone/evdev/input_device_factory_evdev_proxy.h
@@ -0,0 +1,59 @@
+// 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;
+
+typedef base::Callback<void(scoped_ptr<std::string>)> GetTouchDeviceStatusReply;
+
+// Thread safe proxy for InputDeviceFactoryEvdev.
+class EVENTS_OZONE_EVDEV_EXPORT InputDeviceFactoryEvdevProxy {
+ public:
+ InputDeviceFactoryEvdevProxy(
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner,
+ base::WeakPtr<InputDeviceFactoryEvdev> input_device_factory);
+ ~InputDeviceFactoryEvdevProxy();
+
+ // 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);
+ void GetTouchDeviceStatus(const GetTouchDeviceStatusReply& reply);
+
+ private:
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
+ base::WeakPtr<InputDeviceFactoryEvdev> input_device_factory_;
+
+ DISALLOW_COPY_AND_ASSIGN(InputDeviceFactoryEvdevProxy);
+};
+
+} // namespace ui
+
+#endif // UI_EVENTS_OZONE_EVDEV_INPUT_DEVICE_FACTORY_PROXY_EVDEV_H_
« no previous file with comments | « ui/events/ozone/evdev/input_device_factory_evdev.cc ('k') | ui/events/ozone/evdev/input_device_factory_evdev_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698