Replace signal with callback. 94/281194/1 accepted/tizen_6.0_unified tizen_6.0 accepted/tizen/6.0/unified/20220915.050709 submit/tizen_6.0/20220915.012244
authorhuayong.xu <huayong.xu@samsung.com>
Wed, 14 Sep 2022 06:36:11 +0000 (14:36 +0800)
committerhuayong.xu <huayong.xu@samsung.com>
Wed, 14 Sep 2022 06:36:11 +0000 (14:36 +0800)
Change-Id: Ic0a266fb3287984e54d44dfbefa343189552bd0f

examples/web-view/web-view-example.cpp [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index b1aed6f..7351fa8
@@ -68,8 +68,8 @@ public:
     mWebView.SetProperty(Actor::Property::ANCHOR_POINT, Dali::AnchorPoint::CENTER);
     mWebView.SetProperty(Actor::Property::POSITION, Vector2(0, 0));
     mWebView.SetProperty(Actor::Property::SIZE, Vector2(width, height));
-    mWebView.PageLoadStartedSignal().Connect(this, &WebViewController::OnPageLoadStarted);
-    mWebView.PageLoadFinishedSignal().Connect(this, &WebViewController::OnPageLoadFinished);
+    mWebView.RegisterPageLoadStartedCallback(std::bind(&WebViewController::OnPageLoadStarted, this, std::placeholders::_1));
+    mWebView.RegisterPageLoadFinishedCallback(std::bind(&WebViewController::OnPageLoadFinished, this, std::placeholders::_1));
 
     std::string url = GetNextUrl();
     mWebView.LoadUrl(url);
@@ -88,12 +88,12 @@ public:
     Toolkit::KeyboardFocusManager::Get().SetCurrentFocusActor(mWebView);
   }
 
-  void OnPageLoadStarted(Toolkit::WebView view, const std::string& url)
+  void OnPageLoadStarted(const std::string& url)
   {
     mAddressLabel.SetProperty(Toolkit::TextLabel::Property::TEXT, "Loading");
   }
 
-  void OnPageLoadFinished(Toolkit::WebView view, const std::string& url)
+  void OnPageLoadFinished(const std::string& url)
   {
     mAddressLabel.SetProperty(Toolkit::TextLabel::Property::TEXT, url.c_str());
   }