File: payment_request_dialog_view_ids.h

package info (click to toggle)
chromium 138.0.7204.183-1~deb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-proposed-updates
  • size: 6,080,960 kB
  • sloc: cpp: 34,937,079; ansic: 7,176,967; javascript: 4,110,704; python: 1,419,954; asm: 946,768; xml: 739,971; pascal: 187,324; sh: 89,623; perl: 88,663; objc: 79,944; sql: 50,304; cs: 41,786; fortran: 24,137; makefile: 21,811; php: 13,980; tcl: 13,166; yacc: 8,925; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (112 lines) | stat: -rw-r--r-- 3,595 bytes parent folder | download | duplicates (5)
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
// Copyright 2017 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_VIEWS_PAYMENTS_PAYMENT_REQUEST_DIALOG_VIEW_IDS_H_
#define CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_DIALOG_VIEW_IDS_H_

#include "components/autofill/core/browser/field_types.h"

// This defines an enumeration of IDs that can uniquely identify a view within
// the scope of the Payment Request Dialog.

namespace payments {

enum class DialogViewID : int {
  VIEW_ID_NONE = autofill::MAX_VALID_FIELD_TYPE,
  CONTENT_VIEW,  // The main content view filled by each sheet

  // The following are views::Button (clickable).
  PAYMENT_SHEET_CONTACT_INFO_SECTION,
  PAYMENT_SHEET_SUMMARY_SECTION,
  PAYMENT_SHEET_PAYMENT_METHOD_SECTION,
  PAYMENT_SHEET_SHIPPING_ADDRESS_SECTION,
  PAYMENT_SHEET_SHIPPING_OPTION_SECTION,
  PAYMENT_METHOD_ADD_CARD_BUTTON,
  PAYMENT_METHOD_ADD_SHIPPING_BUTTON,
  PAYMENT_METHOD_ADD_CONTACT_BUTTON,
  EDITOR_SAVE_BUTTON,
  PAY_BUTTON,
  CANCEL_BUTTON,
  BACK_BUTTON,
  CVC_PROMPT_CONFIRM_BUTTON,
  ADD_BILLING_ADDRESS_BUTTON,
  SAVE_ADDRESS_BUTTON,
  EDIT_ITEM_BUTTON,

  // The following are buttons that are displayed inline in the Payment Sheet
  // sections when no option is selected or available.
  PAYMENT_SHEET_CONTACT_INFO_SECTION_BUTTON,
  PAYMENT_SHEET_PAYMENT_METHOD_SECTION_BUTTON,
  PAYMENT_SHEET_SHIPPING_ADDRESS_SECTION_BUTTON,
  PAYMENT_SHEET_SHIPPING_OPTION_SECTION_BUTTON,

  // The following are StyledLabel objects.
  ORDER_SUMMARY_TOTAL_AMOUNT_LABEL,
  ORDER_SUMMARY_TOTAL_CURRENCY_LABEL,
  ORDER_SUMMARY_LINE_ITEM_1,
  ORDER_SUMMARY_LINE_ITEM_2,
  ORDER_SUMMARY_LINE_ITEM_3,
  DATA_SOURCE_LABEL,

  // This is the title used at the top of each sheet.
  SHEET_TITLE,

  // The following are Label objects.
  SHIPPING_OPTION_DESCRIPTION,
  SHIPPING_OPTION_AMOUNT,

  // Used in warning labels. This is unique at the scope of the each sheet.
  WARNING_LABEL,

  // Used in profile labels to annotate each line of the grouping.
  PROFILE_LABEL_LINE_1,
  PROFILE_LABEL_LINE_2,
  PROFILE_LABEL_LINE_3,
  PROFILE_LABEL_ERROR,

  // The following are views contained within the Payment Method Sheet.
  CONTACT_INFO_SHEET_LIST_VIEW,
  PAYMENT_METHOD_SHEET_LIST_VIEW,
  SHIPPING_ADDRESS_SHEET_LIST_VIEW,

  // Used in selectable rows. Each row in a view reuses this ID, but the ID is
  // unique at the scope of the parent row.
  CHECKMARK_VIEW,

  // The CVC text field in the unmask sheet.
  // TODO(crbug.com/40182225): Deprecated; remove usage.
  CVC_PROMPT_TEXT_FIELD,

  // The following are the ids for the individual sheets.
  CONTACT_INFO_EDITOR_SHEET,
  CREDIT_CARD_EDITOR_SHEET,
  ERROR_SHEET,
  ORDER_SUMMARY_SHEET,
  PAYMENT_REQUEST_SHEET,
  SHIPPING_ADDRESS_EDITOR_SHEET,

  // The sheet opens payment app window.
  PAYMENT_APP_OPENED_WINDOW_SHEET,

  // The icon displayed in the header for a payment app's window.
  PAYMENT_APP_HEADER_ICON,

  // The header view of a payment app's window.
  PAYMENT_APP_HEADER,

  // The scroll view of the payment sheet.
  PAYMENT_SHEET_SCROLL_VIEW,

  // NOTE: Keep these values last.
  // Used to offset the IDs of input fields, which gets added to the Autofill
  // type value they represent.
  INPUT_FIELD_TYPE_OFFSET,
  // Used to label the error labels with an offset, which gets added to
  // the Autofill type value they represent.
  ERROR_LABEL_OFFSET = INPUT_FIELD_TYPE_OFFSET + autofill::MAX_VALID_FIELD_TYPE,
};

}  // namespace payments

#endif  // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_DIALOG_VIEW_IDS_H_