pointer_gesture_pinch_delegate.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. // Copyright 2017 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef COMPONENTS_EXO_POINTER_GESTURE_PINCH_DELEGATE_H_
  5. #define COMPONENTS_EXO_POINTER_GESTURE_PINCH_DELEGATE_H_
  6. #include "base/time/time.h"
  7. namespace exo {
  8. class Pointer;
  9. // Handles pinch event details on pointers. Used as an extension to the
  10. // PointerDelegate.
  11. class PointerGesturePinchDelegate {
  12. public:
  13. // Called at the top of the pointer's destructor, to give observers a
  14. // chance to remove themselves.
  15. virtual void OnPointerDestroying(Pointer* pointer) = 0;
  16. virtual void OnPointerPinchBegin(uint32_t unique_touch_event_id,
  17. base::TimeTicks time_stamp,
  18. Surface* surface) = 0;
  19. virtual void OnPointerPinchUpdate(base::TimeTicks time_stamp,
  20. float scale) = 0;
  21. virtual void OnPointerPinchEnd(uint32_t unique_touch_event_id,
  22. base::TimeTicks time_stamp) = 0;
  23. protected:
  24. virtual ~PointerGesturePinchDelegate() {}
  25. };
  26. } // namespace exo
  27. #endif // COMPONENTS_EXO_POINTER_GESTURE_PINCH_DELEGATE_H_