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
pdf / pdf_ink_metrics_handler.h [blame]
// Copyright 2024 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef PDF_PDF_INK_METRICS_HANDLER_H_
#define PDF_PDF_INK_METRICS_HANDLER_H_
#include "pdf/buildflags.h"
#include "pdf/pdf_ink_brush.h"
static_assert(BUILDFLAG(ENABLE_PDF_INK2), "ENABLE_PDF_INK2 not set to true");
namespace chrome_pdf {
// These values are persisted to logs. Entries should not be renumbered and
// numeric values should never be reused.
//
// LINT.IfChange(PDFInk2StrokeBrushSize)
enum class StrokeMetricBrushSize {
kExtraThin = 0,
kThin = 1,
kMedium = 2,
kThick = 3,
kExtraThick = 4,
kMaxValue = 4,
};
// LINT.ThenChange(//tools/metrics/histograms/metadata/pdf/enums.xml:PDFInk2StrokeBrushSize)
// These values are persisted to logs. Entries should not be renumbered and
// numeric values should never be reused.
//
// LINT.IfChange(PDFInk2StrokeBrushType)
enum class StrokeMetricBrushType {
kPen = 0,
kHighlighter = 1,
kEraser = 2,
kMaxValue = 2,
};
// LINT.ThenChange(//tools/metrics/histograms/metadata/pdf/enums.xml:PDFInk2StrokeBrushType)
// These values are persisted to logs. Entries should not be renumbered and
// numeric values should never be reused.
//
// LINT.IfChange(PDFInk2StrokeHighlighterColor)
enum class StrokeMetricHighlighterColor {
kLightRed = 0,
kLightYellow = 1,
kLightGreen = 2,
kLightBlue = 3,
kLightOrange = 4,
kRed = 5,
kYellow = 6,
kGreen = 7,
kBlue = 8,
kOrange = 9,
kMaxValue = 9,
};
// LINT.ThenChange(//tools/metrics/histograms/metadata/pdf/enums.xml:PDFInk2StrokeHighlighterColor)
// These values are persisted to logs. Entries should not be renumbered and
// numeric values should never be reused.
//
// LINT.IfChange(PDFInk2StrokePenColor)
enum class StrokeMetricPenColor {
kBlack = 0,
kDarkGrey2 = 1,
kDarkGrey1 = 2,
kLightGrey = 3,
kWhite = 4,
kRed1 = 5,
kYellow1 = 6,
kGreen1 = 7,
kBlue1 = 8,
kTan1 = 9,
kRed2 = 10,
kYellow2 = 11,
kGreen2 = 12,
kBlue2 = 13,
kTan2 = 14,
kRed3 = 15,
kYellow3 = 16,
kGreen3 = 17,
kBlue3 = 18,
kTan3 = 19,
kMaxValue = 19,
};
// LINT.ThenChange(//tools/metrics/histograms/metadata/pdf/enums.xml:PDFInk2StrokePenColor)
void ReportDrawStroke(PdfInkBrush::Type type, const ink::Brush& brush);
void ReportEraseStroke(float size);
} // namespace chrome_pdf
#endif // PDF_PDF_INK_METRICS_HANDLER_H_