I'm developing an NPAPI plugin for Mac OS X, and need an Open/Save dialog at various times. Accessing the window directly fails, since plugins are now run out-of-process... but Apple's documentation makes vague references to being able to launch dialogs and other things via provided APIs.

Can anyone shed light on how I might do something like launch an Open dialog, a modal sheet if possible? I was developing this as a WebKit Cocoa plugin for Safari but as of Mac OS X Lion they're now deprecated.