1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-19 14:48:08 +02:00

Adds DEFAULT_PREFERENCES to the PdfjsChromeUtils

This commit is contained in:
Yury Delendik 2014-09-08 15:41:57 -05:00
parent 782ed5cb67
commit 7ae7fd3d1a
2 changed files with 5 additions and 15 deletions

View file

@ -12,6 +12,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*globals DEFAULT_PREFERENCES */
'use strict';
@ -36,21 +37,12 @@ XPCOMUtils.defineLazyServiceGetter(Svc, 'mime',
'@mozilla.org/mime;1',
'nsIMIMEService');
//#include ../../../web/default_preferences.js
let PdfjsChromeUtils = {
// For security purposes when running remote, we restrict preferences
// content can access.
_allowedPrefNames: [
"showPreviousViewOnLoad",
"defaultZoomValue",
"sidebarViewOnLoad",
"enableHandToolOnLoad",
"enableWebGL",
"disableRange",
"disableAutoFetch",
"disableFontFace",
"disableTextLayer",
"useOnlyCssZoom"
],
_allowedPrefNames: Object.keys(DEFAULT_PREFERENCES),
_ppmm: null,
_mmg: null,

View file

@ -60,9 +60,7 @@ let PdfjsContentUtils = {
/*
* prefs utilities - the child does not have write access to prefs.
* note, the pref names here are cross-checked against a list of
* approved pdfjs prefs in chrome utils. If you add additional pdfjs
* prefs update the defaults in DEFAULT_PREFERENCES and in chrome
* utils _allowedPrefNames.
* approved pdfjs prefs in chrome utils.
*/
clearUserPref: function (aPrefName) {