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 ASH_PUBLIC_CPP_LOGIN_ACCELERATORS_H_ 6 #define ASH_PUBLIC_CPP_LOGIN_ACCELERATORS_H_ 7 8 #include <stddef.h> 9 10 #include "ash/public/cpp/ash_public_export.h" 11 #include "ui/events/event_constants.h" 12 #include "ui/events/keycodes/keyboard_codes.h" 13 14 namespace ash { 15 16 // Accelerator actions specific for out-of-box flow, login and lock screens. 17 18 // Flags that define in which contexts accelerator should be enabled. 19 enum LoginActionScope { 20 // Available during out-of-box flow. 21 kScopeOobe = 1 << 0, 22 // Available on the login screen. 23 kScopeLogin = 1 << 1, 24 // Available on the lock screen. 25 kScopeLock = 1 << 2, 26 }; 27 28 enum LoginAcceleratorAction { 29 kToggleSystemInfo, 30 kShowFeedback, 31 kShowResetScreen, 32 kAppLaunchBailout, 33 kAppLaunchNetworkConfig, 34 kCancelScreenAction, 35 kStartEnrollment, 36 kEnableConsumerKiosk, 37 kEnableDebugging, 38 kEditDeviceRequisition, 39 kDeviceRequisitionRemora, 40 kStartDemoMode, 41 }; 42 43 struct LoginAcceleratorData { 44 LoginAcceleratorAction action; 45 ui::KeyboardCode keycode; 46 // Combination of ui::EventFlags. 47 int modifiers; 48 // Defines if accelerator will be registered in AcceleratorController (|true|) 49 // or only for login/lock dialog view (|false|). 50 bool global; 51 // Combination of LoginActionScope flags. 52 int scope; 53 }; 54 55 // Accelerators handled by OOBE / Login components. 56 ASH_PUBLIC_EXPORT extern const LoginAcceleratorData kLoginAcceleratorData[]; 57 ASH_PUBLIC_EXPORT extern const size_t kLoginAcceleratorDataLength; 58 59 } // namespace ash 60 61 #endif // ASH_PUBLIC_CPP_LOGIN_ACCELERATORS_H_ 62