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 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
394 this.viewport_.position = position; | 394 this.viewport_.position = position; |
395 break; | 395 break; |
396 case 'setTranslatedStrings': | 396 case 'setTranslatedStrings': |
397 this.passwordScreen_.text = message.data.getPasswordString; | 397 this.passwordScreen_.text = message.data.getPasswordString; |
398 this.progressBar_.text = message.data.loadingString; | 398 this.progressBar_.text = message.data.loadingString; |
399 this.errorScreen_.text = message.data.loadFailedString; | 399 this.errorScreen_.text = message.data.loadFailedString; |
400 break; | 400 break; |
401 case 'cancelStreamUrl': | 401 case 'cancelStreamUrl': |
402 chrome.streamsPrivate.abort(this.streamDetails.streamUrl); | 402 chrome.streamsPrivate.abort(this.streamDetails.streamUrl); |
403 break; | 403 break; |
404 case 'bookmarks': | |
405 this.bookmarks = message.data.bookmarks; | |
406 console.log('pdf.js: Retrieved bookmarks.'); | |
Sam McNally
2014/12/16 05:58:34
Remove these before landing.
Alexandre Carlton
2014/12/16 22:14:50
Done.
| |
407 console.log(this.bookmarks); | |
408 break; | |
404 } | 409 } |
405 }, | 410 }, |
406 | 411 |
407 /** | 412 /** |
408 * @private | 413 * @private |
409 * 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 |
410 * 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. |
411 */ | 416 */ |
412 beforeZoom_: function() { | 417 beforeZoom_: function() { |
413 this.plugin_.postMessage({ | 418 this.plugin_.postMessage({ |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
585 this.streamDetails.tabId != -1); | 590 this.streamDetails.tabId != -1); |
586 }, | 591 }, |
587 | 592 |
588 /** | 593 /** |
589 * @type {Viewport} the viewport of the PDF viewer. | 594 * @type {Viewport} the viewport of the PDF viewer. |
590 */ | 595 */ |
591 get viewport() { | 596 get viewport() { |
592 return this.viewport_; | 597 return this.viewport_; |
593 } | 598 } |
594 }; | 599 }; |
OLD | NEW |