| 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 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 var position = this.viewport_.position; | 395 var position = this.viewport_.position; |
| 396 if (message.data.x != undefined) | 396 if (message.data.x != undefined) |
| 397 position.x = message.data.x; | 397 position.x = message.data.x; |
| 398 if (message.data.y != undefined) | 398 if (message.data.y != undefined) |
| 399 position.y = message.data.y; | 399 position.y = message.data.y; |
| 400 this.viewport_.position = position; | 400 this.viewport_.position = position; |
| 401 break; | 401 break; |
| 402 case 'setTranslatedStrings': | 402 case 'setTranslatedStrings': |
| 403 this.passwordScreen_.text = message.data.getPasswordString; | 403 this.passwordScreen_.text = message.data.getPasswordString; |
| 404 this.progressBar_.text = message.data.loadingString; | 404 this.progressBar_.text = message.data.loadingString; |
| 405 this.progressBar_.style.visibility = 'visible'; |
| 405 this.errorScreen_.text = message.data.loadFailedString; | 406 this.errorScreen_.text = message.data.loadFailedString; |
| 406 break; | 407 break; |
| 407 case 'cancelStreamUrl': | 408 case 'cancelStreamUrl': |
| 408 chrome.streamsPrivate.abort(this.streamDetails.streamUrl); | 409 chrome.streamsPrivate.abort(this.streamDetails.streamUrl); |
| 409 break; | 410 break; |
| 410 } | 411 } |
| 411 }, | 412 }, |
| 412 | 413 |
| 413 /** | 414 /** |
| 414 * @private | 415 * @private |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 591 this.streamDetails.tabId != -1); | 592 this.streamDetails.tabId != -1); |
| 592 }, | 593 }, |
| 593 | 594 |
| 594 /** | 595 /** |
| 595 * @type {Viewport} the viewport of the PDF viewer. | 596 * @type {Viewport} the viewport of the PDF viewer. |
| 596 */ | 597 */ |
| 597 get viewport() { | 598 get viewport() { |
| 598 return this.viewport_; | 599 return this.viewport_; |
| 599 } | 600 } |
| 600 }; | 601 }; |
| OLD | NEW |