OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** | 5 /** |
6 * @fileoverview | 6 * @fileoverview |
7 * 'settings-internet-detail' is the settings subpage containing details | 7 * 'settings-internet-detail' is the settings subpage containing details |
8 * for a network. | 8 * for a network. |
9 */ | 9 */ |
10 (function() { | 10 (function() { |
11 'use strict'; | 11 'use strict'; |
12 | 12 |
13 /** @const */ var CARRIER_VERIZON = 'Verizon Wireless'; | 13 /** @const */ var CARRIER_VERIZON = 'Verizon Wireless'; |
14 | 14 |
15 Polymer({ | 15 Polymer({ |
16 is: 'settings-internet-detail-page', | 16 is: 'settings-internet-detail-page', |
17 | 17 |
18 behaviors: [CrPolicyNetworkBehavior], | 18 behaviors: [CrPolicyNetworkBehavior], |
19 | 19 |
20 properties: { | 20 properties: { |
21 /** | 21 /** |
22 * The network GUID to display details for. | 22 * The network GUID to display details for. |
23 */ | 23 */ |
24 guid: { | 24 guid: { |
25 type: String, | 25 type: String, |
26 value: '', | 26 value: '', |
27 observer: 'guidChanged_', | |
28 }, | 27 }, |
29 | 28 |
30 /** | 29 /** |
31 * The current properties for the network matching |guid|. | 30 * The current properties for the network matching |guid|. |
32 * @type {!CrOnc.NetworkProperties|undefined} | 31 * @type {!CrOnc.NetworkProperties|undefined} |
33 */ | 32 */ |
34 networkProperties: { | 33 networkProperties: { |
35 type: Object, | 34 type: Object, |
36 observer: 'networkPropertiesChanged_' | 35 observer: 'networkPropertiesChanged_' |
37 }, | 36 }, |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 | 88 |
90 /** | 89 /** |
91 * Interface for networkingPrivate calls, passed from internet_page. | 90 * Interface for networkingPrivate calls, passed from internet_page. |
92 * @type {NetworkingPrivate} | 91 * @type {NetworkingPrivate} |
93 */ | 92 */ |
94 networkingPrivate: { | 93 networkingPrivate: { |
95 type: Object, | 94 type: Object, |
96 }, | 95 }, |
97 }, | 96 }, |
98 | 97 |
| 98 observers: [ |
| 99 'guidChanged_(guid, networkingPrivate)', |
| 100 ], |
| 101 |
99 /** | 102 /** |
100 * Listener function for chrome.networkingPrivate.onNetworksChanged event. | 103 * Listener function for chrome.networkingPrivate.onNetworksChanged event. |
101 * @type {function(!Array<string>)} | 104 * @type {function(!Array<string>)} |
102 * @private | 105 * @private |
103 */ | 106 */ |
104 networksChangedListener_: function() {}, | 107 networksChangedListener_: function() {}, |
105 | 108 |
106 /** @override */ | 109 /** @override */ |
107 attached: function() { | 110 attached: function() { |
108 this.networksChangedListener_ = this.onNetworksChangedEvent_.bind(this); | 111 this.networksChangedListener_ = this.onNetworksChangedEvent_.bind(this); |
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
698 */ | 701 */ |
699 allPropertiesMatch_: function(curValue, newValue) { | 702 allPropertiesMatch_: function(curValue, newValue) { |
700 for (let key in newValue) { | 703 for (let key in newValue) { |
701 if (newValue[key] != curValue[key]) | 704 if (newValue[key] != curValue[key]) |
702 return false; | 705 return false; |
703 } | 706 } |
704 return true; | 707 return true; |
705 } | 708 } |
706 }); | 709 }); |
707 })(); | 710 })(); |
OLD | NEW |