You might try the following in nsJVMManager::StartupJVM(...)
-----------------------------------------------------------------
nsCOMPtr<nsIWindowWatcher> windowWatcher;This is sort of like the old code that called XP_FindSomeContext(...) :-) Basically, it gets the nsIWebBrowserChrome from the active window...
windowWatcher = do_GetService("@mozilla.org/embedcomp/window-watcher;1");
if (windowWatcher) {
nsCOMPtr<nsIDOMWindow> domWindow;
windowWatcher->GetActiveWindow(getter_AddRefs(domWindow));
if (domWindow) {
nsCOMPtr<nsIWebBrowserChrome> chrome;
windowWatcher->GetChromeForWindow(domWindow, getter_AddRefs(chrome));
if (chrome) {
chrome->SetStatus(STATUS_SCRIPT, "Starting java...");
}
}
}
-- rick
Ed Burns wrote:
[EMAIL PROTECTED]">[EMAIL PROTECTED] (Chris Hill) writes:On 27 Aug 2001 18:48:18 -0700, [EMAIL PROTECTED] (Ed Burns) wrote:1. What should the "starting plugin" message say?
2. How often should the "starting plugin" message appear?
For 1., I have two approaches, using I18N string bundles for all
language messages.
1.a: Say something like ("Starting Plugin for %s...", aMimeType)
1.b: Keep a hash table of common plugin descriptor strings, mapping
application/x-java-vm to the string "Java", then I could say "Starting
Java...".How about combining a and b?
Starting Plugin for Java (application/x-java-vm)
Ok, I'm just going to say "Starting Plugin for %s", mimeType.
I have this working on every visit to a plugin of any type. Now, the
important corner case for me is when the user uses the menu to start the
java console. This happens via javascript.
How can I invoke nsIWebBrowserChrome::SetStatus() from
xpfe\communicator\resources\content\tasksOverlay.js toJavaConsole()?
If it's impossible to call it from JavaScript, how can I call it from
nsJVMManager::ShowJavaConsole()? At that point, I have no access to
things like a docShell.
Thanks,
Ed
