1 // Copyright 2018 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 ASH_PUBLIC_CPP_APP_MENU_CONSTANTS_H_ 6 #define ASH_PUBLIC_CPP_APP_MENU_CONSTANTS_H_ 7 8 namespace ash { 9 10 // Defines command ids used in Shelf and AppList app context menus. These are 11 // used in histograms, do not remove/renumber entries. If you're adding to this 12 // enum with the intention that it will be logged, add checks to ensure 13 // stability of the enum and update the ChromeOSUICommands enum listing in 14 // tools/metrics/histograms/enums.xml. 15 // TODO(newcomer): Deprecate duplicate CommandIds after the Touchable App 16 // Context Menu launch. Delay deprecating these because it will disrupt 17 // histograms. https://crbug.com/854433 18 enum CommandId { 19 // Used by ShelfContextMenu. 20 MENU_OPEN_NEW = 0, 21 MENU_CLOSE = 1, 22 MENU_PIN = 2, 23 LAUNCH_TYPE_PINNED_TAB = 3, 24 LAUNCH_TYPE_REGULAR_TAB = 4, 25 LAUNCH_TYPE_FULLSCREEN = 5, 26 LAUNCH_TYPE_WINDOW = 6, 27 MENU_NEW_WINDOW = 7, 28 MENU_NEW_INCOGNITO_WINDOW = 8, 29 30 // Used by AppMenuModelAdapter. 31 NOTIFICATION_CONTAINER = 9, 32 33 // Used by CrostiniShelfContextMenu. 34 CROSTINI_USE_LOW_DENSITY = 10, 35 CROSTINI_USE_HIGH_DENSITY = 11, 36 37 // Allow reordering of shelf items with the keyboard. Only used for shelf. 38 SWAP_WITH_NEXT = 12, 39 SWAP_WITH_PREVIOUS = 13, 40 41 // Used by ShelfContextMenu. 42 LAUNCH_TYPE_TABBED_WINDOW = 20, 43 44 // Used by AppContextMenu and/or ShelfContextMenu. 45 LAUNCH_NEW = 100, 46 TOGGLE_PIN = 101, 47 SHOW_APP_INFO = 102, 48 OPTIONS = 103, 49 UNINSTALL = 104, 50 REMOVE_FROM_FOLDER = 105, 51 APP_CONTEXT_MENU_NEW_WINDOW = 106, 52 APP_CONTEXT_MENU_NEW_INCOGNITO_WINDOW = 107, 53 INSTALL = 108, 54 SETTINGS = 109, 55 USE_LAUNCH_TYPE_COMMAND_START = 200, 56 USE_LAUNCH_TYPE_PINNED = USE_LAUNCH_TYPE_COMMAND_START, 57 USE_LAUNCH_TYPE_REGULAR = 201, 58 USE_LAUNCH_TYPE_FULLSCREEN = 202, 59 USE_LAUNCH_TYPE_WINDOW = 203, 60 USE_LAUNCH_TYPE_TABBED_WINDOW = 204, 61 USE_LAUNCH_TYPE_COMMAND_END, 62 63 // Range of command ids reserved for launching app shortcuts from context 64 // menu for Android app. Used by AppContextMenu and ShelfContextMenu. 65 LAUNCH_APP_SHORTCUT_FIRST = 1000, 66 LAUNCH_APP_SHORTCUT_LAST = 1999, 67 68 // Command for shutting down a VM associated with an App. Used by 69 // AppContextMenu and ShelfContextMenu. 70 SHUTDOWN_GUEST_OS = 2000, 71 72 // Range of command IDs reserved for shelf app menu items when there are 73 // multiple instances of the same app. 74 APP_MENU_ITEM_ID_FIRST = 3000, 75 APP_MENU_ITEM_ID_LAST = 3999, 76 77 // Reserved range for extension/app custom menus as defined by 78 // IDC_EXTENSIONS_CONTEXT_CUSTOM_FIRST 79 // IDC_EXTENSIONS_CONTEXT_CUSTOM_LAST 80 // in chrome/app/chrome_command_ids.h and used in ContextMenuMatcher. 81 EXTENSIONS_CONTEXT_CUSTOM_FIRST = 49000, 82 EXTENSIONS_CONTEXT_CUSTOM_LAST = 50000, 83 84 COMMAND_ID_COUNT 85 }; 86 87 // The size of app context menu items' icons. 88 constexpr int kAppContextMenuIconSize = 20; 89 90 // Minimum padding for children of NotificationMenuView in dips. 91 constexpr int kNotificationHorizontalPadding = 16; 92 constexpr int kNotificationVerticalPadding = 8; 93 94 // Height of the NotificationItemView in dips. 95 constexpr int kNotificationItemViewHeight = 48; 96 97 // The maximum number of overflow icons which can be shown without the 98 // showing |overflow_icon_|. 99 constexpr int kMaxOverflowIcons = 9; 100 101 // The identifier used for notifications in the NotificationOverflowView. 102 constexpr int kNotificationOverflowIconId = 43; 103 104 // The identifier used for the overflow icon in NotificationOverflowView. 105 constexpr int kOverflowIconId = 44; 106 107 } // namespace ash 108 109 #endif // ASH_PUBLIC_CPP_APP_MENU_CONSTANTS_H_ 110