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
|
// 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.
/**
* Enumeration of valid drop locations relative to an element. These are
* bit masks to allow combining multiple locations in a single value.
* @enum {number}
* @const
*/
export const DropPosition = {
NONE: 0,
ABOVE: 1,
ON: 2,
BELOW: 4,
};
/**
* Commands which can be handled by the CommandManager. This enum is also used
* for metrics and should be kept in sync with BookmarkManagerCommand in
* enums.xml. Values must never be renumbered or reused.
* @enum {number}
* @const
*/
export const Command = {
EDIT: 0,
COPY_URL: 1,
SHOW_IN_FOLDER: 2,
DELETE: 3,
OPEN_NEW_TAB: 4,
OPEN_NEW_WINDOW: 5,
OPEN_INCOGNITO: 6,
UNDO: 7,
REDO: 8,
// OPEN triggers when you double-click an item. NOT USED FOR METRICS.
OPEN: 9,
SELECT_ALL: 10,
DESELECT_ALL: 11,
COPY: 12,
CUT: 13,
PASTE: 14,
SORT: 15,
ADD_BOOKMARK: 16,
ADD_FOLDER: 17,
IMPORT: 18,
EXPORT: 19,
HELP_CENTER: 20,
// Added for more precise metrics purposes. OPEN is re-mapped to one of these.
OPEN_BOOKMARK: 21,
OPEN_FOLDER: 22,
// Append new values to the end of the enum.
MAX_VALUE: 23,
};
/**
* Where the menu was opened from. This enum is also used for metrics and should
* be kept in sync with BookmarkManagerMenuSource in enums.xml. Values must
* never be renumbered or reused.
* @enum {number}
* @const
*/
export const MenuSource = {
NONE: 0,
ITEM: 1,
TREE: 2,
TOOLBAR: 3,
LIST: 4,
// Append new values to the end of the enum.
NUM_VALUES: 5,
};
/**
* Mirrors the C++ enum from IncognitoModePrefs.
* @enum {number}
* @const
*/
export const IncognitoAvailability = {
ENABLED: 0,
DISABLED: 1,
FORCED: 2,
};
/** @const */
export const LOCAL_STORAGE_FOLDER_STATE_KEY = 'folderOpenState';
/** @const */
export const LOCAL_STORAGE_TREE_WIDTH_KEY = 'treeWidth';
/** @const */
export const ROOT_NODE_ID = '0';
/** @const */
export const BOOKMARKS_BAR_ID = '1';
/** @const {number} */
export const OPEN_CONFIRMATION_LIMIT = 15;
/**
* Folders that are beneath this depth will be closed by default in the folder
* tree (where the Bookmarks Bar folder is at depth 0).
* @const {number}
*/
export const FOLDER_OPEN_BY_DEFAULT_DEPTH = 1;
|