Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(281)

Side by Side Diff: chrome/browser/resources/pdf/pdf.js

Issue 797183005: Add a mimeHandler extension API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@streams-lifetime
Patch Set: rebase Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698