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

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

Issue 1219753007: Add network proxy input to md-settings internet details (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@issue_470445_onc_proxy
Patch Set: Created 5 years, 5 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
(Empty)
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.
4
5 /**
6 * @fileoverview Polymer element for displaying and editing a single
7 * network proxy value. When the URL or port changes, a 'changed' event is
8 * fired with the combined url and port values passed as a single string,
9 * url:port.
10 */
11 Polymer({
12 is: 'network-proxy-input',
13
14 properties: {
15 /**
16 * Whether or not the proxy value can be edited.
17 */
18 editable: {
19 type: Boolean,
20 value: false
21 },
22
23 /**
24 * A label for the proxy value.
25 */
26 label: {
27 type: String,
28 value: 'Proxy'
29 },
30
31 /**
32 * The proxy object.
33 * @type {?CrOnc.ProxyLocation}
34 */
35 value: {
36 type: Object,
37 value: function() { return { Host: '', Port: 80 }; },
38 notify: true
39 },
40 },
41
42 /**
43 * Event triggered when an input value changes.
44 * @private
45 */
46 onValueChanged_: function() {
47 var port = parseInt(this.value.Port);
48 if (isNaN(port))
49 port = 80;
50 this.value.Port = port;
51 this.fire('changed', { value: this.value });
52 }
53 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698