2 * (C) Copyright 2008 Jeremy Maitin-Shepard
4 * Use, modification, and distribution are subject to the terms specified in the
10 require("minibuffer-read.js");
12 let _viewable_mime_type_list = null;
14 __defineGetter__("viewable_mime_type_list",
16 if (_viewable_mime_type_list == null) {
18 var en = category_manager
19 .enumerateCategory("Gecko-Content-Viewers");
20 while (en.hasMoreElements())
21 list.push(en.getNext()
22 .QueryInterface(Ci.nsISupportsCString)
24 _viewable_mime_type_list = list;
26 return _viewable_mime_type_list;
29 var category_manager = Cc["@mozilla.org/categorymanager;1"]
30 .getService(Ci.nsICategoryManager);
32 minibuffer.prototype.read_viewable_mime_type = function () {
33 var result = yield this.read(
34 forward_keywords(arguments),
35 $completer = prefix_completer(
36 $completions = viewable_mime_type_list),
39 yield co_return(result);
42 provide("minibuffer-read-mime-type");