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

Side by Side Diff: chrome/browser/resources/print_preview/settings/advanced_settings/advanced_settings_item.js

Issue 588713002: Compile print_preview, part 3: reduce down to 185 errors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@I_print_preview_2
Patch Set: fix assert Created 6 years, 2 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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('print_preview', function() { 5 cr.define('print_preview', function() {
6 'use strict'; 6 'use strict';
7 7
8 /** 8 /**
9 * Component that renders a destination item in a destination list. 9 * Component that renders a destination item in a destination list.
10 * @param {!cr.EventTarget} eventTarget Event target to dispatch selection 10 * @param {!cr.EventTarget} eventTarget Event target to dispatch selection
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 setIsVisible( 248 setIsVisible(
249 this.getChildElement('.advanced-settings-item-value-select'), true); 249 this.getChildElement('.advanced-settings-item-value-select'), true);
250 var selectEl = this.select_; 250 var selectEl = this.select_;
251 var indexToSelect = 0; 251 var indexToSelect = 0;
252 this.capability_.select_cap.option.forEach(function(option, index) { 252 this.capability_.select_cap.option.forEach(function(option, index) {
253 var item = document.createElement('option'); 253 var item = document.createElement('option');
254 item.text = option.display_name; 254 item.text = option.display_name;
255 item.value = option.value; 255 item.value = option.value;
256 if (option.is_default) 256 if (option.is_default)
257 indexToSelect = index; 257 indexToSelect = index;
258 selectEl.add(item); 258 selectEl.appendChild(item);
259 }); 259 });
260 for (var i = 0, option; option = selectEl.options[i]; i++) { 260 for (var i = 0, option; option = selectEl.options[i]; i++) {
261 if (option.value == this.selectedValue_) { 261 if (option.value == this.selectedValue_) {
262 indexToSelect = i; 262 indexToSelect = i;
263 break; 263 break;
264 } 264 }
265 } 265 }
266 selectEl.selectedIndex = indexToSelect; 266 selectEl.selectedIndex = indexToSelect;
267 }, 267 },
268 268
(...skipping 26 matching lines...) Expand all
295 } 295 }
296 }); 296 });
297 } 297 }
298 }; 298 };
299 299
300 // Export 300 // Export
301 return { 301 return {
302 AdvancedSettingsItem: AdvancedSettingsItem 302 AdvancedSettingsItem: AdvancedSettingsItem
303 }; 303 };
304 }); 304 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698