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

Side by Side Diff: chrome/browser/resources/settings/internet_page/network_proxy.html

Issue 2528803002: MD Settings: Internet: Add/fix remaining policy items (Closed)
Patch Set: Rebase Created 4 years 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 <link rel="import" href="chrome://resources/cr_elements/cr_dialog/cr_dialog.html "> 1 <link rel="import" href="chrome://resources/cr_elements/cr_dialog/cr_dialog.html ">
2 <link rel="import" href="chrome://resources/cr_elements/network/cr_onc_types.htm l"> 2 <link rel="import" href="chrome://resources/cr_elements/network/cr_onc_types.htm l">
3 <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 _behavior.html">
4 <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_network _indicator.html">
5 <link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_pref_in dicator.html">
6 <link rel="import" href="chrome://resources/html/i18n_behavior.html"> 5 <link rel="import" href="chrome://resources/html/i18n_behavior.html">
7 <link rel="import" href="chrome://resources/html/md_select_css.html"> 6 <link rel="import" href="chrome://resources/html/md_select_css.html">
8 <link rel="import" href="chrome://resources/html/polymer.html"> 7 <link rel="import" href="chrome://resources/html/polymer.html">
9 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt on.html"> 8 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt on.html">
10 <link rel="import" href="chrome://resources/polymer/v1_0/paper-checkbox/paper-ch eckbox.html"> 9 <link rel="import" href="chrome://resources/polymer/v1_0/paper-checkbox/paper-ch eckbox.html">
11 <link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input -container.html"> 10 <link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input -container.html">
12 <link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input .html"> 11 <link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input .html">
12 <link rel="import" href="/controls/extension_controlled_indicator.html">
13 <link rel="import" href="/controls/settings_checkbox.html"> 13 <link rel="import" href="/controls/settings_checkbox.html">
14 <link rel="import" href="/i18n_setup.html"> 14 <link rel="import" href="/i18n_setup.html">
15 <link rel="import" href="/prefs/prefs_behavior.html"> 15 <link rel="import" href="/prefs/prefs_behavior.html">
16 <link rel="import" href="/settings_vars_css.html"> 16 <link rel="import" href="/settings_vars_css.html">
17 <link rel="import" href="internet_shared_css.html"> 17 <link rel="import" href="internet_shared_css.html">
18 <link rel="import" href="network_proxy_exclusions.html"> 18 <link rel="import" href="network_proxy_exclusions.html">
19 <link rel="import" href="network_proxy_input.html"> 19 <link rel="import" href="network_proxy_input.html">
20 20
21 <dom-module id="network-proxy"> 21 <dom-module id="network-proxy">
22 <template> 22 <template>
23 <style include="internet-shared md-select"> 23 <style include="internet-shared md-select">
24 cr-policy-network-indicator, 24 cr-policy-network-indicator {
25 cr-policy-pref-indicator {
26 -webkit-margin-end: 10px; 25 -webkit-margin-end: 10px;
27 } 26 }
28 27
28 extension-controlled-indicator {
29 -webkit-margin-start: 0;
30 width: 100%;
31 }
32
29 network-proxy-input { 33 network-proxy-input {
30 margin-bottom: 10px; 34 margin-bottom: 10px;
31 } 35 }
32 36
33 /* Use .middle spacing but no flex. */ 37 /* Use .middle spacing but no flex. */
34 .settings-box .middle { 38 .settings-box .middle {
35 flex: none; 39 flex: none;
36 } 40 }
37 41
38 .settings-box.indent {
39 @apply(--settings-list-frame-padding);
40 }
41
42 #exceptionsDiv { 42 #exceptionsDiv {
43 padding: 10px 0; 43 padding: 10px 0;
44 } 44 }
45 45
46 #exceptionsDiv network-proxy-exclusions { 46 #exceptionsDiv network-proxy-exclusions {
47 margin: 10px 0; 47 margin: 10px 0;
48 } 48 }
49 49
50 #proxyDiv paper-checkbox { 50 #proxyDiv paper-checkbox {
51 padding: 10px 0; 51 padding: 10px 0;
52 } 52 }
53 </style> 53 </style>
54 54
55 <!-- Policy indicator --> 55 <!-- Policy indicator. Only one dom-if below will be shown. -->
56 <div class="settings-box first single-column" 56 <template is="dom-if"
57 hidden$="[[!isControlled(networkProperties.ProxySettings.Type)]]"> 57 if="[[shouldShowNetworkPolicyIndicator_(networkProperties)]]">
58 <div class="layout horizontal center" 58 <div class="settings-box continuation single-column">
59 hidden$="[[!getShowNetworkPolicyIndicator_(networkProperties)]]"> 59 <div class="layout horizontal center">
60 <cr-policy-network-indicator 60 <cr-policy-network-indicator
61 property="[[networkProperties.ProxySettings.Type]]"> 61 property="[[networkProperties.ProxySettings.Type]]">
62 </cr-policy-network-indicator> 62 </cr-policy-network-indicator>
63 <div>$i18n{networkProxyEnforcedPolicy}</div> 63 <div>$i18n{networkProxyEnforcedPolicy}</div>
64 </div>
64 </div> 65 </div>
65 <div class="layout horizontal center" 66 </template>
66 hidden$="[[!getShowPrefPolicyIndicator_(networkProperties)]]"> 67 <template is="dom-if"
67 <cr-policy-pref-indicator pref="[[prefs.proxy]]"> 68 if="[[shouldShowExtensionIndicator_(networkProperties)]]">
68 </cr-policy-pref-indicator> 69 <div class="settings-box continuation single-column">
69 <div>$i18n{networkProxyControlledExtension}</div> 70 <extension-controlled-indicator
71 extension-id="[[prefs.proxy.extensionId]]"
72 extension-name="[[prefs.proxy.controlledByName]]"
73 extension-can-be-disabled="[[prefs.proxy.extensionCanBeDisabled]]">
74 </extension-controlled-indicator>
70 </div> 75 </div>
71 </div> 76 </template>
72 77
73 <!-- Allow shared proxies --> 78 <!-- Allow shared proxies -->
74 <div class="settings-box continuation" 79 <div class="settings-box continuation"
75 hidden$="[[!getShowAllowShared_( 80 hidden$="[[!shouldShowAllowShared_(
76 networkProperties.ProxySettings.Type)]]"> 81 networkProperties.ProxySettings.Type)]]">
77 <settings-checkbox id="allowShared" 82 <settings-checkbox id="allowShared"
78 pref="{{prefs.settings.use_shared_proxies}}" 83 pref="{{prefs.settings.use_shared_proxies}}"
79 no-set-pref label="$i18n{networkProxyAllowShared}" 84 no-set-pref label="$i18n{networkProxyAllowShared}"
80 on-change="onAllowSharedProxiesChange_"> 85 on-change="onAllowSharedProxiesChange_">
81 </settings-checkbox> 86 </settings-checkbox>
82 </div> 87 </div>
83 88
84 <!-- Proxy type dropdown --> 89 <!-- Proxy type dropdown -->
85 <div class="settings-box continuation"> 90 <div class="settings-box continuation">
86 <div class="start">$i18n{networkProxyConnectionType}</div> 91 <div class="start">$i18n{networkProxyConnectionType}</div>
87 <div class="md-select-wrapper"> 92 <div class="md-select-wrapper">
88 <select id="proxyType" class="md-select" on-change="onTypeChange_" 93 <select id="proxyType" class="md-select" on-change="onTypeChange_"
89 value="[[proxy.Type]]" 94 value="[[proxy.Type]]"
90 disabled="[[!isProxyEditable_(networkProperties, editable, 95 disabled="[[!isProxyEditable_(networkProperties, editable,
91 useSharedProxies_)]]"> 96 useSharedProxies_)]]">
92 <template is="dom-repeat" items="[[proxyTypes_]]"> 97 <template is="dom-repeat" items="[[proxyTypes_]]">
93 <option value="[[item]]">[[getProxyTypeDesc_(item)]]</option> 98 <option value="[[item]]">[[getProxyTypeDesc_(item)]]</option>
94 </template> 99 </template>
95 </select> 100 </select>
96 <span class="md-select-underline"></span> 101 <span class="md-select-underline"></span>
97 </div> 102 </div>
98 </div> 103 </div>
99 104
100 <!-- Autoconfiguration (PAC) --> 105 <!-- Autoconfiguration (PAC) -->
101 <div class="settings-box continuation indent" 106 <div class="settings-box continuation indent"
102 hidden$="[[!matches_(proxy.Type, ProxySettingsType_.PAC)]]"> 107 hidden$="[[!matches_(proxy.Type, ProxySettingsType_.PAC)]]">
103 <div>$i18n{networkProxyAutoConfig}</div> 108 <div>$i18n{networkProxyAutoConfig}</div>
104 <paper-input no-label-float class="middle" value="{{proxy.PAC}}" 109 <paper-input no-label-float class="middle" value="{{proxy.PAC}}"
105 disabled="[[!isEditable_(networkProperties.ProxySettings.PAC, 110 disabled="[[!isEditable_(networkProperties.ProxySettings.PAC,
106 useSharedProxies_)]]" 111 useSharedProxies_)]]"
107 on-blur="onProxyInputChange_"> 112 on-blur="onProxyInputChange_">
108 </paper-input> 113 </paper-input>
109 </div> 114 </div>
110 115
111 <!-- Web Proxy Auto Discovery (WPAD) --> 116 <!-- Web Proxy Auto Discovery (WPAD) -->
112 <div class="settings-box continuation indent" 117 <div class="settings-box continuation indent"
113 hidden$="[[!matches_(proxy.Type, ProxySettingsType_.WPAD)]]"> 118 hidden$="[[!matches_(proxy.Type, ProxySettingsType_.WPAD)]]">
114 <div>$i18n{networkSectionWpad}</div> 119 <div>$i18n{networkSectionWpad}</div>
115 <div class="middle">[[WPAD]]</div> 120 <div class="middle">[[WPAD]]</div>
116 </div> 121 </div>
117 122
118 <!-- Manual --> 123 <!-- Manual -->
119 <div id="proxyDiv" class="settings-box continuation single-column indent" 124 <div id="proxyDiv" class="settings-box continuation single-column indent"
120 hidden$="[[!matches_(proxy.Type, ProxySettingsType_.MANUAL)]]"> 125 hidden$="[[!matches_(proxy.Type, ProxySettingsType_.MANUAL)]]">
121 <paper-checkbox checked="{{useSameProxy_}}" 126 <paper-checkbox checked="{{useSameProxy_}}"
122 disabled="[[!isProxyEditable_(networkProperties, editable, 127 disabled="[[!isProxyEditable_(networkProperties, editable,
123 useSharedProxies_)]]"> 128 useSharedProxies_)]]">
124 $i18n{networkProxyUseSame} 129 $i18n{networkProxyUseSame}
125 </paper-checkbox> 130 </paper-checkbox>
126 <div hidden$="[[!useSameProxy_]]" class="layout vertical"> 131 <div hidden$="[[!useSameProxy_]]" class="layout vertical">
127 <network-proxy-input 132 <network-proxy-input
128 on-proxy-change="onProxyInputChange_" 133 on-proxy-change="onProxyInputChange_"
129 editable="[[isEditable_( 134 editable="[[isEditable_(
130 networkProperties.ProxySettings.Manual.HTTPProxy.Host, 135 networkProperties.ProxySettings.Manual.HTTPProxy.Host,
131 editable, useSharedProxies_)]]" 136 editable, useSharedProxies_)]]"
132 value="{{proxy.Manual.HTTPProxy}}" 137 value="{{proxy.Manual.HTTPProxy}}"
133 label="$i18n{networkProxy}"> 138 label="$i18n{networkProxy}">
134 </network-proxy-input> 139 </network-proxy-input>
135 </div> 140 </div>
136 <div hidden$="[[useSameProxy_]]" class="layout vertical"> 141 <div hidden$="[[useSameProxy_]]" class="layout vertical">
137 <network-proxy-input 142 <network-proxy-input
138 on-proxy-change="onProxyInputChange_" 143 on-proxy-change="onProxyInputChange_"
139 editable="[[isEditable_( 144 editable="[[isEditable_(
140 networkProperties.ProxySettings.Manual.HTTPProxy.Host, 145 networkProperties.ProxySettings.Manual.HTTPProxy.Host,
141 editable, useSharedProxies_)]]" 146 editable, useSharedProxies_)]]"
142 value="{{proxy.Manual.HTTPProxy}}" 147 value="{{proxy.Manual.HTTPProxy}}"
143 label="$i18n{networkProxyHttp}"> 148 label="$i18n{networkProxyHttp}">
144 </network-proxy-input> 149 </network-proxy-input>
145 <network-proxy-input 150 <network-proxy-input
146 on-proxy-change="onProxyInputChange_" 151 on-proxy-change="onProxyInputChange_"
147 editable="[[isEditable_( 152 editable="[[isEditable_(
148 networkProperties.ProxySettings.Manual.SecureHTTPProxy.Hos t, 153 networkProperties.ProxySettings.Manual.SecureHTTPProxy.Host,
149 editable, useSharedProxies_)]]" 154 editable, useSharedProxies_)]]"
150 value="{{proxy.Manual.SecureHTTPProxy}}" 155 value="{{proxy.Manual.SecureHTTPProxy}}"
151 label="$i18n{networkProxyShttp}"> 156 label="$i18n{networkProxyShttp}">
152 </network-proxy-input> 157 </network-proxy-input>
153 <network-proxy-input 158 <network-proxy-input
154 on-proxy-change="onProxyInputChange_" 159 on-proxy-change="onProxyInputChange_"
155 editable="[[isEditable_( 160 editable="[[isEditable_(
156 networkProperties.ProxySettings.Manual.FTPProxy.Host, 161 networkProperties.ProxySettings.Manual.FTPProxy.Host,
157 editable, useSharedProxies_)]]" 162 editable, useSharedProxies_)]]"
158 value="{{proxy.Manual.FTPProxy}}" 163 value="{{proxy.Manual.FTPProxy}}"
159 label="$i18n{networkProxyFtp}"> 164 label="$i18n{networkProxyFtp}">
160 </network-proxy-input> 165 </network-proxy-input>
161 <network-proxy-input 166 <network-proxy-input
162 on-proxy-change="onProxyInputChange_" 167 on-proxy-change="onProxyInputChange_"
163 editable="[[isEditable_( 168 editable="[[isEditable_(
164 networkProperties.ProxySettings.Manual.SOCKS.Host, 169 networkProperties.ProxySettings.Manual.SOCKS.Host,
165 editable, useSharedProxies_)]]" 170 editable, useSharedProxies_)]]"
166 value="{{proxy.Manual.SOCKS}}" 171 value="{{proxy.Manual.SOCKS}}"
167 label="$i18n{networkProxySocks}"> 172 label="$i18n{networkProxySocks}">
168 </network-proxy-input> 173 </network-proxy-input>
169 </div> 174 </div>
170 175
171 <div id="exceptionsDiv" 176 <div id="exceptionsDiv"
172 hidden="[[!isProxyEditable_(networkProperties, editable, 177 hidden="[[!isProxyEditable_(networkProperties, editable,
173 useSharedProxies_)]]"> 178 useSharedProxies_)]]">
174 <div>$i18n{networkProxyExceptionList}</div> 179 <div>$i18n{networkProxyExceptionList}</div>
175 <network-proxy-exclusions on-proxy-change="onProxyExclusionsChange_" 180 <network-proxy-exclusions on-proxy-change="onProxyExclusionsChange_"
176 exclusions="{{proxy.ExcludeDomains}}"> 181 exclusions="{{proxy.ExcludeDomains}}">
177 </network-proxy-exclusions> 182 </network-proxy-exclusions>
178 <div class="layout horizontal"> 183 <div class="layout horizontal">
179 <paper-input-container no-label-float class="flex"> 184 <paper-input-container no-label-float class="flex">
180 <input id="proxyExclusion" is="iron-input"> 185 <input id="proxyExclusion" is="iron-input">
181 </paper-input-container> 186 </paper-input-container>
182 <paper-button on-tap="onAddProxyExclusionTap_"> 187 <paper-button on-tap="onAddProxyExclusionTap_">
183 $i18n{networkProxyAddException} 188 $i18n{networkProxyAddException}
(...skipping 14 matching lines...) Expand all
198 </paper-button> 203 </paper-button>
199 <paper-button class="action-button" 204 <paper-button class="action-button"
200 on-tap="onAllowSharedDialogConfirm_"> 205 on-tap="onAllowSharedDialogConfirm_">
201 $i18n{confirm} 206 $i18n{confirm}
202 </paper-button> 207 </paper-button>
203 </div> 208 </div>
204 </dialog> 209 </dialog>
205 </template> 210 </template>
206 <script src="network_proxy.js"></script> 211 <script src="network_proxy.js"></script>
207 </dom-module> 212 </dom-module>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698