1 <link rel=
"import" href=
"chrome://resources/html/action_link.html">
2 <link rel=
"import" href=
"chrome://resources/html/cr.html">
3 <link rel=
"import" href=
"chrome://resources/html/load_time_data.html">
4 <link rel=
"import" href=
"chrome://resources/polymer/v1_0/polymer/polymer.html">
5 <link rel=
"import" href=
"chrome://resources/polymer/v1_0/paper-button/paper-button.html">
6 <link rel=
"import" href=
"chrome://resources/polymer/v1_0/paper-material/paper-material.html">
7 <link rel=
"import" href=
"chrome://resources/polymer/v1_0/paper-progress/paper-progress.html">
8 <link rel=
"import" href=
"chrome://downloads/action_service.html">
9 <link rel=
"import" href=
"chrome://downloads/constants.html">
10 <link rel=
"import" href=
"chrome://downloads/throttled_icon_loader.html">
12 <dom-module id=
"downloads-item">
14 <template is=
"dom-if" if=
"[[!hideDate]]">
15 <h3 id=
"date">[[computeDate_(data_.since_string, data_.date_string)]]
</h3>
18 <paper-material id=
"content" on-dragstart=
"onDragStart_"
19 elevation$=
"[[computeElevation_(isActive_)]]"
20 class$=
"[[computeClass_(isActive_, isDangerous_, showProgress_)]]">
21 <div id=
"file-icon-wrapper" class=
"icon-wrapper">
22 <img class=
"icon" id=
"file-icon" alt=
"" hidden$=
"[[isDangerous_]]">
23 <div class=
"icon" id=
"warning" hidden$=
"[[!isDangerous_]]"></div>
27 <div id=
"title-area"><!--
28 Can't have any line breaks.
29 --><a is=
"action-link" id=
"file-link" href$=
"[[data_.url]]"
30 on-click=
"onFileLinkClick_"
31 hidden$=
"[[!completelyOnDisk_]]">[[data_.file_name]]
</a><!--
34 hidden$=
"[[completelyOnDisk_]]">[[data_.file_name]]
</span>
35 <span id=
"tag">[[computeTag_(data_.state, data_.last_reason_text, data_.file_externally_removed)]]
</span>
38 <a id=
"url" target=
"_blank" href$=
"[[data_.url]]">[[data_.url]]
</a>
40 <div id=
"description">[[computeDescription_(data_.state, data_.danger_type, data_.file_name, data_.progress_status_text)]]
</div>
42 <template is=
"dom-if" if=
"[[showProgress_]]">
43 <paper-progress id=
"progress"
44 indeterminate$=
"[[isIndeterminate_(data_.percent)]]"
45 value$=
"[[data_.percent]]"></paper-progress>
48 <div id=
"safe" class=
"controls" hidden$=
"[[isDangerous_]]">
49 <template is=
"dom-if" if=
"[[completelyOnDisk_]]">
50 <paper-button id=
"show" on-click=
"onShowClick_"
51 lowercase noink
>[[i18n_.show]]
</paper-button>
53 <template is=
"dom-if" if=
"[[data_.retry]]">
54 <paper-button id=
"retry"
55 on-click=
"onRetryClick_">[[i18n_.retry]]
</paper-button>
57 <template is=
"dom-if" if=
"[[isInProgress_]]">
58 <paper-button id=
"pause"
59 on-click=
"onPauseClick_">[[i18n_.pause]]
</paper-button>
61 <template is=
"dom-if" if=
"[[data_.resume]]">
62 <paper-button id=
"resume"
63 on-click=
"onResumeClick_">[[i18n_.resume]]
</paper-button>
65 <template is=
"dom-if" if=
"[[showCancel_]]">
66 <paper-button id=
"cancel"
67 on-click=
"onCancelClick_">[[i18n_.cancel]]
</paper-button>
69 <span id=
"controlled-by"><!-- Text populated dynamically. --></span>
72 <template is=
"dom-if" if=
"[[isDangerous_]]">
73 <div id=
"dangerous" class=
"controls">
74 <!-- Dangerous file types (e.g. .exe, .jar). -->
75 <template is=
"dom-if" if=
"[[!isMalware_]]">
76 <paper-button id=
"discard" on-click=
"onDiscardDangerous_"
77 class=
"discard">[[i18n_.discard]]
</paper-button>
78 <paper-button id=
"save" on-click=
"onSaveDangerous_"
79 class=
"keep">[[i18n_.save]]
</paper-button>
82 <!-- Things that safe browsing has determined to be dangerous. -->
83 <template is=
"dom-if" if=
"[[isMalware_]]">
84 <paper-button id=
"danger-remove" on-click=
"onDiscardDangerous_"
85 class=
"discard">[[i18n_.remove]]
</paper-button>
86 <paper-button id=
"restore" on-click=
"onSaveDangerous_"
87 class=
"keep">[[i18n_.restore]
</paper-button>
93 <div id=
"remove-wrapper" class=
"icon-wrapper">
94 <paper-icon-button id=
"remove" icon=
"clear"
95 i18n-values=
"title:controlRemoveFromList"
96 style$=
"[[computeRemoveStyle_(isDangerous_, showCancel_)]]"
97 on-click=
"onRemoveClick_"></paper-icon-button>
100 <div id=
"incognito" i18n-values=
"title:inIncognito"
101 hidden$=
"[[!data_.otr]]"></div>
105 <link rel=
"import" type=
"css" href=
"chrome://resources/css/action_link.css">
106 <link rel=
"import" type=
"css" href=
"chrome://downloads/shared_style.css">
107 <link rel=
"import" type=
"css" href=
"chrome://downloads/item.css">
108 <script src=
"chrome://downloads/item.js"></script>