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

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

Issue 796223002: OOP PDF: Hide the loading indicator until the plugin loads. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « chrome/browser/resources/pdf/index.css ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 };
OLDNEW
« no previous file with comments | « chrome/browser/resources/pdf/index.css ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698