OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 /** | 7 /** |
8 * @return {number} Width of a scrollbar in pixels | 8 * @return {number} Width of a scrollbar in pixels |
9 */ | 9 */ |
10 function getScrollbarWidth() { | 10 function getScrollbarWidth() { |
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
396 position.y = message.data.y; | 396 position.y = message.data.y; |
397 this.viewport_.position = position; | 397 this.viewport_.position = position; |
398 break; | 398 break; |
399 case 'setTranslatedStrings': | 399 case 'setTranslatedStrings': |
400 this.passwordScreen_.text = message.data.getPasswordString; | 400 this.passwordScreen_.text = message.data.getPasswordString; |
401 this.progressBar_.text = message.data.loadingString; | 401 this.progressBar_.text = message.data.loadingString; |
402 this.progressBar_.style.visibility = 'visible'; | 402 this.progressBar_.style.visibility = 'visible'; |
403 this.errorScreen_.text = message.data.loadFailedString; | 403 this.errorScreen_.text = message.data.loadFailedString; |
404 break; | 404 break; |
405 case 'cancelStreamUrl': | 405 case 'cancelStreamUrl': |
406 chrome.streamsPrivate.abort(this.streamDetails_.streamUrl); | 406 chrome.mimeHandler.abortStream(); |
407 break; | 407 break; |
408 } | 408 } |
409 }, | 409 }, |
410 | 410 |
411 /** | 411 /** |
412 * @private | 412 * @private |
413 * A callback that's called before the zoom changes. Notify the plugin to stop | 413 * A callback that's called before the zoom changes. Notify the plugin to stop |
414 * reacting to scroll events while zoom is taking place to avoid flickering. | 414 * reacting to scroll events while zoom is taking place to avoid flickering. |
415 */ | 415 */ |
416 beforeZoom_: function() { | 416 beforeZoom_: function() { |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
601 this.streamDetails_.tabId != -1); | 601 this.streamDetails_.tabId != -1); |
602 }, | 602 }, |
603 | 603 |
604 /** | 604 /** |
605 * @type {Viewport} the viewport of the PDF viewer. | 605 * @type {Viewport} the viewport of the PDF viewer. |
606 */ | 606 */ |
607 get viewport() { | 607 get viewport() { |
608 return this.viewport_; | 608 return this.viewport_; |
609 } | 609 } |
610 }; | 610 }; |
OLD | NEW |