Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Side by Side Diff: chrome/browser/resources/settings/internet_page/network_proxy_exclusions.js

Issue 2617663002: WIP: run clang-format-js on lots of things (Closed)
Patch Set: merge Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 Polymer element for displaying a list of proxy exclusions. 6 * @fileoverview Polymer element for displaying a list of proxy exclusions.
7 * Includes UI for adding, changing, and removing entries. 7 * Includes UI for adding, changing, and removing entries.
8 */ 8 */
9 9
10 (function() { 10 (function() {
11 11
12 Polymer({ 12 Polymer({
13 is: 'network-proxy-exclusions', 13 is: 'network-proxy-exclusions',
14 14
15 properties: { 15 properties: {
16 /** Whether or not the proxy values can be edited. */ 16 /** Whether or not the proxy values can be edited. */
17 editable: { 17 editable: {
18 type: Boolean, 18 type: Boolean,
19 value: false, 19 value: false,
20 },
21
22 /**
23 * The list of exclusions.
24 * @type {!Array<string>}
25 */
26 exclusions: {
27 type: Array,
28 value: function() {
29 return [];
30 },
31 notify: true
32 }
20 }, 33 },
21 34
22 /** 35 /**
23 * The list of exclusions. 36 * Event triggered when an item is removed.
24 * @type {!Array<string>} 37 * @param {!{model: !{index: number}}} event
38 * @private
25 */ 39 */
26 exclusions: { 40 onRemoveTap_: function(event) {
27 type: Array, 41 var index = event.model.index;
28 value: function() { return []; }, 42 this.splice('exclusions', index, 1);
29 notify: true 43 this.fire('proxy-change');
30 } 44 }
31 }, 45 });
32
33 /**
34 * Event triggered when an item is removed.
35 * @param {!{model: !{index: number}}} event
36 * @private
37 */
38 onRemoveTap_: function(event) {
39 var index = event.model.index;
40 this.splice('exclusions', index, 1);
41 this.fire('proxy-change');
42 }
43 });
44 })(); 46 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698