2 * (C) Copyright 2008 Jeremy Maitin-Shepard
4 * Use, modification, and distribution are subject to the terms specified in the
8 require("minibuffer-read.js");
10 let _gecko_viewable_mime_type_list = null;
12 __defineGetter__("gecko_viewable_mime_type_list", function () {
13 if (_gecko_viewable_mime_type_list == null) {
15 var en = category_manager.enumerateCategory("Gecko-Content-Viewers");
16 while (en.hasMoreElements()) list.push(en.getNext().QueryInterface(Ci.nsISupportsCString).toString());
17 _gecko_viewable_mime_type_list = list;
19 return _gecko_viewable_mime_type_list;
22 var category_manager = Cc["@mozilla.org/categorymanager;1"].getService(Ci.nsICategoryManager);
24 minibuffer.prototype.read_gecko_viewable_mime_type = function () {
25 var result = yield this.read(forward_keywords(arguments),
27 $completer = prefix_completer($completions = gecko_viewable_mime_type_list));
28 yield co_return(result);