[Qt][WK2] Move the C API callback setup out of QtWebPageProxy
authoralexis.menard@openbossa.org <alexis.menard@openbossa.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 27 Oct 2011 14:36:59 +0000 (14:36 +0000)
committeralexis.menard@openbossa.org <alexis.menard@openbossa.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 27 Oct 2011 14:36:59 +0000 (14:36 +0000)
https://bugs.webkit.org/show_bug.cgi?id=70965

Reviewed by Andreas Kling.

Move out the setup of C API callback into ClientImpl file
so that QtWebPageProxy will be less polluted.

* UIProcess/qt/ClientImpl.cpp:
(qt_wk_didStartProvisionalLoadForFrame):
(qt_wk_didFailProvisionalLoadWithErrorForFrame):
(qt_wk_didCommitLoadForFrame):
(qt_wk_didFinishLoadForFrame):
(qt_wk_didFailLoadWithErrorForFrame):
(qt_wk_didSameDocumentNavigationForFrame):
(qt_wk_didReceiveTitleForFrame):
(qt_wk_didStartProgress):
(qt_wk_didChangeProgress):
(qt_wk_didFinishProgress):
(qt_wk_runJavaScriptAlert):
(qt_wk_runJavaScriptConfirm):
(qt_wk_runJavaScriptPrompt):
(qt_wk_setStatusText):
(qt_wk_runOpenPanel):
(qt_wk_mouseDidMoveOverElement):
(qt_wk_decidePolicyForNavigationAction):
(qt_wk_decidePolicyForResponse):
(setupPageLoaderClient):
(setupPageUiClient):
(setupPagePolicyClient):
* UIProcess/qt/ClientImpl.h:
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::init):
* UIProcess/qt/QtWebPageProxy.h:
(QtWebPageProxy::viewInterface):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@98570 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/qt/ClientImpl.cpp
Source/WebKit2/UIProcess/qt/ClientImpl.h
Source/WebKit2/UIProcess/qt/QtWebPageProxy.cpp
Source/WebKit2/UIProcess/qt/QtWebPageProxy.h

index 17a5a6c..6f6e2a9 100644 (file)
@@ -1,3 +1,41 @@
+2011-10-27  Alexis Menard  <alexis.menard@openbossa.org>
+
+        [Qt][WK2] Move the C API callback setup out of QtWebPageProxy
+        https://bugs.webkit.org/show_bug.cgi?id=70965
+
+        Reviewed by Andreas Kling.
+
+        Move out the setup of C API callback into ClientImpl file
+        so that QtWebPageProxy will be less polluted.
+
+        * UIProcess/qt/ClientImpl.cpp:
+        (qt_wk_didStartProvisionalLoadForFrame):
+        (qt_wk_didFailProvisionalLoadWithErrorForFrame):
+        (qt_wk_didCommitLoadForFrame):
+        (qt_wk_didFinishLoadForFrame):
+        (qt_wk_didFailLoadWithErrorForFrame):
+        (qt_wk_didSameDocumentNavigationForFrame):
+        (qt_wk_didReceiveTitleForFrame):
+        (qt_wk_didStartProgress):
+        (qt_wk_didChangeProgress):
+        (qt_wk_didFinishProgress):
+        (qt_wk_runJavaScriptAlert):
+        (qt_wk_runJavaScriptConfirm):
+        (qt_wk_runJavaScriptPrompt):
+        (qt_wk_setStatusText):
+        (qt_wk_runOpenPanel):
+        (qt_wk_mouseDidMoveOverElement):
+        (qt_wk_decidePolicyForNavigationAction):
+        (qt_wk_decidePolicyForResponse):
+        (setupPageLoaderClient):
+        (setupPageUiClient):
+        (setupPagePolicyClient):
+        * UIProcess/qt/ClientImpl.h:
+        * UIProcess/qt/QtWebPageProxy.cpp:
+        (QtWebPageProxy::init):
+        * UIProcess/qt/QtWebPageProxy.h:
+        (QtWebPageProxy::viewInterface):
+
 2011-10-27  Zeno Albisser  <zeno.albisser@nokia.com>
 
         [Qt][WK2] Remove QAction from MiniBrowser
index 9a3a999..eae5f21 100644 (file)
@@ -81,7 +81,7 @@ static void dispatchLoadFailed(WKFrameRef frame, const void* clientInfo, WKError
     toQtWebPageProxy(clientInfo)->loadDidFail(QtWebError(error));
 }
 
-void qt_wk_didStartProvisionalLoadForFrame(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void* clientInfo)
+static void qt_wk_didStartProvisionalLoadForFrame(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void* clientInfo)
 {
     if (!WKFrameIsMainFrame(frame))
         return;
@@ -90,12 +90,12 @@ void qt_wk_didStartProvisionalLoadForFrame(WKPageRef page, WKFrameRef frame, WKT
     toQtWebPageProxy(clientInfo)->loadDidBegin();
 }
 
-void qt_wk_didFailProvisionalLoadWithErrorForFrame(WKPageRef page, WKFrameRef frame, WKErrorRef error, WKTypeRef userData, const void* clientInfo)
+static void qt_wk_didFailProvisionalLoadWithErrorForFrame(WKPageRef page, WKFrameRef frame, WKErrorRef error, WKTypeRef userData, const void* clientInfo)
 {
     dispatchLoadFailed(frame, clientInfo, error);
 }
 
-void qt_wk_didCommitLoadForFrame(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void* clientInfo)
+static void qt_wk_didCommitLoadForFrame(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void* clientInfo)
 {
     if (!WKFrameIsMainFrame(frame))
         return;
@@ -107,17 +107,17 @@ void qt_wk_didCommitLoadForFrame(WKPageRef page, WKFrameRef frame, WKTypeRef use
     toQtWebPageProxy(clientInfo)->loadDidCommit();
 }
 
-void qt_wk_didFinishLoadForFrame(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void* clientInfo)
+static void qt_wk_didFinishLoadForFrame(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void* clientInfo)
 {
     dispatchLoadSucceeded(frame, clientInfo);
 }
 
-void qt_wk_didFailLoadWithErrorForFrame(WKPageRef page, WKFrameRef frame, WKErrorRef error, WKTypeRef userData, const void* clientInfo)
+static void qt_wk_didFailLoadWithErrorForFrame(WKPageRef page, WKFrameRef frame, WKErrorRef error, WKTypeRef userData, const void* clientInfo)
 {
     dispatchLoadFailed(frame, clientInfo, error);
 }
 
-void qt_wk_didSameDocumentNavigationForFrame(WKPageRef page, WKFrameRef frame, WKSameDocumentNavigationType type, WKTypeRef userData, const void* clientInfo)
+static void qt_wk_didSameDocumentNavigationForFrame(WKPageRef page, WKFrameRef frame, WKSameDocumentNavigationType type, WKTypeRef userData, const void* clientInfo)
 {
     WebFrameProxy* wkframe = toImpl(frame);
     QString urlStr(wkframe->url());
@@ -126,7 +126,7 @@ void qt_wk_didSameDocumentNavigationForFrame(WKPageRef page, WKFrameRef frame, W
     toQtWebPageProxy(clientInfo)->didChangeUrl(qUrl);
 }
 
-void qt_wk_didReceiveTitleForFrame(WKPageRef page, WKStringRef title, WKFrameRef frame, WKTypeRef userData, const void* clientInfo)
+static void qt_wk_didReceiveTitleForFrame(WKPageRef page, WKStringRef title, WKFrameRef frame, WKTypeRef userData, const void* clientInfo)
 {
     if (!WKFrameIsMainFrame(frame))
         return;
@@ -134,28 +134,28 @@ void qt_wk_didReceiveTitleForFrame(WKPageRef page, WKStringRef title, WKFrameRef
     toQtWebPageProxy(clientInfo)->didChangeTitle(qTitle);
 }
 
-void qt_wk_didStartProgress(WKPageRef page, const void* clientInfo)
+static void qt_wk_didStartProgress(WKPageRef page, const void* clientInfo)
 {
     toQtWebPageProxy(clientInfo)->didChangeLoadProgress(0);
 }
 
-void qt_wk_didChangeProgress(WKPageRef page, const void* clientInfo)
+static void qt_wk_didChangeProgress(WKPageRef page, const void* clientInfo)
 {
     toQtWebPageProxy(clientInfo)->didChangeLoadProgress(WKPageGetEstimatedProgress(page) * 100);
 }
 
-void qt_wk_didFinishProgress(WKPageRef page, const void* clientInfo)
+static void qt_wk_didFinishProgress(WKPageRef page, const void* clientInfo)
 {
     toQtWebPageProxy(clientInfo)->didChangeLoadProgress(100);
 }
 
-void qt_wk_runJavaScriptAlert(WKPageRef page, WKStringRef alertText, WKFrameRef frame, const void* clientInfo)
+static void qt_wk_runJavaScriptAlert(WKPageRef page, WKStringRef alertText, WKFrameRef frame, const void* clientInfo)
 {
     QString qAlertText = WKStringCopyQString(alertText);
     toQtViewInterface(clientInfo)->runJavaScriptAlert(qAlertText);
 }
 
-bool qt_wk_runJavaScriptConfirm(WKPageRef, WKStringRef message, WKFrameRef, const void* clientInfo)
+static bool qt_wk_runJavaScriptConfirm(WKPageRef, WKStringRef message, WKFrameRef, const void* clientInfo)
 {
     QString qMessage = WKStringCopyQString(message);
     return toQtViewInterface(clientInfo)->runJavaScriptConfirm(qMessage);
@@ -167,7 +167,7 @@ static inline WKStringRef createNullWKString()
     return toAPI(webString.release().leakRef());
 }
 
-WKStringRef qt_wk_runJavaScriptPrompt(WKPageRef, WKStringRef message, WKStringRef defaultValue, WKFrameRef, const void* clientInfo)
+static WKStringRef qt_wk_runJavaScriptPrompt(WKPageRef, WKStringRef message, WKStringRef defaultValue, WKFrameRef, const void* clientInfo)
 {
     QString qMessage = WKStringCopyQString(message);
     QString qDefaultValue = WKStringCopyQString(defaultValue);
@@ -178,13 +178,13 @@ WKStringRef qt_wk_runJavaScriptPrompt(WKPageRef, WKStringRef message, WKStringRe
     return WKStringCreateWithQString(result);
 }
 
-void qt_wk_setStatusText(WKPageRef, WKStringRef text, const void *clientInfo)
+static void qt_wk_setStatusText(WKPageRef, WKStringRef text, const void *clientInfo)
 {
     QString qText = WKStringCopyQString(text);
     toQtViewInterface(clientInfo)->didChangeStatusText(qText);
 }
 
-void qt_wk_runOpenPanel(WKPageRef, WKFrameRef, WKOpenPanelParametersRef parameters, WKOpenPanelResultListenerRef listener, const void* clientInfo)
+static void qt_wk_runOpenPanel(WKPageRef, WKFrameRef, WKOpenPanelParametersRef parameters, WKOpenPanelResultListenerRef listener, const void* clientInfo)
 {
     Vector<String> wkSelectedFileNames = toImpl(parameters)->selectedFileNames();
 
@@ -197,7 +197,7 @@ void qt_wk_runOpenPanel(WKPageRef, WKFrameRef, WKOpenPanelParametersRef paramete
     toQtViewInterface(clientInfo)->chooseFiles(listener, selectedFileNames, allowMultipleFiles);
 }
 
-void qt_wk_mouseDidMoveOverElement(WKPageRef page, WKHitTestResultRef hitTestResult, WKEventModifiers modifiers, WKTypeRef userData, const void* clientInfo)
+static void qt_wk_mouseDidMoveOverElement(WKPageRef page, WKHitTestResultRef hitTestResult, WKEventModifiers modifiers, WKTypeRef userData, const void* clientInfo)
 {
     const QUrl absoluteLinkUrl = WKURLCopyQUrl(WKHitTestResultCopyAbsoluteLinkURL(hitTestResult));
     const QString linkTitle = WKStringCopyQString(WKHitTestResultCopyLinkTitle(hitTestResult));
@@ -231,7 +231,7 @@ static Qt::KeyboardModifiers toQtKeyboardModifiers(WKEventModifiers modifiers)
     return qtModifiers;
 }
 
-void qt_wk_decidePolicyForNavigationAction(WKPageRef page, WKFrameRef frame, WKFrameNavigationType navigationType, WKEventModifiers modifiers, WKEventMouseButton mouseButton, WKURLRequestRef request, WKFramePolicyListenerRef listener, WKTypeRef userData, const void* clientInfo)
+static void qt_wk_decidePolicyForNavigationAction(WKPageRef page, WKFrameRef frame, WKFrameNavigationType navigationType, WKEventModifiers modifiers, WKEventMouseButton mouseButton, WKURLRequestRef request, WKFramePolicyListenerRef listener, WKTypeRef userData, const void* clientInfo)
 {
     QtPolicyInterface* policyInterface = toQtPolicyInterface(clientInfo);
     WKURLRef requestURL = WKURLRequestCopyURL(request);
@@ -252,7 +252,7 @@ void qt_wk_decidePolicyForNavigationAction(WKPageRef page, WKFrameRef frame, WKF
     }
 }
 
-void qt_wk_decidePolicyForResponse(WKPageRef page, WKFrameRef frame, WKURLResponseRef response, WKURLRequestRef request, WKFramePolicyListenerRef listener, WKTypeRef userData, const void* clientInfo)
+static void qt_wk_decidePolicyForResponse(WKPageRef page, WKFrameRef frame, WKURLResponseRef response, WKURLRequestRef request, WKFramePolicyListenerRef listener, WKTypeRef userData, const void* clientInfo)
 {
     String type = toImpl(response)->resourceResponse().mimeType();
     type.makeLower();
@@ -278,3 +278,48 @@ void qt_wk_decidePolicyForResponse(WKPageRef page, WKFrameRef frame, WKURLRespon
 
     WKFramePolicyListenerUse(listener);
 }
+
+void setupPageLoaderClient(QtWebPageProxy* qtWebPageProxy, WebPageProxy* webPageProxy)
+{
+    WKPageLoaderClient loadClient;
+    memset(&loadClient, 0, sizeof(WKPageLoaderClient));
+    loadClient.version = kWKPageLoaderClientCurrentVersion;
+    loadClient.clientInfo = qtWebPageProxy;
+    loadClient.didStartProvisionalLoadForFrame = qt_wk_didStartProvisionalLoadForFrame;
+    loadClient.didFailProvisionalLoadWithErrorForFrame = qt_wk_didFailProvisionalLoadWithErrorForFrame;
+    loadClient.didCommitLoadForFrame = qt_wk_didCommitLoadForFrame;
+    loadClient.didFinishLoadForFrame = qt_wk_didFinishLoadForFrame;
+    loadClient.didFailLoadWithErrorForFrame = qt_wk_didFailLoadWithErrorForFrame;
+    loadClient.didSameDocumentNavigationForFrame = qt_wk_didSameDocumentNavigationForFrame;
+    loadClient.didReceiveTitleForFrame = qt_wk_didReceiveTitleForFrame;
+    loadClient.didStartProgress = qt_wk_didStartProgress;
+    loadClient.didChangeProgress = qt_wk_didChangeProgress;
+    loadClient.didFinishProgress = qt_wk_didFinishProgress;
+    WKPageSetPageLoaderClient(qtWebPageProxy->pageRef(), &loadClient);
+}
+
+void setupPageUiClient(QtWebPageProxy* qtWebPageProxy, WebPageProxy* webPageProxy)
+{
+    WKPageUIClient uiClient;
+    memset(&uiClient, 0, sizeof(WKPageUIClient));
+    uiClient.version = kWKPageUIClientCurrentVersion;
+    uiClient.clientInfo = qtWebPageProxy->viewInterface();
+    uiClient.runJavaScriptAlert = qt_wk_runJavaScriptAlert;
+    uiClient.runJavaScriptConfirm = qt_wk_runJavaScriptConfirm;
+    uiClient.runJavaScriptPrompt = qt_wk_runJavaScriptPrompt;
+    uiClient.setStatusText = qt_wk_setStatusText;
+    uiClient.runOpenPanel = qt_wk_runOpenPanel;
+    uiClient.mouseDidMoveOverElement = qt_wk_mouseDidMoveOverElement;
+    WKPageSetPageUIClient(toAPI(webPageProxy), &uiClient);
+}
+
+void setupPagePolicyClient(QtPolicyInterface* policyInterface, WebPageProxy* webPageProxy)
+{
+    WKPagePolicyClient policyClient;
+    memset(&policyClient, 0, sizeof(WKPagePolicyClient));
+    policyClient.version = kWKPagePolicyClientCurrentVersion;
+    policyClient.clientInfo = policyInterface;
+    policyClient.decidePolicyForNavigationAction = qt_wk_decidePolicyForNavigationAction;
+    policyClient.decidePolicyForResponse = qt_wk_decidePolicyForResponse;
+    WKPageSetPagePolicyClient(toAPI(webPageProxy), &policyClient);
+}
index bb3209f..c28a010 100644 (file)
     Boston, MA 02110-1301, USA.
 */
 
-#ifndef DefaultClientCallbacksQt_h
-#define DefaultClientCallbacksQt_h
+#ifndef ClientImpl_h
+#define ClientImpl_h
 
 #include <WebKit2/WKPage.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-// loader client
-void qt_wk_didStartProvisionalLoadForFrame(WKPageRef, WKFrameRef, WKTypeRef, const void* clientInfo);
-void qt_wk_didFailProvisionalLoadWithErrorForFrame(WKPageRef, WKFrameRef, WKErrorRef, WKTypeRef, const void* clientInfo);
-void qt_wk_didCommitLoadForFrame(WKPageRef, WKFrameRef, WKTypeRef, const void* clientInfo);
-void qt_wk_didFinishLoadForFrame(WKPageRef, WKFrameRef, WKTypeRef, const void* clientInfo);
-void qt_wk_didFailLoadWithErrorForFrame(WKPageRef, WKFrameRef, WKErrorRef, WKTypeRef, const void* clientInfo);
-void qt_wk_didReceiveTitleForFrame(WKPageRef, WKStringRef title, WKFrameRef, WKTypeRef, const void* clientInfo);
-void qt_wk_didStartProgress(WKPageRef, const void* clientInfo);
-void qt_wk_didChangeProgress(WKPageRef, const void* clientInfo);
-void qt_wk_didFinishProgress(WKPageRef, const void* clientInfo);
-void qt_wk_didSameDocumentNavigationForFrame(WKPageRef, WKFrameRef, WKSameDocumentNavigationType, WKTypeRef, const void* clientInfo);
-
-// ui client
-void qt_wk_runJavaScriptAlert(WKPageRef, WKStringRef alertText, WKFrameRef, const void* clientInfo);
-bool qt_wk_runJavaScriptConfirm(WKPageRef, WKStringRef message, WKFrameRef, const void* clientInfo);
-WKStringRef qt_wk_runJavaScriptPrompt(WKPageRef, WKStringRef message, WKStringRef defaultValue, WKFrameRef, const void* clientInfo);
-void qt_wk_setStatusText(WKPageRef page, WKStringRef text, const void *clientInfo);
-void qt_wk_runOpenPanel(WKPageRef, WKFrameRef, WKOpenPanelParametersRef, WKOpenPanelResultListenerRef, const void* clientInfo);
-void qt_wk_mouseDidMoveOverElement(WKPageRef, WKHitTestResultRef, WKEventModifiers, WKTypeRef, const void* clientInfo);
-
-// Policy client.
-void qt_wk_decidePolicyForNavigationAction(WKPageRef, WKFrameRef, WKFrameNavigationType, WKEventModifiers, WKEventMouseButton, WKURLRequestRef, WKFramePolicyListenerRef, WKTypeRef userData, const void* clientInfo);
-void qt_wk_decidePolicyForResponse(WKPageRef, WKFrameRef, WKURLResponseRef, WKURLRequestRef, WKFramePolicyListenerRef, WKTypeRef userData, const void* clientInfo);
-
-#ifdef __cplusplus
+class QtWebPageProxy;
+namespace WebKit {
+class QtPolicyInterface;
+class WebPageProxy;
 }
-#endif
+void setupPageLoaderClient(QtWebPageProxy*, WebKit::WebPageProxy*);
+void setupPageUiClient(QtWebPageProxy*, WebKit::WebPageProxy*);
+void setupPagePolicyClient(WebKit::QtPolicyInterface*, WebKit::WebPageProxy*);
 
-#endif /* DefaultClientCallbacksQt_h */
+#endif /* ClientImpl_h */
 
index b4b0771..6ffd858 100644 (file)
@@ -119,43 +119,11 @@ void QtWebPageProxy::init()
 {
     m_webPageProxy->initializeWebPage();
 
-    WKPageLoaderClient loadClient;
-    memset(&loadClient, 0, sizeof(WKPageLoaderClient));
-    loadClient.version = kWKPageLoaderClientCurrentVersion;
-    loadClient.clientInfo = this;
-    loadClient.didStartProvisionalLoadForFrame = qt_wk_didStartProvisionalLoadForFrame;
-    loadClient.didFailProvisionalLoadWithErrorForFrame = qt_wk_didFailProvisionalLoadWithErrorForFrame;
-    loadClient.didCommitLoadForFrame = qt_wk_didCommitLoadForFrame;
-    loadClient.didFinishLoadForFrame = qt_wk_didFinishLoadForFrame;
-    loadClient.didFailLoadWithErrorForFrame = qt_wk_didFailLoadWithErrorForFrame;
-    loadClient.didSameDocumentNavigationForFrame = qt_wk_didSameDocumentNavigationForFrame;
-    loadClient.didReceiveTitleForFrame = qt_wk_didReceiveTitleForFrame;
-    loadClient.didStartProgress = qt_wk_didStartProgress;
-    loadClient.didChangeProgress = qt_wk_didChangeProgress;
-    loadClient.didFinishProgress = qt_wk_didFinishProgress;
-    WKPageSetPageLoaderClient(pageRef(), &loadClient);
-
-    WKPageUIClient uiClient;
-    memset(&uiClient, 0, sizeof(WKPageUIClient));
-    uiClient.version = kWKPageUIClientCurrentVersion;
-    uiClient.clientInfo = m_viewInterface;
-    uiClient.runJavaScriptAlert = qt_wk_runJavaScriptAlert;
-    uiClient.runJavaScriptConfirm = qt_wk_runJavaScriptConfirm;
-    uiClient.runJavaScriptPrompt = qt_wk_runJavaScriptPrompt;
-    uiClient.setStatusText = qt_wk_setStatusText;
-    uiClient.runOpenPanel = qt_wk_runOpenPanel;
-    uiClient.mouseDidMoveOverElement = qt_wk_mouseDidMoveOverElement;
-    WKPageSetPageUIClient(toAPI(m_webPageProxy.get()), &uiClient);
-
-    if (m_policyInterface) {
-        WKPagePolicyClient policyClient;
-        memset(&policyClient, 0, sizeof(WKPagePolicyClient));
-        policyClient.version = kWKPagePolicyClientCurrentVersion;
-        policyClient.clientInfo = m_policyInterface;
-        policyClient.decidePolicyForNavigationAction = qt_wk_decidePolicyForNavigationAction;
-        policyClient.decidePolicyForResponse = qt_wk_decidePolicyForResponse;
-        WKPageSetPagePolicyClient(toAPI(m_webPageProxy.get()), &policyClient);
-    }
+    setupPageLoaderClient(this, m_webPageProxy.get());
+    setupPageUiClient(this, m_webPageProxy.get());
+
+    if (m_policyInterface)
+        setupPagePolicyClient(m_policyInterface, m_webPageProxy.get());
 }
 
 QtWebPageProxy::~QtWebPageProxy()
index 12b0a95..14a7ffe 100644 (file)
@@ -170,6 +170,7 @@ public:
     void setPageAndTextZoomFactors(qreal pageZoomFactor, qreal textZoomFactor);
 
     QWKHistory* history() const;
+    QtViewInterface* viewInterface() const { return m_viewInterface; }
 
 public Q_SLOTS:
     void navigationStateChanged();