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

Unified Diff: services/ui/input_devices/touch_device_server.h

Issue 2901563002: chromeos: adds TouchDeviceServer and wires up in mushrome (Closed)
Patch Set: no temporary Created 3 years, 7 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
« no previous file with comments | « services/ui/input_devices/input_device_server.cc ('k') | services/ui/input_devices/touch_device_server.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/input_devices/touch_device_server.h
diff --git a/services/ui/input_devices/touch_device_server.h b/services/ui/input_devices/touch_device_server.h
new file mode 100644
index 0000000000000000000000000000000000000000..6def2b0f777fd689c9923b2f7b55543405d1a325
--- /dev/null
+++ b/services/ui/input_devices/touch_device_server.h
@@ -0,0 +1,53 @@
+// Copyright 2017 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 SERVICES_UI_INPUT_DEVICES_TOUCH_DEVICE_SERVER_H_
+#define SERVICES_UI_INPUT_DEVICES_TOUCH_DEVICE_SERVER_H_
+
+#include "base/macros.h"
+#include "mojo/public/cpp/bindings/binding_set.h"
+#include "mojo/public/cpp/bindings/interface_ptr_set.h"
+#include "services/ui/public/interfaces/input_devices/touch_device_server.mojom.h"
+
+namespace display {
+class DefaultTouchTransformSetter;
+}
+
+namespace service_manager {
+class BinderRegistry;
+struct BindSourceInfo;
+}
+
+namespace ui {
+
+// Implementation of mojom::TouchDeviceServer. Uses an instance of
+// DefaultTouchTransformSetter to apply the actual updates.
+class TouchDeviceServer : public mojom::TouchDeviceServer {
+ public:
+ TouchDeviceServer();
+ ~TouchDeviceServer() override;
+
+ // Adds interface with the connection registry so remote observers can
+ // connect.
+ void AddInterface(service_manager::BinderRegistry* registry);
+
+ // mojom::TouchDeviceServer:
+ void ConfigureTouchDevices(
+ const std::unordered_map<int32_t, double>& transport_scales,
+ const std::vector<display::TouchDeviceTransform>& transforms) override;
+
+ private:
+ void BindTouchDeviceServerRequest(
+ const service_manager::BindSourceInfo& source_info,
+ mojom::TouchDeviceServerRequest request);
+
+ mojo::BindingSet<mojom::TouchDeviceServer> bindings_;
+ std::unique_ptr<display::DefaultTouchTransformSetter> touch_transform_setter_;
+
+ DISALLOW_COPY_AND_ASSIGN(TouchDeviceServer);
+};
+
+} // namespace ui
+
+#endif // SERVICES_UI_INPUT_DEVICES_TOUCH_DEVICE_SERVER_H_
« no previous file with comments | « services/ui/input_devices/input_device_server.cc ('k') | services/ui/input_devices/touch_device_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698