forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds option to enable CSS backgrounds for printing.
BUG=113594 Review URL: https://chromiumcodereview.appspot.com/11818062 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176617 0039d316-1c4b-4281-b951-d872f2087c98
- Loading branch information
rltoscano@chromium.org
committed
Jan 14, 2013
1 parent
57f6212
commit 19d1c2d
Showing
20 changed files
with
457 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
chrome/browser/resources/print_preview/data/ticket_items/css_background.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// Copyright (c) 2012 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
cr.define('print_preview.ticket_items', function() { | ||
'use strict'; | ||
|
||
/** | ||
* Ticket item whose value is a {@code boolean} that represents whether to | ||
* print CSS backgrounds. | ||
* @param {!print_preview.DocumentInfo} documentInfo Information about the | ||
* document to print. | ||
* @constructor | ||
* @extends {print_preview.ticket_items.TicketItem} | ||
*/ | ||
function CssBackground(documentInfo) { | ||
print_preview.ticket_items.TicketItem.call(this); | ||
|
||
/** | ||
* Information about the document to print. | ||
* @type {!print_preview.DocumentInfo} | ||
* @private | ||
*/ | ||
this.documentInfo_ = documentInfo; | ||
}; | ||
|
||
CssBackground.prototype = { | ||
__proto__: print_preview.ticket_items.TicketItem.prototype, | ||
|
||
/** @override */ | ||
wouldValueBeValid: function(value) { | ||
return true; | ||
}, | ||
|
||
/** @override */ | ||
isCapabilityAvailable: function() { | ||
return this.documentInfo_.isModifiable; | ||
}, | ||
|
||
/** @override */ | ||
getDefaultValueInternal: function() { | ||
return false; | ||
}, | ||
|
||
/** @override */ | ||
getCapabilityNotAvailableValueInternal: function() { | ||
return false; | ||
} | ||
}; | ||
|
||
// Export | ||
return { | ||
CssBackground: CssBackground | ||
}; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.