diff options
author | Grant Gayed <ggayed> | 2007-11-23 21:47:09 +0000 |
---|---|---|
committer | Grant Gayed <ggayed> | 2007-11-23 21:47:09 +0000 |
commit | ddebd897bf1f7bec0859dea6a63550663eba247b (patch) | |
tree | 56304d741492b1aa488244054496e828af07b724 | |
parent | ec7db14b8c0879921559cd7f03c434dd3571aaef (diff) | |
download | eclipse.platform.swt-ddebd897bf1f7bec0859dea6a63550663eba247b.tar.gz eclipse.platform.swt-ddebd897bf1f7bec0859dea6a63550663eba247b.tar.xz eclipse.platform.swt-ddebd897bf1f7bec0859dea6a63550663eba247b.zip |
199292 needsSpinup
5 files changed, 41 insertions, 23 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/carbon/org/eclipse/swt/browser/MozillaDelegate.java b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/carbon/org/eclipse/swt/browser/MozillaDelegate.java index e4811253b5..aab7305c08 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/carbon/org/eclipse/swt/browser/MozillaDelegate.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/carbon/org/eclipse/swt/browser/MozillaDelegate.java @@ -176,6 +176,10 @@ boolean hookEnterExit () { void init () { } +boolean needsSpinup () { + return false; +} + void onDispose (int embedHandle) { handles.remove (new LONG (embedHandle)); if (callback3 != null) { diff --git a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Mozilla.java b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Mozilla.java index 52cb94ea48..aefd8a2b50 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Mozilla.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Mozilla.java @@ -391,31 +391,33 @@ public void create (Composite parent, int style) { nsIComponentManager componentManager = new nsIComponentManager (result[0]); result[0] = 0; - /* nsIAppShell is discontinued as of xulrunner 1.9, so do not fail if it is not found */ - rc = componentManager.CreateInstance (XPCOM.NS_APPSHELL_CID, 0, nsIAppShell.NS_IAPPSHELL_IID, result); - if (rc != XPCOM.NS_ERROR_NO_INTERFACE) { - if (rc != XPCOM.NS_OK) { - browser.dispose (); - error (rc); - } - if (result[0] == 0) { - browser.dispose (); - error (XPCOM.NS_NOINTERFACE); - } - - AppShell = new nsIAppShell (result[0]); - rc = AppShell.Create (0, null); - if (rc != XPCOM.NS_OK) { - browser.dispose (); - error (rc); - } - rc = AppShell.Spinup (); - if (rc != XPCOM.NS_OK) { - browser.dispose (); - error (rc); + if (delegate.needsSpinup ()) { + /* nsIAppShell is discontinued as of xulrunner 1.9, so do not fail if it is not found */ + rc = componentManager.CreateInstance (XPCOM.NS_APPSHELL_CID, 0, nsIAppShell.NS_IAPPSHELL_IID, result); + if (rc != XPCOM.NS_ERROR_NO_INTERFACE) { + if (rc != XPCOM.NS_OK) { + browser.dispose (); + error (rc); + } + if (result[0] == 0) { + browser.dispose (); + error (XPCOM.NS_NOINTERFACE); + } + + AppShell = new nsIAppShell (result[0]); + rc = AppShell.Create (0, null); + if (rc != XPCOM.NS_OK) { + browser.dispose (); + error (rc); + } + rc = AppShell.Spinup (); + if (rc != XPCOM.NS_OK) { + browser.dispose (); + error (rc); + } } + result[0] = 0; } - result[0] = 0; WindowCreator = new WindowCreator2 (); WindowCreator.AddRef (); diff --git a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/gtk/org/eclipse/swt/browser/MozillaDelegate.java b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/gtk/org/eclipse/swt/browser/MozillaDelegate.java index 3a868f4c9e..63caf8e3e2 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/gtk/org/eclipse/swt/browser/MozillaDelegate.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/gtk/org/eclipse/swt/browser/MozillaDelegate.java @@ -182,6 +182,10 @@ void init () { } } +boolean needsSpinup () { + return true; +} + void onDispose (int /*long*/ embedHandle) { if (listener != null) { browser.getDisplay ().removeFilter (SWT.FocusIn, listener); diff --git a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/motif/org/eclipse/swt/browser/MozillaDelegate.java b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/motif/org/eclipse/swt/browser/MozillaDelegate.java index df912aa7e9..2c3985c91e 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/motif/org/eclipse/swt/browser/MozillaDelegate.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/motif/org/eclipse/swt/browser/MozillaDelegate.java @@ -137,6 +137,10 @@ boolean hookEnterExit () { void init () { } +boolean needsSpinup () { + return true; +} + void onDispose (int embedHandle) { if (listener != null) { browser.getDisplay ().removeFilter (SWT.FocusIn, listener); diff --git a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/win32/org/eclipse/swt/browser/MozillaDelegate.java b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/win32/org/eclipse/swt/browser/MozillaDelegate.java index 0e99bcc02c..878e7c5565 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/win32/org/eclipse/swt/browser/MozillaDelegate.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/win32/org/eclipse/swt/browser/MozillaDelegate.java @@ -76,6 +76,10 @@ boolean hookEnterExit () { void init () { } +boolean needsSpinup () { + return false; +} + void onDispose (int /*long*/ embedHandle) { browser = null; } |