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 _viewable_mime_type_list = null;
12 __defineGetter__("viewable_mime_type_list",
14 if (_viewable_mime_type_list == null) {
16 var en = category_manager
17 .enumerateCategory("Gecko-Content-Viewers");
18 while (en.hasMoreElements())
19 list.push(en.getNext()
20 .QueryInterface(Ci.nsISupportsCString)
22 _viewable_mime_type_list = list;
24 return _viewable_mime_type_list;
27 var category_manager = Cc["@mozilla.org/categorymanager;1"]
28 .getService(Ci.nsICategoryManager);
30 minibuffer.prototype.read_viewable_mime_type = function () {
31 var result = yield this.read(
32 forward_keywords(arguments),
33 $completer = prefix_completer(
34 $completions = viewable_mime_type_list),
37 yield co_return(result);
40 provide("minibuffer-read-mime-type");