summaryrefslogtreecommitdiff
path: root/chromium/ui/webui/resources/cr_elements/chromeos/cr_picture/cr_picture_types.js
blob: cf6c7f3f960d6be368c7caff119e8db600d95d35 (plain)
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
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

/* #export */ const CrPicture = {};

/**
 * Contains the possible types for picture list image elements.
 * @enum {string}
 */
CrPicture.SelectionTypes = {
  CAMERA: 'camera',
  FILE: 'file',
  PROFILE: 'profile',
  OLD: 'old',
  DEFAULT: 'default',
  NONE: '',
};

/**
 * An picture list image element.
 * @typedef {{
 *   dataset: {
 *     type: !CrPicture.SelectionTypes,
 *     index: (number|undefined),
 *     imageIndex: (number|undefined),
 *   },
 *   src: string,
 * }}
 */
CrPicture.ImageElement;

CrPicture.kDefaultImageUrl = 'chrome://theme/IDR_LOGIN_DEFAULT_USER';