Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/browser/CEF.java13
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/browser/CEFLoadHandler.java11
2 files changed, 22 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/browser/CEF.java b/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/browser/CEF.java
index 1cebc40ae4..c7484e19dd 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/browser/CEF.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/browser/CEF.java
@@ -36,6 +36,7 @@ public class CEF extends WebBrowser {
static final String ABOUT_BLANK = "about:blank"; //$NON-NLS-1$
static final String CEF3_PATH = "org.eclipse.swt.browser.CEF3Path"; //$NON-NLS-1$
static final String URI_FILEROOT = "file:///"; //$NON-NLS-1$
+ static final int MAX_PROGRESS = 100;
static {
/*
@@ -357,13 +358,23 @@ void onDispose(Event e) {
cefBrowser = null;
// TODO more clean up
}
-
void onResize() {
Rectangle bounds = browser.getClientArea();
OS.SetWindowPos(windowHandle, 0, bounds.x, bounds.y, bounds.width, bounds.height, OS.SWP_NOZORDER | OS.SWP_DRAWFRAME | OS.SWP_NOACTIVATE | OS.SWP_ASYNCWINDOWPOS);
}
+public void onLoadComplete() {
+ ProgressEvent progress = new ProgressEvent (browser);
+ progress.display = browser.getDisplay ();
+ progress.widget = browser;
+ progress.current = MAX_PROGRESS;
+ progress.total = MAX_PROGRESS;
+ for (int i = 0; i < progressListeners.length; i++) {
+ progressListeners[i].completed (progress);
+ }
+}
+
public void onLocationChange(String location, boolean top) {
LocationEvent event = new LocationEvent(browser);
event.display = browser.getDisplay ();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/browser/CEFLoadHandler.java b/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/browser/CEFLoadHandler.java
index aa01a18b29..4848bfc003 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/browser/CEFLoadHandler.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/browser/CEFLoadHandler.java
@@ -78,7 +78,16 @@ long /*int*/ on_load_start(long /*int*/ browser, long /*int*/ frame) {
}
long /*int*/ on_load_end(long /*int*/ browser, long /*int*/ frame, int httpStatusCode) {
- if (Device.DEBUG) System.out.println("on_load_end (TODO)");
+ if (Device.DEBUG) System.out.println("on_load_end (impl)");
+
+ CEFFrame cefFrame = new CEFFrame(frame);
+ if (cefFrame.is_main() == 1) {
+ Display.getDefault().asyncExec(new Runnable() {
+ public void run() {
+ host.onLoadComplete();
+ }
+ });
+ }
return 0;
}

Back to the top