summaryrefslogtreecommitdiffstats
path: root/b2g/components/TelProtocolHandler.js
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2018-02-03 06:25:10 -0500
committerMatt A. Tobin <email@mattatobin.com>2018-02-03 06:25:10 -0500
commit8b8c65072aedef94610748ce92c2ed3a19fd5517 (patch)
tree8614d386acf5db7a77b08d19a5854a7d75dab015 /b2g/components/TelProtocolHandler.js
parent8c3a46bd13a0660a3ff1e0379dbf515873a852d2 (diff)
downloadUXP-8b8c65072aedef94610748ce92c2ed3a19fd5517.tar
UXP-8b8c65072aedef94610748ce92c2ed3a19fd5517.tar.gz
UXP-8b8c65072aedef94610748ce92c2ed3a19fd5517.tar.lz
UXP-8b8c65072aedef94610748ce92c2ed3a19fd5517.tar.xz
UXP-8b8c65072aedef94610748ce92c2ed3a19fd5517.zip
Purge b2g/
Diffstat (limited to 'b2g/components/TelProtocolHandler.js')
-rw-r--r--b2g/components/TelProtocolHandler.js60
1 files changed, 0 insertions, 60 deletions
diff --git a/b2g/components/TelProtocolHandler.js b/b2g/components/TelProtocolHandler.js
deleted file mode 100644
index 021cbcd61..000000000
--- a/b2g/components/TelProtocolHandler.js
+++ /dev/null
@@ -1,60 +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/. */
-
-/**
- * TelProtocolHandle.js
- *
- * This file implements the URLs for Telephone Calls
- * https://www.ietf.org/rfc/rfc2806.txt
- */
-
-"use strict";
-
-const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
-
-Cu.import('resource://gre/modules/XPCOMUtils.jsm');
-Cu.import("resource:///modules/TelURIParser.jsm");
-Cu.import('resource://gre/modules/ActivityChannel.jsm');
-
-function TelProtocolHandler() {
-}
-
-TelProtocolHandler.prototype = {
-
- scheme: "tel",
- defaultPort: -1,
- protocolFlags: Ci.nsIProtocolHandler.URI_NORELATIVE |
- Ci.nsIProtocolHandler.URI_NOAUTH |
- Ci.nsIProtocolHandler.URI_LOADABLE_BY_ANYONE |
- Ci.nsIProtocolHandler.URI_DOES_NOT_RETURN_DATA,
- allowPort: () => false,
-
- newURI: function Proto_newURI(aSpec, aOriginCharset) {
- let uri = Cc["@mozilla.org/network/simple-uri;1"].createInstance(Ci.nsIURI);
- uri.spec = aSpec;
- return uri;
- },
-
- newChannel2: function Proto_newChannel(aURI, aLoadInfo) {
- let number = TelURIParser.parseURI('tel', aURI.spec);
-
- if (number) {
- return new ActivityChannel(aURI, aLoadInfo,
- "dial-handler",
- { number: number,
- type: "webtelephony/number" });
- }
-
- throw Components.results.NS_ERROR_ILLEGAL_VALUE;
- },
-
- newChannel: function Proto_newChannel(aURI) {
- return this.newChannel2(aURI, null);
- },
-
- classID: Components.ID("{782775dd-7351-45ea-aff1-0ffa872cfdd2}"),
- QueryInterface: XPCOMUtils.generateQI([Ci.nsIProtocolHandler])
-};
-
-this.NSGetFactory = XPCOMUtils.generateNSGetFactory([TelProtocolHandler]);