ash_constants.h 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. // Copyright 2013 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. // Constants related to ChromeOS.
  5. #ifndef ASH_CONSTANTS_ASH_CONSTANTS_H_
  6. #define ASH_CONSTANTS_ASH_CONSTANTS_H_
  7. #include "base/component_export.h"
  8. #include "base/files/file_path.h"
  9. #include "base/time/time.h"
  10. #include "third_party/skia/include/core/SkColor.h"
  11. namespace ash {
  12. COMPONENT_EXPORT(ASH_CONSTANTS)
  13. extern const base::FilePath::CharType kDriveCacheDirname[];
  14. COMPONENT_EXPORT(ASH_CONSTANTS)
  15. extern const base::FilePath::CharType kNssCertDbPath[];
  16. COMPONENT_EXPORT(ASH_CONSTANTS)
  17. extern const base::FilePath::CharType kNssKeyDbPath[];
  18. // Background color used for the Chrome OS boot splash screen.
  19. constexpr SkColor kChromeOsBootColor = SkColorSetRGB(0xfe, 0xfe, 0xfe);
  20. // The border thickness of keyboard focus for launcher items and system tray.
  21. constexpr int kFocusBorderThickness = 2;
  22. // The thickness of the focus bar for launcher search.
  23. constexpr int kFocusBarThickness = 3;
  24. constexpr int kDefaultLargeCursorSize = 64;
  25. constexpr SkColor kDefaultCursorColor = SK_ColorBLACK;
  26. // If the window's maximum size (one of width/height) is bigger than this,
  27. // the window become maximizable/snappable.
  28. constexpr int kAllowMaximizeThreshold = 30720;
  29. // These device types are a subset of ui::InputDeviceType. These strings are
  30. // also used in Switch Access webui.
  31. COMPONENT_EXPORT(ASH_CONSTANTS) extern const char kSwitchAccessInternalDevice[];
  32. COMPONENT_EXPORT(ASH_CONSTANTS) extern const char kSwitchAccessUsbDevice[];
  33. COMPONENT_EXPORT(ASH_CONSTANTS)
  34. extern const char kSwitchAccessBluetoothDevice[];
  35. COMPONENT_EXPORT(ASH_CONSTANTS) extern const char kSwitchAccessUnknownDevice[];
  36. // The string that represents the current time. Only used in pixel tests.
  37. COMPONENT_EXPORT(ASH_CONSTANTS)
  38. extern const char kFakeNowTimeStringInPixelTest[];
  39. // The default delay before Switch Access automatically moves to the next
  40. // element on the page that is interesting, based on the Switch Access
  41. // predicates. This value is mostly overridden by the setup guide's default
  42. // value.
  43. constexpr base::TimeDelta kDefaultSwitchAccessAutoScanSpeed =
  44. base::Milliseconds(1800);
  45. // The default speed in dips per second that the gliding point scan cursor
  46. // in switch access moves across the screen.
  47. constexpr int kDefaultSwitchAccessPointScanSpeedDipsPerSecond = 50;
  48. // The default wait time between last mouse movement and sending autoclick.
  49. constexpr int kDefaultAutoclickDelayMs = 1000;
  50. // The default threshold of mouse movement, measured in DIP, that will initiate
  51. // a new autoclick.
  52. constexpr int kDefaultAutoclickMovementThreshold = 20;
  53. // Whether keyboard auto repeat is enabled by default.
  54. constexpr bool kDefaultKeyAutoRepeatEnabled = true;
  55. // Whether dark mode is enabled by default.
  56. constexpr bool kDefaultDarkModeEnabled = false;
  57. // Maximum number of times that dark/light mode educational nudge can be shown.
  58. constexpr int kDarkLightModeNudgeMaxShownCount = 3;
  59. // The default delay before a held keypress will start to auto repeat.
  60. constexpr base::TimeDelta kDefaultKeyAutoRepeatDelay = base::Milliseconds(500);
  61. // The default interval between auto-repeated key events.
  62. constexpr base::TimeDelta kDefaultKeyAutoRepeatInterval =
  63. base::Milliseconds(50);
  64. } // namespace ash
  65. #endif // ASH_CONSTANTS_ASH_CONSTANTS_H_