1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36
   37
   38
   39
   40
   41
   42
   43
   44
   45
   46
   47
   48
   49
   50
   51
   52
   53
   54
   55
   56
   57
   58
   59
   60
   61
   62
   63
   64
   65
   66
   67
   68
   69
   70
   71
   72
   73
   74
   75
   76
   77
   78
   79
   80
   81
   82
   83
   84
   85
   86
   87
   88
   89
   90
   91
   92
   93
   94
   95
   96
   97
   98
   99
  100
  101
  102
  103
  104
  105
  106
  107
  108
  109
  110
  111
  112
  113
  114
  115
  116
  117
  118
  119
  120
  121
  122
  123
  124
  125
  126
  127
  128
  129
  130
  131
  132
  133
  134
  135
  136
  137
  138
  139
  140
  141
  142
  143
  144
  145
  146
  147
  148
  149
  150
  151
  152
  153
  154
  155
  156
  157
  158
  159
  160
  161
  162
  163
  164
  165
  166
  167
  168
  169
  170
  171
  172
  173
  174
  175
  176
  177
  178
  179
  180
  181
  182
  183
  184
  185
  186
  187
  188
  189
  190
  191
  192
  193
  194
  195
  196
  197
  198
  199
  200
  201
  202
  203
  204
  205
  206
  207
  208
  209
  210
  211
  212
  213
  214
  215
  216

ash / constants / ash_constants.h [blame]

// Copyright 2013 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Constants related to ChromeOS.

#ifndef ASH_CONSTANTS_ASH_CONSTANTS_H_
#define ASH_CONSTANTS_ASH_CONSTANTS_H_

#include "base/component_export.h"
#include "base/files/file_path.h"
#include "base/time/time.h"
#include "third_party/skia/include/core/SkColor.h"

namespace ash {

COMPONENT_EXPORT(ASH_CONSTANTS)
extern const base::FilePath::CharType kDriveCacheDirname[];
COMPONENT_EXPORT(ASH_CONSTANTS)
extern const base::FilePath::CharType kNssCertDbPath[];
COMPONENT_EXPORT(ASH_CONSTANTS)
extern const base::FilePath::CharType kNssKeyDbPath[];

// The border thickness of keyboard focus for launcher items and system tray.
constexpr int kFocusBorderThickness = 2;

// The thickness of the focus bar for launcher search.
constexpr int kFocusBarThickness = 3;

// Offset added to the shelf so tray bubble bounds are in the correct display.
constexpr int kShelfDisplayOffset = 1;

constexpr int kDefaultLargeCursorSize = 64;
constexpr int kMinLargeCursorSize = 25;
constexpr int kMaxLargeCursorSize = 128;

constexpr int kDefaultCaretBlinkIntervalMs = 500;

constexpr SkColor kDefaultCursorColor = SK_ColorBLACK;

// Default notification flash color is yellow.
constexpr SkColor kDefaultFlashNotificationsColor = 0xffff00;

// These device types are a subset of ui::InputDeviceType. These strings are
// also used in Switch Access webui.
COMPONENT_EXPORT(ASH_CONSTANTS) extern const char kSwitchAccessInternalDevice[];
COMPONENT_EXPORT(ASH_CONSTANTS) extern const char kSwitchAccessUsbDevice[];
COMPONENT_EXPORT(ASH_CONSTANTS)
extern const char kSwitchAccessBluetoothDevice[];
COMPONENT_EXPORT(ASH_CONSTANTS) extern const char kSwitchAccessUnknownDevice[];

// The string that represents the current time. Only used in pixel tests.
COMPONENT_EXPORT(ASH_CONSTANTS)
extern const char kFakeNowTimeStringInPixelTest[];

// The default delay before Switch Access automatically moves to the next
// element on the page that is interesting, based on the Switch Access
// predicates. This value is mostly overridden by the setup guide's default
// value.
constexpr base::TimeDelta kDefaultSwitchAccessAutoScanSpeed =
    base::Milliseconds(1800);

// The default speed in dips per second that the gliding point scan cursor
// in switch access moves across the screen.
constexpr int kDefaultSwitchAccessPointScanSpeedDipsPerSecond = 50;

// The default wait time between last mouse movement and sending autoclick.
constexpr int kDefaultAutoclickDelayMs = 1000;

// The default threshold of mouse movement, measured in DIP, that will initiate
// a new autoclick.
constexpr int kDefaultAutoclickMovementThreshold = 20;

// Whether keyboard auto repeat is enabled by default.
constexpr bool kDefaultKeyAutoRepeatEnabled = true;

// Whether dark mode is enabled by default.
constexpr bool kDefaultDarkModeEnabled = false;

// Maximum number of times that dark/light mode educational nudge can be shown.
constexpr int kDarkLightModeNudgeMaxShownCount = 3;

// The default delay before a held keypress will start to auto repeat.
constexpr base::TimeDelta kDefaultKeyAutoRepeatDelay = base::Milliseconds(500);

// The default interval between auto-repeated key events.
constexpr base::TimeDelta kDefaultKeyAutoRepeatInterval =
    base::Milliseconds(50);

// Constants for notification.
const char kPrivacyIndicatorsNotificationIdPrefix[] = "privacy-indicators";
const char kPrivacyIndicatorsNotifierId[] = "ash.privacy-indicators";

// The default delay between last key release and accepting a new key press.
inline constexpr base::TimeDelta kDefaultAccessibilityBounceKeysDelay =
    base::Milliseconds(500);

// The default delay before accepting a held key press.
inline constexpr base::TimeDelta kDefaultAccessibilitySlowKeysDelay =
    base::Milliseconds(500);

// The default value for audio strategy in ChromeVox.
COMPONENT_EXPORT(ASH_CONSTANTS)
extern const char kDefaultAccessibilityChromeVoxAudioStrategy[];

// The default value for the braille table in ChromeVox.
COMPONENT_EXPORT(ASH_CONSTANTS)
extern const char kDefaultAccessibilityChromeVoxBrailleTable[];

// The default value for the 6-dot braille table in ChromeVox.
COMPONENT_EXPORT(ASH_CONSTANTS)
extern const char kDefaultAccessibilityChromeVoxBrailleTable6[];

// The default value for the 8-dot braille table in ChromeVox.
COMPONENT_EXPORT(ASH_CONSTANTS)
extern const char kDefaultAccessibilityChromeVoxBrailleTable8[];

// The default value for the braille table type in ChromeVox.
COMPONENT_EXPORT(ASH_CONSTANTS)
extern const char kDefaultAccessibilityChromeVoxBrailleTableType[];

// The default value for the capital strategy in ChromeVox.
COMPONENT_EXPORT(ASH_CONSTANTS)
extern const char kDefaultAccessibilityChromeVoxCapitalStrategy[];

// The default value for the capital strategy backup pref in ChromeVox, used
// on the settings page for saving a user's preference when they toggle
// |usePitchChanges|.
COMPONENT_EXPORT(ASH_CONSTANTS)
extern const char kDefaultAccessibilityChromeVoxCapitalStrategyBackup[];

// The default value for number reading style in ChromeVox.
COMPONENT_EXPORT(ASH_CONSTANTS)
extern const char kDefaultAccessibilityChromeVoxNumberReadingStyle[];

// The default value for the preferred braille display address in ChromeVox.
COMPONENT_EXPORT(ASH_CONSTANTS)
extern const char
    kDefaultAccessibilityChromeVoxPreferredBrailleDisplayAddress[];

enum ChromeVoxPunctuationEcho {
  kPunctuationEchoNone = 0,
  kPunctuationEchoSome = 1,
  kPunctuationEchoAll = 2
};

// The default value for punctuation echo in ChromeVox.
constexpr int kDefaultAccessibilityChromeVoxPunctuationEcho =
    ChromeVoxPunctuationEcho::kPunctuationEchoSome;

// The default value for the number of virtual braille columns in ChromeVox.
constexpr int kDefaultAccessibilityChromeVoxVirtualBrailleColumns = 40;

// The default value for the number of virtual braille rows in ChromeVox.
constexpr int kDefaultAccessibilityChromeVoxVirtualBrailleRows = 1;

// The default value for voice name in ChromeVox.
COMPONENT_EXPORT(ASH_CONSTANTS)
extern const char kDefaultAccessibilityChromeVoxVoiceName[];

// Whether the enhanced network voices feature in Select-to-speak is allowed by
// default.
constexpr bool
    kDefaultAccessibilityEnhancedNetworkVoicesInSelectToSpeakAllowed = true;

// Whether Select-to-speak shades the background contents that aren't being read
// by default.
constexpr bool kDefaultAccessibilitySelectToSpeakBackgroundShading = false;

// Whether enhanced network TTS voices are enabled for Select-to-speak by
// default.
constexpr bool kDefaultAccessibilitySelectToSpeakEnhancedNetworkVoices = false;

// The default preferred enhanced voice for Select-to-speak.
COMPONENT_EXPORT(ASH_CONSTANTS)
extern const char kDefaultAccessibilitySelectToSpeakEnhancedVoiceName[];

// Whether the initial popup authorizing enhanced network voices for
// Select-to-speak has been shown to the user by default.
constexpr bool kDefaultAccessibilitySelectToSpeakEnhancedVoicesDialogShown =
    false;

// The default word highlighting color for Select-to-speak.
COMPONENT_EXPORT(ASH_CONSTANTS)
extern const char kDefaultAccessibilitySelectToSpeakHighlightColor[];

// Whether Select-to-speak shows navigation controls by default.
constexpr bool kDefaultAccessibilitySelectToSpeakNavigationControls = true;

// The default preferred voice for Select-to-speak.
COMPONENT_EXPORT(ASH_CONSTANTS)
extern const char kDefaultAccessibilitySelectToSpeakVoiceName[];

// Whether Select-to-speak enables automatic voice switching between different
// languages by default.
constexpr bool kDefaultAccessibilitySelectToSpeakVoiceSwitching = false;

// Whether Select-to-speak highlights each word as it is read by default.
constexpr bool kDefaultAccessibilitySelectToSpeakWordHighlight = true;

// How much to scale cursor speed in various directions.
constexpr int kDefaultFaceGazeCursorSpeed = 10;

// Whether to use cursor acceleration.
constexpr bool kDefaultFaceGazeCursorUseAcceleration = true;

// How much FaceGaze should threshold velocity, e.g. to implement deadzone.
constexpr int kDefaultFaceGazeVelocityThreshold = 9;

// How much FaceGaze should dampen the mouse speed during a precision click.
// Note that this value represents a percentage, e.g. 50%.
constexpr int kDefaultFaceGazePrecisionClickSpeedFactor = 50;

}  // namespace ash

#endif  // ASH_CONSTANTS_ASH_CONSTANTS_H_