[sql] Remove _HAS_EXCEPTIONS=0 from build info.
[chromium-blink-merge.git] / chrome / browser / resources / settings / internet_page / network_list.js
blobf025903ff044c1fde838fefc5e69f879afba5e12
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 /**
6 * @fileoverview Polymer element for displaying a collapsable list of networks.
7 */
9 (function() {
11 /**
12 * Polymer class definition for 'network-list'.
13 * TODO(stevenjb): Update with iron-list(?) once implemented in Polymer 1.0.
14 * @element network-list
16 Polymer({
17 is: 'network-list',
19 properties: {
20 /**
21 * The maximum height in pixels for the list.
23 maxHeight: {
24 type: Number,
25 value: 1000,
26 observer: 'maxHeightChanged_'
29 /**
30 * The list of network state properties for the items to display.
32 * @type {!Array<!CrOnc.NetworkStateProperties>}
34 networks: {
35 type: Array,
36 value: function() { return []; }
39 /**
40 * True if the list is opened.
42 opened: {
43 type: Boolean,
44 value: true
48 /**
49 * Polymer maxHeight changed method.
51 maxHeightChanged_: function() {
52 this.$.container.style.maxHeight = this.maxHeight + 'px';
55 /**
56 * Called when the cr-collapse element changes size (i.e. is opened).
57 * @private
59 onResized_: function() {
60 if (this.opened)
61 this.$.networkList.updateSize();
64 /**
65 * Event triggered when a list item is selected.
66 * @param {!{target: !NetworkListItem}} event
67 * @private
69 onSelected_: function(event) {
70 this.fire('selected', event.model.item);
72 });
73 })();