// Copyright 2021 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef COMPONENTS_MESSAGES_ANDROID_MESSAGE_ENUMS_H_ #define COMPONENTS_MESSAGES_ANDROID_MESSAGE_ENUMS_H_ namespace messages { // List of constants describing the reasons why the message was dismissed. // A Java counterpart will be generated for this enum. // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.components.messages // These values are persisted to logs. Entries should not be renumbered and // numeric values should never be reused. // TODO(crbug.com/40755174): Revisit enum values. TAB_SWITCHED is not currently // used. Likely the same for TAB_DESTROYED and ACTIVITY_DESTROYED. We also need // a dedicated value for message dismissed from feature code. enum class DismissReason { … }; // "Urgent" means the user should take actions ASAP, such as responding to // permissions or safety warnings. enum class MessagePriority { … }; // The constants of message scope type. // // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.components.messages enum class MessageScopeType { … }; // Enumerates unique identifiers for various messages. Used for recording // messages related histograms. // // These values are persisted to logs. Entries should not be renumbered and // numeric values should never be reused. // // When adding a new message identifier, make corresponding changes in the // following locations: // - tools/metrics/histograms/metadata/android/enums.xml: // <enum name="MessageIdentifier"> // - tools/metrics/histograms/metadata/android/histograms.xml: // <variants name="MessageIdentifiers"> // - MessagesMetrics.java: #messageIdentifierToHistogramSuffix() // // A Java counterpart is generated for this enum. // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.components.messages enum class MessageIdentifier { … }; // The behavior the message should follow when the primary button is clicked, // after running the primary action callback. // // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.components.messages enum class PrimaryActionClickBehavior { … }; // The max size of the message secondary menu. // // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.components.messages enum class SecondaryMenuMaxSize { … }; // The primary widget that should be shown in the message. // // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.components.messages enum class PrimaryWidgetAppearance { … }; } // namespace messages #endif // COMPONENTS_MESSAGES_ANDROID_MESSAGE_ENUMS_H_