wxWebKit API changes in preparation for DRT implementation.
[WebKit.git] / WebKit / wx / WebKitSupport / FrameLoaderClientWx.cpp
index 1ab80fd4906ff8f9a201a63433bbfc829efb3c11..60881975dd6ed168ac3ec7b68449141023b4931d 100644 (file)
@@ -248,7 +248,13 @@ void FrameLoaderClientWx::loadedFromCachedPage()
 
 void FrameLoaderClientWx::dispatchDidHandleOnloadEvents()
 {
-    notImplemented();
+    wxWindow* target = m_frame->view()->nativeWindow();
+    if (target) {
+        wxWebViewLoadEvent wkEvent(target);
+        wkEvent.SetState(wxWEBVIEW_LOAD_ONLOAD_HANDLED);
+        wkEvent.SetURL(m_frame->loader()->provisionalDocumentLoader()->request().url().string());
+        target->GetEventHandler()->ProcessEvent(wkEvent);
+    }
 }
 
 
@@ -288,8 +294,8 @@ void FrameLoaderClientWx::dispatchDidStartProvisionalLoad()
 {
     wxWindow* target = m_frame->view()->nativeWindow();
     if (target) {
-        wxWebViewStateChangedEvent wkEvent(target);
-        wkEvent.SetState(wxWEBVIEW_STATE_NEGOTIATING);
+        wxWebViewLoadEvent wkEvent(target);
+        wkEvent.SetState(wxWEBVIEW_LOAD_NEGOTIATING);
         wkEvent.SetURL(m_frame->loader()->provisionalDocumentLoader()->request().url().string());
         target->GetEventHandler()->ProcessEvent(wkEvent);
     }
@@ -308,8 +314,8 @@ void FrameLoaderClientWx::dispatchDidCommitLoad()
 {
     wxWindow* target = m_frame->view()->nativeWindow();
     if (target) {
-        wxWebViewStateChangedEvent wkEvent(target);
-        wkEvent.SetState(wxWEBVIEW_STATE_TRANSFERRING);
+        wxWebViewLoadEvent wkEvent(target);
+        wkEvent.SetState(wxWEBVIEW_LOAD_TRANSFERRING);
         wkEvent.SetURL(m_frame->loader()->documentLoader()->request().url().string());
         target->GetEventHandler()->ProcessEvent(wkEvent);
     }
@@ -319,8 +325,8 @@ void FrameLoaderClientWx::dispatchDidFinishDocumentLoad()
 {
     wxWindow* target = m_frame->view()->nativeWindow();
     if (target) {
-        wxWebViewStateChangedEvent wkEvent(target);
-        wkEvent.SetState(wxWEBVIEW_STATE_STOP);
+        wxWebViewLoadEvent wkEvent(target);
+        wkEvent.SetState(wxWEBVIEW_LOAD_DOC_COMPLETED);
         wkEvent.SetURL(m_frame->loader()->url().string());
         target->GetEventHandler()->ProcessEvent(wkEvent);
     }
@@ -391,8 +397,8 @@ void FrameLoaderClientWx::postProgressFinishedNotification()
 {
     wxWindow* target = m_frame->view()->nativeWindow();
     if (target) {
-        wxWebViewStateChangedEvent wkEvent(target);
-        wkEvent.SetState(wxWEBVIEW_STATE_STOP);
+        wxWebViewLoadEvent wkEvent(target);
+        wkEvent.SetState(wxWEBVIEW_LOAD_DL_COMPLETED);
         wkEvent.SetURL(m_frame->loader()->url().string());
         target->GetEventHandler()->ProcessEvent(wkEvent);
     }