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

Side by Side Diff: chrome/browser/resources/options/handler_options_list.js

Issue 1015623007: Changing Option String Resource to lowerCamelcases in handler_options_handler.cc file. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding space after opening brace. Created 5 years, 8 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 cr.define('options', function() { 5 cr.define('options', function() {
6 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel; 6 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel;
7 /** @const */ var List = cr.ui.List; 7 /** @const */ var List = cr.ui.List;
8 /** @const */ var ListItem = cr.ui.ListItem; 8 /** @const */ var ListItem = cr.ui.ListItem;
9 /** @const */ var DeletableItem = options.DeletableItem; 9 /** @const */ var DeletableItem = options.DeletableItem;
10 /** @const */ var DeletableItemList = options.DeletableItemList; 10 /** @const */ var DeletableItemList = options.DeletableItemList;
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 protocolElement.textContent = data.protocol; 126 protocolElement.textContent = data.protocol;
127 protocolElement.className = 'handlers-type-column'; 127 protocolElement.className = 'handlers-type-column';
128 this.appendChild(protocolElement); 128 this.appendChild(protocolElement);
129 129
130 // Handler selection. 130 // Handler selection.
131 var handlerElement = document.createElement('div'); 131 var handlerElement = document.createElement('div');
132 var selectElement = document.createElement('select'); 132 var selectElement = document.createElement('select');
133 var defaultOptionElement = document.createElement('option'); 133 var defaultOptionElement = document.createElement('option');
134 defaultOptionElement.selected = data.default_handler == -1; 134 defaultOptionElement.selected = data.default_handler == -1;
135 defaultOptionElement.textContent = 135 defaultOptionElement.textContent =
136 loadTimeData.getString('handlers_none_handler'); 136 loadTimeData.getString('handlersNoneHandler');
137 defaultOptionElement.value = -1; 137 defaultOptionElement.value = -1;
138 selectElement.appendChild(defaultOptionElement); 138 selectElement.appendChild(defaultOptionElement);
139 139
140 for (var i = 0; i < data.handlers.length; ++i) { 140 for (var i = 0; i < data.handlers.length; ++i) {
141 var optionElement = document.createElement('option'); 141 var optionElement = document.createElement('option');
142 optionElement.selected = i == data.default_handler; 142 optionElement.selected = i == data.default_handler;
143 optionElement.textContent = data.handlers[i][2]; 143 optionElement.textContent = data.handlers[i][2];
144 optionElement.value = i; 144 optionElement.value = i;
145 selectElement.appendChild(optionElement); 145 selectElement.appendChild(optionElement);
146 } 146 }
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 } else { 185 } else {
186 indicator.controlledBy = 'recommended'; 186 indicator.controlledBy = 'recommended';
187 } 187 }
188 this.appendChild(indicator); 188 this.appendChild(indicator);
189 } 189 }
190 190
191 if (data.is_default_handler_set_by_user) { 191 if (data.is_default_handler_set_by_user) {
192 // Remove link. 192 // Remove link.
193 var removeElement = document.createElement('div'); 193 var removeElement = document.createElement('div');
194 removeElement.textContent = 194 removeElement.textContent =
195 loadTimeData.getString('handlers_remove_link'); 195 loadTimeData.getString('handlersRemoveLink');
196 removeElement.addEventListener('click', function(e) { 196 removeElement.addEventListener('click', function(e) {
197 var value = selectElement ? selectElement.value : 0; 197 var value = selectElement ? selectElement.value : 0;
198 delegate.removeHandler(value, data.handlers[value]); 198 delegate.removeHandler(value, data.handlers[value]);
199 }); 199 });
200 removeElement.className = 200 removeElement.className =
201 'handlers-remove-column handlers-remove-link'; 201 'handlers-remove-column handlers-remove-link';
202 this.appendChild(removeElement); 202 this.appendChild(removeElement);
203 } 203 }
204 }, 204 },
205 205
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 }, 259 },
260 }; 260 };
261 261
262 return { 262 return {
263 IgnoredHandlersListItem: IgnoredHandlersListItem, 263 IgnoredHandlersListItem: IgnoredHandlersListItem,
264 IgnoredHandlersList: IgnoredHandlersList, 264 IgnoredHandlersList: IgnoredHandlersList,
265 HandlerListItem: HandlerListItem, 265 HandlerListItem: HandlerListItem,
266 HandlersList: HandlersList, 266 HandlersList: HandlersList,
267 }; 267 };
268 }); 268 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/handler_options.html ('k') | chrome/browser/ui/webui/options/clear_browser_data_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698