1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 cr.define('downloads', function() {
10 * The states a download can be in. These correspond to states defined in
11 * DownloadsDOMHandler::CreateDownloadItemValue
15 IN_PROGRESS: 'IN_PROGRESS',
16 CANCELLED: 'CANCELLED',
19 DANGEROUS: 'DANGEROUS',
20 INTERRUPTED: 'INTERRUPTED',
24 * Explains why a download is in DANGEROUS state.
28 NOT_DANGEROUS: 'NOT_DANGEROUS',
29 DANGEROUS_FILE: 'DANGEROUS_FILE',
30 DANGEROUS_URL: 'DANGEROUS_URL',
31 DANGEROUS_CONTENT: 'DANGEROUS_CONTENT',
32 UNCOMMON_CONTENT: 'UNCOMMON_CONTENT',
33 DANGEROUS_HOST: 'DANGEROUS_HOST',
34 POTENTIALLY_UNWANTED: 'POTENTIALLY_UNWANTED',
38 /** @type {downloads.ItemView} */
42 * @param {!downloads.Data} data Info about the download.
44 render: function(data) {
45 this.view = this.view || new downloads.ItemView;
46 this.view.update(data);
49 unrender: function() {