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

Side by Side Diff: chrome/browser/resources/pdf/toolbar_manager.js

Issue 2892623002: Type check PDF plugin JS code, down to 53 errors. (Closed)
Patch Set: Revert compiled_resources2.gyp for now. Created 3 years, 7 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 'use strict'; 5 'use strict';
6 6
7 /** Idle time in ms before the UI is hidden. */ 7 /** Idle time in ms before the UI is hidden. */
8 var HIDE_TIMEOUT = 2000; 8 var HIDE_TIMEOUT = 2000;
9 /** Time in ms after force hide before toolbar is shown again. */ 9 /** Time in ms after force hide before toolbar is shown again. */
10 var FORCE_HIDE_TIMEOUT = 1000; 10 var FORCE_HIDE_TIMEOUT = 1000;
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 129
130 if (interval != 0) 130 if (interval != 0)
131 return movement / interval > SHOW_VELOCITY; 131 return movement / interval > SHOW_VELOCITY;
132 } 132 }
133 } 133 }
134 return false; 134 return false;
135 }, 135 },
136 136
137 /** 137 /**
138 * Wrapper around Date.now() to make it easily replaceable for testing. 138 * Wrapper around Date.now() to make it easily replaceable for testing.
139 * @return {int} 139 * @return {number}
140 * @private 140 * @private
141 */ 141 */
142 getCurrentTimestamp_: function() { 142 getCurrentTimestamp_: function() {
143 return Date.now(); 143 return Date.now();
144 }, 144 },
145 145
146 /** 146 /**
147 * Display both UI toolbars. 147 * Display both UI toolbars.
148 */ 148 */
149 showToolbars: function() { 149 showToolbars: function() {
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 * the UI. 243 * the UI.
244 * @private 244 * @private
245 */ 245 */
246 resizeDropdowns_: function() { 246 resizeDropdowns_: function() {
247 if (!this.toolbar_) 247 if (!this.toolbar_)
248 return; 248 return;
249 var lowerBound = this.window_.innerHeight - this.zoomToolbar_.clientHeight; 249 var lowerBound = this.window_.innerHeight - this.zoomToolbar_.clientHeight;
250 this.toolbar_.setDropdownLowerBound(lowerBound); 250 this.toolbar_.setDropdownLowerBound(lowerBound);
251 } 251 }
252 }; 252 };
OLDNEW
« no previous file with comments | « chrome/browser/resources/pdf/open_pdf_params_parser.js ('k') | chrome/browser/resources/pdf/viewport.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698