[go: nahoru, domu]

float: Add haptics for multitask menu p1

Moves haptic util files to chromeos/ so it can be used by multitask
menu (frame) code, which sits in chromeos/.

Due to large changes in deps, this part is just refactor, see ps8 for
an example of new usage in chromeos/ui/frame.

Test: manual
Test: compiles + existing tests
Bug: b/252504840
Change-Id: I44bcc565da003d550da0b518c4333628af324f81
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4956968
Reviewed-by: Yongshun Liu <yongshun@chromium.org>
Reviewed-by: Mitsuru Oshima <oshima@chromium.org>
Commit-Queue: Sammie Quon <sammiequon@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1216322}
diff --git a/ash/frame/snap_controller_impl.cc b/ash/frame/snap_controller_impl.cc
index c53e61d0..ad33598 100644
--- a/ash/frame/snap_controller_impl.cc
+++ b/ash/frame/snap_controller_impl.cc
@@ -4,12 +4,12 @@
 
 #include "ash/frame/snap_controller_impl.h"
 
-#include "ash/utility/haptics_util.h"
 #include "ash/wm/window_positioning_utils.h"
 #include "ash/wm/window_state.h"
 #include "ash/wm/wm_event.h"
 #include "ash/wm/wm_metrics.h"
 #include "ash/wm/workspace/phantom_window_controller.h"
+#include "chromeos/utils/haptics_util.h"
 #include "ui/aura/window.h"
 #include "ui/events/devices/haptic_touchpad_effects.h"
 #include "ui/wm/core/coordinate_conversion.h"
@@ -52,7 +52,7 @@
 
   // Fire a haptic event if necessary.
   if (need_haptic_feedback) {
-    haptics_util::PlayHapticTouchpadEffect(
+    chromeos::haptics_util::PlayHapticTouchpadEffect(
         ui::HapticTouchpadEffect::kSnap,
         ui::HapticTouchpadEffectStrength::kMedium);
   }