customization: Initial commit for peripheral customization rewriter
Bug: b/241965717
Change-Id: I526b2c8adfbafcc6bb3ff181d6e55abd79cc47ac
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4679630
Reviewed-by: Zentaro Kavanagh <[email protected]>
Reviewed-by: James Cook <[email protected]>
Commit-Queue: David Padlipsky <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1173748}
diff --git a/ash/events/peripheral_customization_event_rewriter.cc b/ash/events/peripheral_customization_event_rewriter.cc
new file mode 100644
index 0000000..9cbdf04
--- /dev/null
+++ b/ash/events/peripheral_customization_event_rewriter.cc
@@ -0,0 +1,24 @@
+// Copyright 2023 The Chromium Authors
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ash/events/peripheral_customization_event_rewriter.h"
+
+#include "ash/constants/ash_features.h"
+#include "base/check.h"
+
+namespace ash {
+
+PeripheralCustomizationEventRewriter::PeripheralCustomizationEventRewriter() =
+ default;
+PeripheralCustomizationEventRewriter::~PeripheralCustomizationEventRewriter() =
+ default;
+
+ui::EventDispatchDetails PeripheralCustomizationEventRewriter::RewriteEvent(
+ const ui::Event& event,
+ const Continuation continuation) {
+ DCHECK(features::IsPeripheralCustomizationEnabled());
+ return SendEvent(continuation, &event);
+}
+
+} // namespace ash