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 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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.streamsPrivate.abort(this.streamDetails_.streamUrl); |
408 break; | 408 break; |
| 409 case 'bookmarks': |
| 410 this.bookmarks_ = message.data.bookmarks; |
| 411 break; |
409 } | 412 } |
410 }, | 413 }, |
411 | 414 |
412 /** | 415 /** |
413 * @private | 416 * @private |
414 * A callback that's called before the zoom changes. Notify the plugin to stop | 417 * 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. | 418 * reacting to scroll events while zoom is taking place to avoid flickering. |
416 */ | 419 */ |
417 beforeZoom_: function() { | 420 beforeZoom_: function() { |
418 this.plugin_.postMessage({ | 421 this.plugin_.postMessage({ |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
605 this.streamDetails_.tabId != -1); | 608 this.streamDetails_.tabId != -1); |
606 }, | 609 }, |
607 | 610 |
608 /** | 611 /** |
609 * @type {Viewport} the viewport of the PDF viewer. | 612 * @type {Viewport} the viewport of the PDF viewer. |
610 */ | 613 */ |
611 get viewport() { | 614 get viewport() { |
612 return this.viewport_; | 615 return this.viewport_; |
613 } | 616 } |
614 }; | 617 }; |
OLD | NEW |