diff options
author | Grant Gayed | 2010-08-20 18:50:45 +0000 |
---|---|---|
committer | Grant Gayed | 2010-08-20 18:50:45 +0000 |
commit | 06f06dd0c77f0d9a4c38817b6ad1d77e716043a0 (patch) | |
tree | d9564dbf63d96c7d32457e53a1addca1ed489868 /bundles/org.eclipse.swt/Eclipse SWT Browser/forms/org/eclipse/swt | |
parent | 7e2de3fb032496a80dceeae6d06edb14795a7315 (diff) | |
download | eclipse.platform.swt-06f06dd0c77f0d9a4c38817b6ad1d77e716043a0.tar.gz eclipse.platform.swt-06f06dd0c77f0d9a4c38817b6ad1d77e716043a0.tar.xz eclipse.platform.swt-06f06dd0c77f0d9a4c38817b6ad1d77e716043a0.zip |
317163 - Browser dispatching to platform-specific implementation has room for improvement
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT Browser/forms/org/eclipse/swt')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT Browser/forms/org/eclipse/swt/browser/BrowserFactory.java | 22 | ||||
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT Browser/forms/org/eclipse/swt/browser/IE.java | 4 |
2 files changed, 23 insertions, 3 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Browser/forms/org/eclipse/swt/browser/BrowserFactory.java b/bundles/org.eclipse.swt/Eclipse SWT Browser/forms/org/eclipse/swt/browser/BrowserFactory.java new file mode 100644 index 0000000000..c10a714ca3 --- /dev/null +++ b/bundles/org.eclipse.swt/Eclipse SWT Browser/forms/org/eclipse/swt/browser/BrowserFactory.java @@ -0,0 +1,22 @@ +/******************************************************************************* + * Copyright (c) 2010 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.swt.browser; + +import org.eclipse.swt.SWT; + +class BrowserFactory { + +WebBrowser createWebBrowser (int style) { + if ((style & SWT.MOZILLA) != 0) return null; + return new IE (); +} + +} diff --git a/bundles/org.eclipse.swt/Eclipse SWT Browser/forms/org/eclipse/swt/browser/IE.java b/bundles/org.eclipse.swt/Eclipse SWT Browser/forms/org/eclipse/swt/browser/IE.java index 30f73ebdfe..5384ab91e3 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Browser/forms/org/eclipse/swt/browser/IE.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Browser/forms/org/eclipse/swt/browser/IE.java @@ -28,7 +28,7 @@ class IE extends WebBrowser { }; } -public boolean create(Composite parent, int style) { +public void create(Composite parent, int style) { host = OS.gcnew_WindowsFormsHost(); if (host == 0) SWT.error(SWT.ERROR_NO_HANDLES); webBrowser = OS.gcnew_WebBrowser(); @@ -87,8 +87,6 @@ public boolean create(Composite parent, int style) { }; browser.addListener(SWT.Resize, listener); browser.addListener(SWT.Dispose, listener); - - return true; } public boolean back() { |