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 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 position.y = message.data.y; | 397 position.y = message.data.y; |
398 this.viewport_.position = position; | 398 this.viewport_.position = position; |
399 break; | 399 break; |
400 case 'setTranslatedStrings': | 400 case 'setTranslatedStrings': |
401 this.passwordScreen_.text = message.data.getPasswordString; | 401 this.passwordScreen_.text = message.data.getPasswordString; |
402 this.progressBar_.text = message.data.loadingString; | 402 this.progressBar_.text = message.data.loadingString; |
403 this.progressBar_.style.visibility = 'visible'; | 403 this.progressBar_.style.visibility = 'visible'; |
404 this.errorScreen_.text = message.data.loadFailedString; | 404 this.errorScreen_.text = message.data.loadFailedString; |
405 break; | 405 break; |
406 case 'cancelStreamUrl': | 406 case 'cancelStreamUrl': |
407 chrome.streamsPrivate.abort(this.streamDetails_.streamUrl); | 407 chrome.mimeHandlerPrivate.abortStream(); |
408 break; | 408 break; |
409 } | 409 } |
410 }, | 410 }, |
411 | 411 |
412 /** | 412 /** |
413 * @private | 413 * @private |
414 * A callback that's called before the zoom changes. Notify the plugin to stop | 414 * A callback that's called before the zoom changes. Notify the plugin to stop |
415 * reacting to scroll events while zoom is taking place to avoid flickering. | 415 * reacting to scroll events while zoom is taking place to avoid flickering. |
416 */ | 416 */ |
417 beforeZoom_: function() { | 417 beforeZoom_: function() { |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
605 this.streamDetails_.tabId != -1); | 605 this.streamDetails_.tabId != -1); |
606 }, | 606 }, |
607 | 607 |
608 /** | 608 /** |
609 * @type {Viewport} the viewport of the PDF viewer. | 609 * @type {Viewport} the viewport of the PDF viewer. |
610 */ | 610 */ |
611 get viewport() { | 611 get viewport() { |
612 return this.viewport_; | 612 return this.viewport_; |
613 } | 613 } |
614 }; | 614 }; |
OLD | NEW |