aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenoit Hiller2013-03-12 21:32:41 (EDT)
committerGrant Gayed2013-03-13 10:03:07 (EDT)
commite1f72c7af97d691a86c2d43e04ca6f7eab70671e (patch)
treed97a7097cfb6ed8e1527fd1ed5cb44a0d2210470
parentc672366cb85f32ea5407233786c54d0e40be1aac (diff)
downloadeclipse.platform.swt-e1f72c7af97d691a86c2d43e04ca6f7eab70671e.zip
eclipse.platform.swt-e1f72c7af97d691a86c2d43e04ca6f7eab70671e.tar.gz
eclipse.platform.swt-e1f72c7af97d691a86c2d43e04ca6f7eab70671e.tar.bz2
moving location event
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/browser/CEFDisplayHandler.java13
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/browser/CEFLoadHandler.java12
2 files changed, 13 insertions, 12 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/browser/CEFDisplayHandler.java b/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/browser/CEFDisplayHandler.java
index aaa2480..53e83d2 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/browser/CEFDisplayHandler.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/browser/CEFDisplayHandler.java
@@ -12,6 +12,7 @@ package org.eclipse.swt.browser;
import org.eclipse.swt.graphics.Device;
import org.eclipse.swt.internal.cef3.CEF3Object;
+import org.eclipse.swt.internal.cef3.CEFFrame;
import org.eclipse.swt.widgets.Display;
public class CEFDisplayHandler {
@@ -68,7 +69,17 @@ long /*int*/ on_loading_state_change(long /*int*/ browser, int isLoading, int ca
}
long /*int*/ on_address_change(long /*int*/ browser, long /*int*/ frame, long /*int*/ url) {
- if (Device.DEBUG) System.out.println("on_address_change (TODO)");
+ if (Device.DEBUG) System.out.println("on_address_change (impl)");
+
+ CEFFrame cefFrame = new CEFFrame(frame);
+ final String location = CEF.getUrl(cefFrame);
+ final boolean top = cefFrame.is_main() == 1;
+
+ Display.getDefault().asyncExec(new Runnable() {
+ public void run() {
+ host.onLocationChange(location, top);
+ }
+ });
return 0;
}
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 4848bfc..c7c3e6f 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
@@ -63,17 +63,7 @@ synchronized int release() {
/* cef_load_handler_t */
long /*int*/ on_load_start(long /*int*/ browser, long /*int*/ frame) {
- if (Device.DEBUG) System.out.println("on_load_start (impl)");
-
- CEFFrame cefFrame = new CEFFrame(frame);
- final String location = CEF.getUrl(cefFrame);
- final boolean top = cefFrame.is_main() == 1;
-
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- host.onLocationChange(location, top);
- }
- });
+ if (Device.DEBUG) System.out.println("on_load_start (TODO)");
return 0;
}