{"size": 1908, "ext": "js", "max_stars_repo_path": "b2g_sdk/x86_64/b2g/components/nsContentDispatchChooser.js", "max_stars_repo_name": "yonglongliu/gaia", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "b2g_sdk/x86_64/b2g/components/nsContentDispatchChooser.js", "max_issues_repo_name": "yonglongliu/gaia", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "b2g_sdk/x86_64/b2g/components/nsContentDispatchChooser.js", "max_forks_repo_name": "yonglongliu/gaia", "max_forks_repo_forks_event_min_datetime": "2019-03-31T04:27:13.000Z", "max_forks_repo_forks_event_max_datetime": "2020-04-12T17:58:15.000Z"}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": 3, "avg_line_length": 238.5, "max_line_length": 630, "alphanum_fraction": 0.8301886792}
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");const Cc=Components.classes;const Ci=Components.interfaces;const Cr=Components.results;const CONTENT_HANDLING_URL="chrome://mozapps/content/handling/dialog.xul";const STRINGBUNDLE_URL="chrome://mozapps/locale/handling/handling.properties";function nsContentDispatchChooser()
{}
nsContentDispatchChooser.prototype={classID:Components.ID("e35d5067-95bc-4029-8432-e8f1e431148d"), ask:function ask(aHandler,aWindowContext,aURI,aReason)
{var window=null;try{if(aWindowContext)
window=aWindowContext.getInterface(Ci.nsIDOMWindow);}catch(e){}
var sbs=Cc["@mozilla.org/intl/stringbundle;1"].getService(Ci.nsIStringBundleService);var bundle=sbs.createBundle(STRINGBUNDLE_URL);var xai=Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULAppInfo);
 var arr=[bundle.GetStringFromName("protocol.title"),"",bundle.GetStringFromName("protocol.description"),bundle.GetStringFromName("protocol.choices.label"),bundle.formatStringFromName("protocol.checkbox.label",[aURI.scheme],1),bundle.GetStringFromName("protocol.checkbox.accesskey"),bundle.formatStringFromName("protocol.checkbox.extra",[xai.name],1)];var params=Cc["@mozilla.org/array;1"].createInstance(Ci.nsIMutableArray);let SupportsString=Components.Constructor("@mozilla.org/supports-string;1","nsISupportsString");for each(let text in arr){let string=new SupportsString;string.data=text;params.appendElement(string,false);}
params.appendElement(aHandler,false);params.appendElement(aURI,false);params.appendElement(aWindowContext,false);var ww=Cc["@mozilla.org/embedcomp/window-watcher;1"].getService(Ci.nsIWindowWatcher);ww.openWindow(window,CONTENT_HANDLING_URL,null,"chrome,dialog=yes,resizable,centerscreen",params);}, QueryInterface:XPCOMUtils.generateQI([Ci.nsIContentDispatchChooser])};let components=[nsContentDispatchChooser];this.NSGetFactory=XPCOMUtils.generateNSGetFactory(components);