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

Side by Side Diff: chrome/browser/resources/print_preview/component.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 (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('print_preview', function() { 5 cr.define('print_preview', function() {
6 'use strict'; 6 'use strict';
7 7
8 /** 8 /**
9 * Class that represents a UI component. 9 * Class that represents a UI component.
10 * @constructor 10 * @constructor
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 * @param {string} templateId Template element ID. 182 * @param {string} templateId Template element ID.
183 * @param {boolean=} opt_keepHidden Whether to leave the cloned template 183 * @param {boolean=} opt_keepHidden Whether to leave the cloned template
184 * hidden after cloning. 184 * hidden after cloning.
185 * @return {Element} Cloned element with its 'id' attribute stripped. 185 * @return {Element} Cloned element with its 'id' attribute stripped.
186 * @protected 186 * @protected
187 */ 187 */
188 cloneTemplateInternal: function(templateId, opt_keepHidden) { 188 cloneTemplateInternal: function(templateId, opt_keepHidden) {
189 var templateEl = $(templateId); 189 var templateEl = $(templateId);
190 assert(templateEl != null, 190 assert(templateEl != null,
191 'Could not find element with ID: ' + templateId); 191 'Could not find element with ID: ' + templateId);
192 var el = templateEl.cloneNode(true); 192 var el = assertInstanceof(templateEl.cloneNode(true), HTMLElement);
193 el.id = ''; 193 el.id = '';
194 if (!opt_keepHidden) { 194 if (!opt_keepHidden) {
195 setIsVisible(el, true); 195 setIsVisible(el, true);
196 } 196 }
197 return el; 197 return el;
198 } 198 }
199 }; 199 };
200 200
201 return { 201 return {
202 Component: Component 202 Component: Component
203 }; 203 };
204 }); 204 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/print_preview/common/search_box.js ('k') | chrome/browser/resources/print_preview/data/app_state.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698