Bug 914182 - Hide Telephony API behind a pref except on B2G. r=vyang,khuey

This commit is contained in:
Masatoshi Kimura 2013-09-15 04:46:35 +09:00
parent bf6b847c2b
commit c965ffbdef
7 changed files with 14 additions and 5 deletions

View File

@ -778,3 +778,6 @@ pref("devtools.debugger.unix-domain-socket", "/data/local/debugger-socket");
// falling back to Skia/software for smaller canvases
pref("gfx.canvas.azure.backends", "skia");
pref("gfx.canvas.azure.accelerated", true);
// Enable Telephony API
pref("dom.telephony.enabled", true);

View File

@ -102,7 +102,7 @@ var interfaceNamesInGlobalScope =
{name: "BluetoothStatusChangedEvent", b2g: true},
{name: "BoxObject", xbl: true},
{name: "BrowserFeedWriter", desktop: true},
"CallEvent",
{name: "CallEvent", b2g: true},
"CameraCapabilities",
"CameraControl",
"CameraManager",
@ -529,9 +529,9 @@ var interfaceNamesInGlobalScope =
"SVGViewElement",
"SVGZoomAndPan",
"SVGZoomEvent",
"Telephony",
"TelephonyCall",
"TelephonyCallGroup",
{name: "Telephony", b2g: true},
{name: "TelephonyCall", b2g: true},
{name: "TelephonyCallGroup", b2g: true},
"Text",
"TextDecoder",
"TextEncoder",

View File

@ -4,7 +4,7 @@
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
[Constructor(DOMString type, optional CallEventInit eventInitDict)]
[Constructor(DOMString type, optional CallEventInit eventInitDict), Pref="dom.telephony.enabled"]
interface CallEvent : Event
{
readonly attribute TelephonyCall? call;

View File

@ -4,6 +4,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
[Pref="dom.telephony.enabled"]
interface Telephony : EventTarget {
[Throws]
TelephonyCall dial(DOMString number);

View File

@ -4,6 +4,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
[Pref="dom.telephony.enabled"]
interface TelephonyCall : EventTarget {
readonly attribute DOMString number;

View File

@ -4,6 +4,7 @@
* 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/. */
[Pref="dom.telephony.enabled"]
interface TelephonyCallGroup : EventTarget {
readonly attribute CallsList calls;

View File

@ -4400,5 +4400,8 @@ pref("dom.forms.inputmode", false);
pref("dom.forms.inputmode", true);
#endif
// Telephony API
pref("dom.telephony.enabled", false);
// DOM Inter-App Communication API.
pref("dom.inter-app-communication-api.enabled", false);