File: read_anything_prefs.h

package info (click to toggle)
chromium 140.0.7339.185-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 6,193,740 kB
  • sloc: cpp: 35,093,945; ansic: 7,161,670; javascript: 4,199,694; python: 1,441,797; asm: 949,904; xml: 747,515; pascal: 187,748; perl: 88,691; sh: 88,248; objc: 79,953; sql: 52,714; cs: 44,599; fortran: 24,137; makefile: 22,114; tcl: 15,277; php: 13,980; yacc: 9,000; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (89 lines) | stat: -rw-r--r-- 3,697 bytes parent folder | download | duplicates (6)
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
// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_BROWSER_UI_WEBUI_SIDE_PANEL_READ_ANYTHING_READ_ANYTHING_PREFS_H_
#define CHROME_BROWSER_UI_WEBUI_SIDE_PANEL_READ_ANYTHING_READ_ANYTHING_PREFS_H_

#include "build/build_config.h"
#include "chrome/common/buildflags.h"

#if !BUILDFLAG(IS_ANDROID)

namespace user_prefs {
class PrefRegistrySyncable;
}

namespace prefs {

// String to represent the user's preferred font name for the read anything UI.
inline constexpr char kAccessibilityReadAnythingFontName[] =
    "settings.a11y.read_anything.font_name";

// Double to represent the user's preferred font size scaling factor.
inline constexpr char kAccessibilityReadAnythingFontScale[] =
    "settings.a11y.read_anything.font_scale";

// Int value to represent the user's preferred color settings.
inline constexpr char kAccessibilityReadAnythingColorInfo[] =
    "settings.a11y.read_anything.color_info";

// Int value to represent the user's preferred line spacing setting.
inline constexpr char kAccessibilityReadAnythingLineSpacing[] =
    "settings.a11y.read_anything.line_spacing";

// Int value to represent the user's preferred letter spacing setting.
inline constexpr char kAccessibilityReadAnythingLetterSpacing[] =
    "settings.a11y.read_anything.letter_spacing";

// String to represent the user's preferred voice for reading aloud.
// With auto voice switching on, it's a map to represent the user's preferred
// voice per language for reading aloud.
// TODO(crbug.com/40927698): Rename to kAccessibilityReadAnythingVoices when we
// enable automatic voice switching.
inline constexpr char kAccessibilityReadAnythingVoiceName[] =
    "settings.a11y.read_anything.voice_name";

// Double to represent the user's preferred speech rate setting.
inline constexpr char kAccessibilityReadAnythingSpeechRate[] =
    "settings.a11y.read_anything.speech_rate";

// Int value to represent the user's preferred granularity for highlighting as
// text is read.
inline constexpr char kAccessibilityReadAnythingHighlightGranularity[] =
    "settings.a11y.read_anything.highlight_granularity";

// Int value to represent the user's preferred color for highlighting as text
// is read.
inline constexpr char kAccessibilityReadAnythingHighlightColor[] =
    "settings.a11y.read_anything.highlight_color";

inline constexpr char kAccessibilityReadAnythingLinksEnabled[] =
    "settings.a11y.read_anything.links_enabled";

inline constexpr char kAccessibilityReadAnythingImagesEnabled[] =
    "settings.a11y.read_anything.images_enabled";

// List of strings to represent the user's preferred
// languages for the read anything UI.
inline constexpr char kAccessibilityReadAnythingLanguagesEnabled[] =
    "settings.a11y.read_anything.languages_enabled";

// The date that Reading mode was last opened. This is used to uninstall
// voices if reading mode has been unopened for a longer period of time.
// One preference is used to keep track of when reading mode was last opened
// and one preference is used to keep track of if there was a previous engine
// reinstall in order to prevent unnecessary reinstalls.
inline constexpr char kAccessibilityReadAnythingDateLastOpened[] =
    "settings.a11y.read_anything.last_opened_date";
inline constexpr char kAccessibilityReadAnythingTTSEngineReinstalled[] =
    "settings.a11y.read_anything.tts_engine_reinstalled";

}  // namespace prefs

void RegisterReadAnythingProfilePrefs(
    user_prefs::PrefRegistrySyncable* registry);

#endif  // !BUILDFLAG(IS_ANDROID)

#endif  // CHROME_BROWSER_UI_WEBUI_SIDE_PANEL_READ_ANYTHING_READ_ANYTHING_PREFS_H_