mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 908932 - Get rid of ContentPolicy.js in webapprt/. r=myk
DONTBUILD
This commit is contained in:
parent
35c963bd84
commit
f9c9ef823e
@ -1,40 +0,0 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
/* We used to use this component to heuristically determine which links to
|
||||
* direct to the user's default browser, but we no longer use that heuristic.
|
||||
* It will come in handy when we implement support for trusted apps, however,
|
||||
* so we left it in (although it is disabled in the manifest).
|
||||
*/
|
||||
|
||||
const Cc = Components.classes;
|
||||
const Ci = Components.interfaces;
|
||||
const Cu = Components.utils;
|
||||
|
||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
||||
function ContentPolicy() {}
|
||||
|
||||
ContentPolicy.prototype = {
|
||||
classID: Components.ID("{75acd178-3d5a-48a7-bd92-fba383520ae6}"),
|
||||
|
||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsIContentPolicy]),
|
||||
|
||||
shouldLoad: function(contentType, contentLocation, requestOrigin, context, mimeTypeGuess, extra) {
|
||||
|
||||
return Ci.nsIContentPolicy.ACCEPT;
|
||||
|
||||
// When rejecting a load due to a content policy violation, use this code
|
||||
// to close the window opened by window.open, if any.
|
||||
//if (context.currentURI.spec == "about:blank") {
|
||||
// context.ownerDocument.defaultView.close();
|
||||
//};
|
||||
},
|
||||
|
||||
shouldProcess: function(contentType, contentLocation, requestOrigin, context, mimeType, extra) {
|
||||
return Ci.nsIContentPolicy.ACCEPT;
|
||||
},
|
||||
};
|
||||
|
||||
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([ContentPolicy]);
|
@ -7,15 +7,6 @@ category command-line-handler x-default @mozilla.org/webapprt/clh;1
|
||||
component {07ef5b2e-88fb-47bd-8cec-d3b0bef11ac4} ContentPermission.js
|
||||
contract @mozilla.org/content-permission/prompt;1 {07ef5b2e-88fb-47bd-8cec-d3b0bef11ac4}
|
||||
|
||||
# ContentPolicy.js
|
||||
# We used to use this component to heuristically determine which links to
|
||||
# direct to the user's default browser, but we no longer use that heuristic.
|
||||
# It will come in handy when we implement support for trusted apps, however,
|
||||
# so we left it in (although it is disabled here).
|
||||
# component {75acd178-3d5a-48a7-bd92-fba383520ae6} ContentPolicy.js
|
||||
# contract @mozilla.org/webapprt/content-policy;1 {75acd178-3d5a-48a7-bd92-fba383520ae6}
|
||||
# category content-policy webapprt-content-policy @mozilla.org/webapprt/content-policy;1
|
||||
|
||||
# DirectoryProvider.js
|
||||
component {e1799fda-4b2f-4457-b671-e0641d95698d} DirectoryProvider.js
|
||||
contract @mozilla.org/webapprt/directory-provider;1 {e1799fda-4b2f-4457-b671-e0641d95698d}
|
||||
|
@ -17,7 +17,6 @@ TEST_DIRS += ['test']
|
||||
EXTRA_COMPONENTS += [
|
||||
'CommandLineHandler.js',
|
||||
'ContentPermission.js',
|
||||
'ContentPolicy.js',
|
||||
'DirectoryProvider.js',
|
||||
'components.manifest',
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user