From af3dd215cb77dd91adfc1e1c787420e2bc7a9937 Mon Sep 17 00:00:00 2001 From: andyque Date: Mon, 15 Sep 2014 18:14:04 +0800 Subject: [PATCH] improve android web view --- cocos/ui/UIWebViewImpl-android.cpp | 18 +++++++++--------- cocos/ui/UIWebViewImpl-android.h | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/cocos/ui/UIWebViewImpl-android.cpp b/cocos/ui/UIWebViewImpl-android.cpp index adfb5d57f6..813633d3db 100644 --- a/cocos/ui/UIWebViewImpl-android.cpp +++ b/cocos/ui/UIWebViewImpl-android.cpp @@ -322,7 +322,7 @@ namespace cocos2d { loadHTMLStringJNI(_viewTag, string, baseURL); } - void WebViewImpl::loadUrl(const std::string &url) { + void WebViewImpl::loadURL(const std::string &url) { loadUrlJNI(_viewTag, url); } @@ -371,8 +371,8 @@ namespace cocos2d { auto it = s_WebViewImpls.find(viewTag); if (it != s_WebViewImpls.end()) { auto webView = s_WebViewImpls[viewTag]->_webView; - if (webView->shouldStartLoading) { - return webView->shouldStartLoading(webView, url); + if (webView->_onShouldStartLoading) { + return webView->_onShouldStartLoading(webView, url); } } return true; @@ -382,8 +382,8 @@ namespace cocos2d { auto it = s_WebViewImpls.find(viewTag); if (it != s_WebViewImpls.end()) { auto webView = s_WebViewImpls[viewTag]->_webView; - if (webView->didFinishLoading) { - webView->didFinishLoading(webView, url); + if (webView->_onDidFinishLoading) { + webView->_onDidFinishLoading(webView, url); } } } @@ -392,8 +392,8 @@ namespace cocos2d { auto it = s_WebViewImpls.find(viewTag); if (it != s_WebViewImpls.end()) { auto webView = s_WebViewImpls[viewTag]->_webView; - if (webView->didFailLoading) { - webView->didFailLoading(webView, url); + if (webView->_onDidFailLoading) { + webView->_onDidFailLoading(webView, url); } } } @@ -402,8 +402,8 @@ namespace cocos2d { auto it = s_WebViewImpls.find(viewTag); if (it != s_WebViewImpls.end()) { auto webView = s_WebViewImpls[viewTag]->_webView; - if (webView->onJsCallback) { - webView->onJsCallback(webView, message); + if (webView->_onJSCallback) { + webView->_onJSCallback(webView, message); } } } diff --git a/cocos/ui/UIWebViewImpl-android.h b/cocos/ui/UIWebViewImpl-android.h index 14177cf624..3e6c875b46 100644 --- a/cocos/ui/UIWebViewImpl-android.h +++ b/cocos/ui/UIWebViewImpl-android.h @@ -57,7 +57,7 @@ namespace cocos2d { void loadHTMLString(const std::string &string, const std::string &baseURL); - void loadUrl(const std::string &url); + void loadURL(const std::string &url); void loadFile(const std::string &fileName);