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

Unified Diff: chrome/browser/resources/pdf/pdf.js

Issue 2240803002: Clean up some PDF code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pdf/out_of_process_instance.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/pdf/pdf.js
diff --git a/chrome/browser/resources/pdf/pdf.js b/chrome/browser/resources/pdf/pdf.js
index da29ea7712d38cfa8dcf25425ea4977789ff68d9..c7b172078d7778472af64c4fe851a35bca15b73e 100644
--- a/chrome/browser/resources/pdf/pdf.js
+++ b/chrome/browser/resources/pdf/pdf.js
@@ -131,8 +131,8 @@ function PDFViewer(browserApi) {
this.delayedScriptingMessages_ = [];
- this.isPrintPreview_ = this.originalUrl_.indexOf(
- 'chrome://print') == 0;
+ this.isPrintPreview_ = this.originalUrl_.indexOf('chrome://print') == 0;
+
// Parse open pdf parameters.
this.paramsParser_ =
new OpenPDFParamsParser(this.getNamedDestination_.bind(this));
@@ -188,8 +188,7 @@ function PDFViewer(browserApi) {
window.addEventListener('message', this.handleScriptingMessage.bind(this),
false);
- this.plugin_.setAttribute('src',
- this.originalUrl_);
+ this.plugin_.setAttribute('src', this.originalUrl_);
this.plugin_.setAttribute('stream-url',
this.browserApi_.getStreamInfo().streamUrl);
var headers = '';
@@ -230,8 +229,7 @@ function PDFViewer(browserApi) {
this.plugin_.addEventListener('mouseup',
this.toolbar_.hideDropdowns.bind(this.toolbar_));
- this.toolbar_.docTitle =
- getFilenameFromURL(this.originalUrl_);
+ this.toolbar_.docTitle = getFilenameFromURL(this.originalUrl_);
}
document.body.addEventListener('change-page', function(e) {
@@ -261,8 +259,7 @@ function PDFViewer(browserApi) {
document.addEventListener('mouseout', this.handleMouseEvent_.bind(this));
var isInTab = this.browserApi_.getStreamInfo().tabId != -1;
- var isSourceFileUrl =
- this.originalUrl_.indexOf('file://') == 0;
+ var isSourceFileUrl = this.originalUrl_.indexOf('file://') == 0;
this.navigator_ = new Navigator(this.originalUrl_,
this.viewport_, this.paramsParser_,
onNavigateInCurrentTab.bind(undefined,
@@ -654,8 +651,7 @@ PDFViewer.prototype = {
if (message.data.title) {
document.title = message.data.title;
} else {
- document.title =
- getFilenameFromURL(this.originalUrl_);
+ document.title = getFilenameFromURL(this.originalUrl_);
}
this.bookmarks_ = message.data.bookmarks;
if (this.toolbar_) {
@@ -667,8 +663,7 @@ PDFViewer.prototype = {
this.viewportScroller_.setEnableScrolling(message.data.isSelecting);
break;
case 'getNamedDestinationReply':
- this.paramsParser_.onNamedDestinationReceived(
- message.data.pageNumber);
+ this.paramsParser_.onNamedDestinationReceived(message.data.pageNumber);
break;
case 'formFocusChange':
this.isFormFieldFocused_ = message.data.focused;
« no previous file with comments | « no previous file | pdf/out_of_process_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698