OLD | NEW |
1 <link rel="import" href="chrome://resources/cr_elements/network/cr_onc_types.htm
l"> | 1 <link rel="import" href="chrome://resources/cr_elements/network/cr_onc_types.htm
l"> |
2 <link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_network
_behavior.html"> | 2 <link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_network
_behavior.html"> |
3 <link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_network
_indicator.html"> | 3 <link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_network
_indicator.html"> |
| 4 <link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_pref_in
dicator.html"> |
| 5 <link rel="import" href="chrome://resources/html/i18n_behavior.html"> |
4 <link rel="import" href="chrome://resources/html/polymer.html"> | 6 <link rel="import" href="chrome://resources/html/polymer.html"> |
5 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt
on.html"> | 7 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt
on.html"> |
6 <link rel="import" href="chrome://resources/polymer/v1_0/paper-checkbox/paper-ch
eckbox.html"> | 8 <link rel="import" href="chrome://resources/polymer/v1_0/paper-checkbox/paper-ch
eckbox.html"> |
7 <link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input
-container.html"> | 9 <link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input
-container.html"> |
8 <link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input
.html"> | 10 <link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input
.html"> |
| 11 <link rel="import" href="/i18n_setup.html"> |
9 <link rel="import" href="/md_select_css.html"> | 12 <link rel="import" href="/md_select_css.html"> |
| 13 <link rel="import" href="/prefs/prefs_behavior.html"> |
10 <link rel="import" href="internet_shared_css.html"> | 14 <link rel="import" href="internet_shared_css.html"> |
11 <link rel="import" href="network_proxy_exclusions.html"> | 15 <link rel="import" href="network_proxy_exclusions.html"> |
12 <link rel="import" href="network_proxy_input.html"> | 16 <link rel="import" href="network_proxy_input.html"> |
13 | 17 |
14 <dom-module id="network-proxy"> | 18 <dom-module id="network-proxy"> |
15 <template> | 19 <template> |
16 <style include="internet-shared md-select"> | 20 <style include="internet-shared md-select"> |
17 cr-policy-network-indicator { | 21 cr-policy-network-indicator, |
| 22 cr-policy-pref-indicator { |
18 -webkit-margin-end: 10px; | 23 -webkit-margin-end: 10px; |
19 } | 24 } |
20 | 25 |
21 network-proxy-input { | 26 network-proxy-input { |
22 margin-bottom: 10px; | 27 margin-bottom: 10px; |
23 } | 28 } |
24 | 29 |
25 /* Use .middle spacing but no flex. */ | 30 /* Use .middle spacing but no flex. */ |
26 .settings-box .middle { | 31 .settings-box .middle { |
27 flex: none; | 32 flex: none; |
28 } | 33 } |
29 | 34 |
| 35 .settings-box.indent { |
| 36 @apply(--settings-list-frame-padding); |
| 37 } |
| 38 |
30 #exceptionsDiv { | 39 #exceptionsDiv { |
31 padding: 10px 0; | 40 padding: 10px 0; |
32 } | 41 } |
33 | 42 |
34 #exceptionsDiv network-proxy-exclusions { | 43 #exceptionsDiv network-proxy-exclusions { |
35 margin: 10px 0; | 44 margin: 10px 0; |
36 } | 45 } |
37 | 46 |
38 #proxyDiv paper-checkbox { | 47 #proxyDiv paper-checkbox { |
39 padding: 10px 0; | 48 padding: 10px 0; |
40 } | 49 } |
41 </style> | 50 </style> |
| 51 |
42 <!-- Policy indicator --> | 52 <!-- Policy indicator --> |
43 <div class="settings-box first single-column" | 53 <div class="settings-box first single-column" |
44 hidden$="[[!isNetworkPolicyControlled( | 54 hidden$="[[!isControlled(networkProperties.ProxySettings.Type)]]"> |
45 networkProperties.ProxySettings.Type)]]"> | 55 <div class="layout horizontal center" |
46 <div class="layout horizontal center"> | 56 hidden$="[[!getShowNetworkPolicyIndicator_(networkProperties)]]"> |
47 <cr-policy-network-indicator | 57 <cr-policy-network-indicator |
48 property="[[networkProperties.ProxySettings.Type]]"> | 58 property="[[networkProperties.ProxySettings.Type]]"> |
49 </cr-policy-network-indicator> | 59 </cr-policy-network-indicator> |
50 <div>$i18n{networkProxyEnforced}</div> | 60 <div>$i18n{networkProxyEnforcedPolicy}</div> |
| 61 </div> |
| 62 <div class="layout horizontal center" |
| 63 hidden$="[[!getShowPrefPolicyIndicator_(networkProperties)]]"> |
| 64 <cr-policy-pref-indicator pref="[[prefs.proxy]]"> |
| 65 </cr-policy-pref-indicator> |
| 66 <div>$i18n{networkProxyControlledExtension}</div> |
51 </div> | 67 </div> |
52 </div> | 68 </div> |
53 | 69 |
54 <!-- Proxy type dropdown --> | 70 <!-- Proxy type dropdown --> |
55 <div class="settings-box continuation"> | 71 <div class="settings-box continuation"> |
56 <div class="start">$i18n{networkProxyConnectionType}</div> | 72 <div class="start">$i18n{networkProxyConnectionType}</div> |
57 <div class="md-select-wrapper"> | 73 <div class="md-select-wrapper"> |
58 <select id="proxyType" class="md-select" on-change="onTypeChange_" | 74 <select id="proxyType" class="md-select" on-change="onTypeChange_" |
59 value="[[proxy.Type]]"> | 75 value="[[proxy.Type]]" |
| 76 disabled="[[!isProxyEditable_(networkProperties, editable)]]"> |
60 <template is="dom-repeat" items="[[proxyTypes_]]"> | 77 <template is="dom-repeat" items="[[proxyTypes_]]"> |
61 <option value="[[item]]">[[proxyTypeDesc_(item)]]</option> | 78 <option value="[[item]]">[[getProxyTypeDesc_(item)]]</option> |
62 </template> | 79 </template> |
63 </select> | 80 </select> |
64 <span class="md-select-underline"></span> | 81 <span class="md-select-underline"></span> |
65 </div> | 82 </div> |
66 </div> | 83 </div> |
67 | 84 |
68 <!-- Autoconfiguration (PAC) --> | 85 <!-- Autoconfiguration (PAC) --> |
69 <div class="settings-box continuation" | 86 <div class="settings-box continuation indent" |
70 hidden$="[[!matches_(proxy.Type, ProxySettingsType_.PAC)]]"> | 87 hidden$="[[!matches_(proxy.Type, ProxySettingsType_.PAC)]]"> |
71 <div>$i18n{networkProxyAutoConfig}</div> | 88 <div>$i18n{networkProxyAutoConfig}</div> |
72 <paper-input no-label-float class="middle" value="{{proxy.PAC}}" | 89 <paper-input no-label-float class="middle" value="{{proxy.PAC}}" |
73 disabled="[[isNetworkPolicyEnforced( | 90 disabled="[[!isEditable_(networkProperties.ProxySettings.PAC)]]" |
74 networkProperties.ProxySettings.PAC)]]" | |
75 on-blur="onProxyInputChange_"> | 91 on-blur="onProxyInputChange_"> |
76 </paper-input> | 92 </paper-input> |
77 </div> | 93 </div> |
78 | 94 |
79 <!-- Web Proxy Auto Discovery (WPAD) --> | 95 <!-- Web Proxy Auto Discovery (WPAD) --> |
80 <div class="settings-box continuation" | 96 <div class="settings-box continuation indent" |
81 hidden$="[[!matches_(proxy.Type, ProxySettingsType_.WPAD)]]"> | 97 hidden$="[[!matches_(proxy.Type, ProxySettingsType_.WPAD)]]"> |
82 <div>$i18n{networkSectionWpad}</div> | 98 <div>$i18n{networkSectionWpad}</div> |
83 <div class="middle">[[WPAD]]</div> | 99 <div class="middle">[[WPAD]]</div> |
84 </div> | 100 </div> |
85 | 101 |
86 <!-- Manual --> | 102 <!-- Manual --> |
87 <div id="proxyDiv" class="settings-box continuation single-column" | 103 <div id="proxyDiv" class="settings-box continuation single-column indent" |
88 hidden$="[[!matches_(proxy.Type, ProxySettingsType_.MANUAL)]]"> | 104 hidden$="[[!matches_(proxy.Type, ProxySettingsType_.MANUAL)]]"> |
89 <paper-checkbox checked="{{useSameProxy_}}"> | 105 <paper-checkbox checked="{{useSameProxy_}}" |
| 106 disabled="[[!isProxyEditable_(networkProperties, editable)]]"> |
90 $i18n{networkProxyUseSame} | 107 $i18n{networkProxyUseSame} |
91 </paper-checkbox> | 108 </paper-checkbox> |
92 <div hidden$="[[!useSameProxy_]]" class="layout vertical"> | 109 <div hidden$="[[!useSameProxy_]]" class="layout vertical"> |
93 <network-proxy-input | 110 <network-proxy-input |
94 on-proxy-change="onProxyInputChange_" | 111 on-proxy-change="onProxyInputChange_" |
95 editable="[[isPropertyEditable_(editable, networkProperties, | 112 editable="[[isEditable_( |
96 'ProxySettings.Manual.HTTPProxy')]]" | 113 networkProperties.ProxySettings.Manual.HTTPProxy.Host, |
| 114 editable)]]" |
97 value="{{proxy.Manual.HTTPProxy}}" | 115 value="{{proxy.Manual.HTTPProxy}}" |
98 label="$i18n{networkProxy}"> | 116 label="$i18n{networkProxy}"> |
99 </network-proxy-input> | 117 </network-proxy-input> |
100 </div> | 118 </div> |
101 <div hidden$="[[useSameProxy_]]" class="layout vertical"> | 119 <div hidden$="[[useSameProxy_]]" class="layout vertical"> |
102 <network-proxy-input | 120 <network-proxy-input |
103 on-proxy-change="onProxyInputChange_" | 121 on-proxy-change="onProxyInputChange_" |
104 editable="[[isPropertyEditable_(editable, networkProperties, | 122 editable="[[isEditable_( |
105 'ProxySettings.Manual.HTTPProxy)')]]" | 123 networkProperties.ProxySettings.Manual.HTTPProxy.Host, |
| 124 editable)]]" |
106 value="{{proxy.Manual.HTTPProxy}}" | 125 value="{{proxy.Manual.HTTPProxy}}" |
107 label="$i18n{networkProxyHttp}"> | 126 label="$i18n{networkProxyHttp}"> |
108 </network-proxy-input> | 127 </network-proxy-input> |
109 <network-proxy-input | 128 <network-proxy-input |
110 on-proxy-change="onProxyInputChange_" | 129 on-proxy-change="onProxyInputChange_" |
111 editable="[[isPropertyEditable_(editable, networkProperties, | 130 editable="[[isEditable_( |
112 'ProxySettings.Manual.SecureHTTPProxy)')]]" | 131 networkProperties.ProxySettings.Manual.SecureHTTPProxy.Hos
t, |
| 132 editable)]]" |
113 value="{{proxy.Manual.SecureHTTPProxy}}" | 133 value="{{proxy.Manual.SecureHTTPProxy}}" |
114 label="$i18n{networkProxyShttp}"> | 134 label="$i18n{networkProxyShttp}"> |
115 </network-proxy-input> | 135 </network-proxy-input> |
116 <network-proxy-input | 136 <network-proxy-input |
117 on-proxy-change="onProxyInputChange_" | 137 on-proxy-change="onProxyInputChange_" |
118 editable="[[isPropertyEditable_(editable, networkProperties, | 138 editable="[[isEditable_( |
119 'ProxySettings.Manual.FTPProxy)')]]" | 139 networkProperties.ProxySettings.Manual.FTPProxy.Host, |
| 140 editable)]]" |
120 value="{{proxy.Manual.FTPProxy}}" | 141 value="{{proxy.Manual.FTPProxy}}" |
121 label="$i18n{networkProxyFtp}"> | 142 label="$i18n{networkProxyFtp}"> |
122 </network-proxy-input> | 143 </network-proxy-input> |
123 <network-proxy-input | 144 <network-proxy-input |
124 on-proxy-change="onProxyInputChange_" | 145 on-proxy-change="onProxyInputChange_" |
125 editable="[[isPropertyEditable_(editable, networkProperties, | 146 editable="[[isEditable_( |
126 'ProxySettings.Manual.SOCKS)')]]" | 147 networkProperties.ProxySettings.Manual.SOCKS.Host, |
| 148 editable)]]" |
127 value="{{proxy.Manual.SOCKS}}" | 149 value="{{proxy.Manual.SOCKS}}" |
128 label="$i18n{networkProxySocks}"> | 150 label="$i18n{networkProxySocks}"> |
129 </network-proxy-input> | 151 </network-proxy-input> |
130 </div> | 152 </div> |
131 | 153 |
132 <div id="exceptionsDiv"> | 154 <div id="exceptionsDiv" |
| 155 hidden="[[!isProxyEditable_(networkProperties, editable)]]"> |
133 <div>$i18n{networkProxyExceptionList}</div> | 156 <div>$i18n{networkProxyExceptionList}</div> |
134 <network-proxy-exclusions on-proxy-change="onProxyExclusionsChange_" | 157 <network-proxy-exclusions on-proxy-change="onProxyExclusionsChange_" |
135 exclusions="{{proxy.ExcludeDomains}}"> | 158 exclusions="{{proxy.ExcludeDomains}}"> |
136 </network-proxy-exclusions> | 159 </network-proxy-exclusions> |
137 <div class="layout horizontal"> | 160 <div class="layout horizontal"> |
138 <paper-input-container no-label-float class="flex"> | 161 <paper-input-container no-label-float class="flex"> |
139 <input id="proxyExclusion" is="iron-input"> | 162 <input id="proxyExclusion" is="iron-input"> |
140 </paper-input-container> | 163 </paper-input-container> |
141 <paper-button on-tap="onAddProxyExclusionTap_"> | 164 <paper-button on-tap="onAddProxyExclusionTap_"> |
142 $i18n{networkProxyAddException} | 165 $i18n{networkProxyAddException} |
143 </paper-button> | 166 </paper-button> |
144 </div> | 167 </div> |
145 </div> | 168 </div> |
146 </div> | 169 </div> |
147 </template> | 170 </template> |
148 <script src="network_proxy.js"></script> | 171 <script src="network_proxy.js"></script> |
149 </dom-module> | 172 </dom-module> |
OLD | NEW |