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 5 #ifndef CHROMEOS_SERVICES_ASSISTANT_PUBLIC_CPP_ASSISTANT_ENUMS_H_ 6 #define CHROMEOS_SERVICES_ASSISTANT_PUBLIC_CPP_ASSISTANT_ENUMS_H_ 7 8 namespace chromeos { 9 namespace assistant { 10 // The initial state is NOT_READY, after Assistant service started it becomes 11 // READY. When Assistant UI shows up the state becomes VISIBLE. 12 enum AssistantStatus { 13 // The Assistant service is not ready yet. 14 NOT_READY = 0, 15 // The Assistant service is ready. 16 READY, 17 }; 18 19 enum AssistantAllowedState { 20 // Assistant feature is allowed. 21 ALLOWED = 0, 22 // Disallowed because search and assistant is disabled by policy. 23 DISALLOWED_BY_POLICY, 24 // Disallowed because user's locale is not compatible. 25 DISALLOWED_BY_LOCALE, 26 // Disallowed because current user is not primary user. 27 DISALLOWED_BY_NONPRIMARY_USER, 28 // TODO(crbug.com/866790): Remove this value as a part of Supervised users 29 // code cleanup. 30 // Disallowed because current user is supervised user. 31 DISALLOWED_BY_SUPERVISED_USER, 32 // Disallowed because incognito mode. 33 DISALLOWED_BY_INCOGNITO, 34 // Disallowed because the device is in demo mode. 35 DISALLOWED_BY_DEMO_MODE, 36 // Disallowed because the device is in public session. 37 DISALLOWED_BY_PUBLIC_SESSION, 38 // Disallowed because the user's account type is currently not supported. 39 DISALLOWED_BY_ACCOUNT_TYPE, 40 // Disallowed because the device is in Kiosk mode. 41 DISALLOWED_BY_KIOSK_MODE, 42 43 MAX_VALUE = DISALLOWED_BY_KIOSK_MODE, 44 }; 45 46 // Enumeration of possible Assistant query sources. These values are persisted 47 // to logs. Entries should not be renumbered and numeric values should never 48 // be reused. Append new values to the end. 49 enum class AssistantQuerySource { 50 kUnspecified = 0, 51 kMinValue = kUnspecified, 52 kDeepLink = 1, 53 kDialogPlateTextField = 2, 54 kStylus = 3, 55 kSuggestionChip = 4, 56 kVoiceInput = 5, 57 kProactiveSuggestions = 6, 58 kLibAssistantInitiated = 7, 59 // kWarmerWelcomeDeprecated = 8, 60 kConversationStarter = 9, 61 kWhatsOnMyScreen = 10, 62 kQuickAnswers = 11, 63 kLauncherChip = 12, 64 kBetterOnboarding = 13, 65 kBloom = 14, 66 kMaxValue = kBloom, 67 }; 68 69 // Enumeration of possible Assistant interaction types. 70 enum class AssistantInteractionType { 71 kText, 72 kVoice, 73 }; 74 75 // Enumeration of possible completions for an Assistant interaction. 76 // The values are recorded in UMA, do not reuse existing values when updating. 77 enum class AssistantInteractionResolution { 78 // Assistant interaction completed normally. 79 kNormal = 0, 80 // Assistant interaction completed due to barge in or cancellation. 81 kInterruption = 1, 82 // Assistant interaction completed due to error. 83 kError = 2, 84 // Assistant interaction completed due to mic timeout. 85 kMicTimeout = 3, 86 // Assistant interaction completed due to multi-device hotword loss. 87 kMultiDeviceHotwordLoss = 4, 88 kMaxValue = kMultiDeviceHotwordLoss, 89 }; 90 91 // Enumeration of possible Assistant suggestion types. 92 enum class AssistantSuggestionType { 93 kUnspecified, 94 kConversationStarter, 95 kBetterOnboarding, 96 }; 97 98 // Enumeration of better onboarding options. This is reported to histogram, 99 // please do not change the values. 100 enum class AssistantBetterOnboardingType { 101 kUnspecified = 0, 102 kMath = 1, 103 kKnowledgeEdu = 2, 104 kConversion = 3, 105 kKnowledge = 4, 106 kProductivity = 5, 107 kPersonality = 6, 108 kLanguage = 7, 109 kTechnical = 8, 110 kMaxValue = kTechnical, 111 }; 112 113 // Enumeration of Assistant entry points. These values are persisted to logs. 114 // Entries should not be renumbered and numeric values should never be reused. 115 // Only append to this enum is allowed if the possible entry source grows. 116 enum class AssistantEntryPoint { 117 kUnspecified = 0, 118 kMinValue = kUnspecified, 119 kDeepLink = 1, 120 kHotkey = 2, 121 kHotword = 3, 122 // kLauncherSearchBoxDeprecated = 4, 123 kLongPressLauncher = 5, 124 kSetup = 6, 125 kStylus = 7, 126 kLauncherSearchResult = 8, 127 kLauncherSearchBoxIcon = 9, 128 kProactiveSuggestions = 10, 129 kLauncherChip = 11, 130 kBloom = 12, 131 kMaxValue = kBloom, 132 }; 133 134 // Enumeration of Assistant exit points. These values are persisted to logs. 135 // Entries should not be renumbered and numeric values should never be reused. 136 // Only append to this enum is allowed if the possible exit source grows. 137 enum class AssistantExitPoint { 138 // Includes keyboard interruptions (e.g. launching Chrome OS feedback 139 // using keyboard shortcuts, pressing search button). 140 kUnspecified = 0, 141 kMinValue = kUnspecified, 142 kCloseButton = 1, 143 kHotkey = 2, 144 kNewBrowserTabFromServer = 3, 145 kNewBrowserTabFromUser = 4, 146 kOutsidePress = 5, 147 kSetup = 6, 148 kStylus = 7, 149 kBackInLauncher = 8, 150 kLauncherClose = 9, 151 kLauncherOpen = 10, 152 kScreenshot = 11, 153 kOverviewMode = 12, 154 kMaxValue = kOverviewMode, 155 }; 156 157 } // namespace assistant 158 } // namespace chromeos 159 160 #endif // CHROMEOS_SERVICES_ASSISTANT_PUBLIC_CPP_ASSISTANT_ENUMS_H_ 161