user_action_recorder.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. // Copyright 2020 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 ASH_COMPONENTS_PHONEHUB_USER_ACTION_RECORDER_H_
  5. #define ASH_COMPONENTS_PHONEHUB_USER_ACTION_RECORDER_H_
  6. namespace ash {
  7. namespace phonehub {
  8. // Records actions that a user may take via Phone Hub.
  9. class UserActionRecorder {
  10. public:
  11. virtual ~UserActionRecorder() = default;
  12. // Records that the Phone Hub UI has been opened.
  13. virtual void RecordUiOpened() = 0;
  14. // Records that an Instant Tethering connection has been attempted via the
  15. // Phone Hub UI.
  16. virtual void RecordTetherConnectionAttempt() = 0;
  17. // Records that an attempt to change the Do Not Disturb status has been
  18. // attempted via the Phone Hub UI.
  19. virtual void RecordDndAttempt() = 0;
  20. // Records that an attempt to start or stop ringing the user's phone via the
  21. // Find My Device feature has been attempted via the Phone Hub UI.
  22. virtual void RecordFindMyDeviceAttempt() = 0;
  23. // Records that the user has opened a browser tab synced via the "task
  24. // continuation" feature.
  25. virtual void RecordBrowserTabOpened() = 0;
  26. // Records that an attempt to dismiss a notification generated via Phone Hub
  27. // has been attempted.
  28. virtual void RecordNotificationDismissAttempt() = 0;
  29. // Records that an attempt to reply to a notification generated via Phone Hub
  30. // has been attempted.
  31. virtual void RecordNotificationReplyAttempt() = 0;
  32. // Records that an attempt to download a camera roll item via Phone Hub has
  33. // been attempted.
  34. virtual void RecordCameraRollDownloadAttempt() = 0;
  35. protected:
  36. UserActionRecorder() = default;
  37. };
  38. } // namespace phonehub
  39. } // namespace ash
  40. #endif // ASH_COMPONENTS_PHONEHUB_USER_ACTION_RECORDER_H_