event_constants.h 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  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_FEATURE_ENGAGEMENT_PUBLIC_EVENT_CONSTANTS_H_
  5. #define COMPONENTS_FEATURE_ENGAGEMENT_PUBLIC_EVENT_CONSTANTS_H_
  6. #include "build/build_config.h"
  7. namespace feature_engagement {
  8. namespace events {
  9. // Desktop
  10. #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \
  11. BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
  12. // The user has explicitly opened a new tab via an entry point from inside of
  13. // Chrome.
  14. extern const char kNewTabOpened[];
  15. // A new tab was opened when 5 (or more) tabs were already open.
  16. extern const char kSixthTabOpened[];
  17. // The user made a new tab group.
  18. extern const char kTabGroupCreated[];
  19. // A tab was closed when there are eight or more tabs in the browser.
  20. extern const char kClosedTabWithEightOrMore[];
  21. // A tab was added to reading list.
  22. extern const char kReadingListItemAdded[];
  23. // Reading list was opened.
  24. extern const char kReadingListMenuOpened[];
  25. // Bookmark star button was clicked opening the menu.
  26. extern const char kBookmarkStarMenuOpened[];
  27. // All conditions for reopen closed tab IPH were met. Since this IPH needs to
  28. // track user events (opening/closing tabs, focusing the omnibox, etc) on the
  29. // second level, it must be done manually.
  30. extern const char kReopenTabConditionsMet[];
  31. // The user reopened a previously closed tab.
  32. extern const char kTabReopened[];
  33. // A tab with playing media was sent to the background.
  34. extern const char kMediaBackgrounded[];
  35. // The user opened the Global Media Controls dialog.
  36. extern const char kGlobalMediaControlsOpened[];
  37. // All the events declared below are the string names of deferred onboarding
  38. // events for the Focus Mode feature.
  39. // The user has opened a Focus Mode window.
  40. extern const char kFocusModeOpened[];
  41. // All conditions for show Focus Mode IPH were met.
  42. extern const char kFocusModeConditionsMet[];
  43. // The side search panel was automatically triggered.
  44. extern const char kSideSearchAutoTriggered[];
  45. // The Side search panel was opened by the user.
  46. extern const char kSideSearchOpened[];
  47. // Tab Search tab strip was opened by the user.
  48. extern const char kTabSearchOpened[];
  49. // The WebUI tab strip was closed by the user.
  50. extern const char kWebUITabStripClosed[];
  51. // The WebUI tab strip was opened by the user.
  52. extern const char kWebUITabStripOpened[];
  53. // The PWA was installed by the user.
  54. extern const char kDesktopPwaInstalled[];
  55. // The user entered the special "focus help bubble" accelerator.
  56. extern const char kFocusHelpBubbleAcceleratorPressed[];
  57. // The screen reader promo for the "focus help bubble" accelerator was read to
  58. // the user.
  59. extern const char kFocusHelpBubbleAcceleratorPromoRead[];
  60. #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) ||
  61. // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
  62. #if BUILDFLAG(IS_IOS)
  63. // The user has opened Chrome (cold start or from background).
  64. extern const char kChromeOpened[];
  65. // The user has opened an incognito tab.
  66. extern const char kIncognitoTabOpened[];
  67. // The user has cleared their browsing data.
  68. extern const char kClearedBrowsingData[];
  69. // The user has viewed their reading list.
  70. extern const char kViewedReadingList[];
  71. // The user has triggered the translate infobar manually.
  72. extern const char kTriggeredTranslateInfobar[];
  73. // The user has viewed the BottomToolbar tip.
  74. extern const char kBottomToolbarOpened[];
  75. // The Discover feed has loaded content in the NTP.
  76. extern const char kDiscoverFeedLoaded[];
  77. // The user has requested the desktop version of a page.
  78. extern const char kDesktopVersionRequested[];
  79. // The default site view tip is shown.
  80. extern const char kDefaultSiteViewShown[];
  81. // Autofill displayed password suggestions.
  82. extern const char kPasswordSuggestionsShown[];
  83. // The user has selected an Autofill password suggestion.
  84. extern const char kPasswordSuggestionSelected[];
  85. // The user has exited the overflow menu without scrolling horizontally and
  86. // without taking an action.
  87. extern const char kOverflowMenuNoHorizontalScrollOrAction[];
  88. #endif // BUILDFLAG(IS_IOS)
  89. // Android.
  90. #if BUILDFLAG(IS_ANDROID)
  91. // The user has explicitly used the Install menu item under the App Menu.
  92. extern const char kPwaInstallMenuSelected[];
  93. #endif // BUILDFLAG(IS_ANDROID)
  94. } // namespace events
  95. } // namespace feature_engagement
  96. #endif // COMPONENTS_FEATURE_ENGAGEMENT_PUBLIC_EVENT_CONSTANTS_H_