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

Side by Side Diff: chrome/browser/resources/print_preview/common/search_box.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 search box for searching through destinations. 9 * Component that renders a search box for searching through destinations.
10 * @param {string} searchBoxPlaceholderText Search box placeholder text. 10 * @param {string} searchBoxPlaceholderText Search box placeholder text.
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 59
60 /** Sets the input element of the search box in focus. */ 60 /** Sets the input element of the search box in focus. */
61 focus: function() { 61 focus: function() {
62 this.input_.focus(); 62 this.input_.focus();
63 }, 63 },
64 64
65 /** @override */ 65 /** @override */
66 createDom: function() { 66 createDom: function() {
67 this.setElementInternal(this.cloneTemplateInternal( 67 this.setElementInternal(this.cloneTemplateInternal(
68 'search-box-template')); 68 'search-box-template'));
69 this.input_ = this.getChildElement('.search-box-input'); 69 this.input_ = assertInstanceof(this.getChildElement('.search-box-input'),
70 HTMLInputElement);
70 this.input_.setAttribute('placeholder', this.searchBoxPlaceholderText_); 71 this.input_.setAttribute('placeholder', this.searchBoxPlaceholderText_);
71 }, 72 },
72 73
73 /** @override */ 74 /** @override */
74 enterDocument: function() { 75 enterDocument: function() {
75 print_preview.Component.prototype.enterDocument.call(this); 76 print_preview.Component.prototype.enterDocument.call(this);
76 this.tracker.add(assert(this.input_), 'input', 77 this.tracker.add(assert(this.input_), 'input',
77 this.onInputInput_.bind(this)); 78 this.onInputInput_.bind(this));
78 }, 79 },
79 80
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 this.timeout_ = setTimeout( 121 this.timeout_ = setTimeout(
121 this.dispatchSearchEvent_.bind(this), SearchBox.SEARCH_DELAY_); 122 this.dispatchSearchEvent_.bind(this), SearchBox.SEARCH_DELAY_);
122 } 123 }
123 }; 124 };
124 125
125 // Export 126 // Export
126 return { 127 return {
127 SearchBox: SearchBox 128 SearchBox: SearchBox
128 }; 129 };
129 }); 130 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/print_preview/cloud_print_interface.js ('k') | chrome/browser/resources/print_preview/component.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698