Implement some new ewk apis in web engine.
[platform/core/uifw/dali-adaptor.git] / dali / devel-api / adaptor-framework / web-engine.cpp
index 69c2b79..46130fa 100755 (executable)
 #include <dali/devel-api/adaptor-framework/web-engine.h>
 
 // INTERNAL INCLUDES
+#include <dali/devel-api/adaptor-framework/web-engine-back-forward-list.h>
+#include <dali/devel-api/adaptor-framework/web-engine-context.h>
+#include <dali/devel-api/adaptor-framework/web-engine-cookie-manager.h>
+#include <dali/devel-api/adaptor-framework/web-engine-settings.h>
 #include <dali/internal/web-engine/common/web-engine-impl.h>
 
 namespace Dali
@@ -77,6 +81,26 @@ NativeImageInterfacePtr WebEngine::GetNativeImageSource()
   return GetImplementation(*this).GetNativeImageSource();
 }
 
+Dali::WebEngineSettings& WebEngine::GetSettings() const
+{
+  return GetImplementation( *this ).GetSettings();
+}
+
+Dali::WebEngineContext& WebEngine::GetContext() const
+{
+  return GetImplementation( *this ).GetContext();
+}
+
+Dali::WebEngineCookieManager& WebEngine::GetCookieManager() const
+{
+  return GetImplementation( *this ).GetCookieManager();
+}
+
+Dali::WebEngineBackForwardList& WebEngine::GetBackForwardList() const
+{
+  return GetImplementation( *this ).GetBackForwardList();
+}
+
 void WebEngine::LoadUrl(const std::string& url)
 {
   return GetImplementation(*this).LoadUrl(url);
@@ -87,9 +111,9 @@ const std::string& WebEngine::GetUrl()
   return GetImplementation(*this).GetUrl();
 }
 
-void WebEngine::LoadHTMLString(const std::string& htmlString)
+void WebEngine::LoadHtmlString(const std::string& htmlString)
 {
-  GetImplementation(*this).LoadHTMLString(htmlString);
+  GetImplementation(*this).LoadHtmlString(htmlString);
 }
 
 void WebEngine::Reload()
@@ -112,69 +136,64 @@ void WebEngine::Resume()
   GetImplementation(*this).Resume();
 }
 
-bool WebEngine::CanGoForward()
+void WebEngine::ScrollBy( int deltaX, int deltaY )
 {
-  return GetImplementation(*this).CanGoForward();
+  GetImplementation( *this ).ScrollBy( deltaX, deltaY );
 }
 
-void WebEngine::GoForward()
+void WebEngine::SetScrollPosition( int x, int y )
 {
-  GetImplementation(*this).GoForward();
+  GetImplementation( *this ).SetScrollPosition( x, y );
 }
 
-bool WebEngine::CanGoBack()
+void WebEngine::GetScrollPosition( int& x, int& y ) const
 {
-  return GetImplementation(*this).CanGoBack();
+  GetImplementation( *this ).GetScrollPosition( x, y );
 }
 
-void WebEngine::GoBack()
+void WebEngine::GetScrollSize( int& width, int& height ) const
 {
-  GetImplementation(*this).GoBack();
+  GetImplementation( *this ).GetScrollSize( width, height );
 }
 
-void WebEngine::EvaluateJavaScript(const std::string& script, std::function<void(const std::string&)> resultHandler)
+void WebEngine::GetContentSize( int& width, int& height ) const
 {
-  GetImplementation(*this).EvaluateJavaScript(script, resultHandler);
-}
-
-void WebEngine::AddJavaScriptMessageHandler(const std::string& exposedObjectName, std::function<void(const std::string&)> handler)
-{
-  GetImplementation(*this).AddJavaScriptMessageHandler(exposedObjectName, handler);
+  GetImplementation( *this ).GetContentSize( width, height );
 }
 
-void WebEngine::ClearHistory()
+bool WebEngine::CanGoForward()
 {
-  return GetImplementation(*this).ClearHistory();
+  return GetImplementation(*this).CanGoForward();
 }
 
-void WebEngine::ClearCache()
+void WebEngine::GoForward()
 {
-  return GetImplementation(*this).ClearCache();
+  GetImplementation(*this).GoForward();
 }
 
-void WebEngine::ClearCookies()
+bool WebEngine::CanGoBack()
 {
-  return GetImplementation(*this).ClearCookies();
+  return GetImplementation(*this).CanGoBack();
 }
 
-Dali::WebEnginePlugin::CacheModel WebEngine::GetCacheModel() const
+void WebEngine::GoBack()
 {
-  return GetImplementation(*this).GetCacheModel();
+  GetImplementation(*this).GoBack();
 }
 
-void WebEngine::SetCacheModel(Dali::WebEnginePlugin::CacheModel cacheModel)
+void WebEngine::EvaluateJavaScript(const std::string& script, std::function<void(const std::string&)> resultHandler)
 {
-  GetImplementation(*this).SetCacheModel(cacheModel);
+  GetImplementation(*this).EvaluateJavaScript(script, resultHandler);
 }
 
-Dali::WebEnginePlugin::CookieAcceptPolicy WebEngine::GetCookieAcceptPolicy() const
+void WebEngine::AddJavaScriptMessageHandler(const std::string& exposedObjectName, std::function<void(const std::string&)> handler)
 {
-  return GetImplementation(*this).GetCookieAcceptPolicy();
+  GetImplementation(*this).AddJavaScriptMessageHandler(exposedObjectName, handler);
 }
 
-void WebEngine::SetCookieAcceptPolicy(Dali::WebEnginePlugin::CookieAcceptPolicy policy)
+void WebEngine::ClearHistory()
 {
-  GetImplementation(*this).SetCookieAcceptPolicy(policy);
+  return GetImplementation(*this).ClearHistory();
 }
 
 const std::string& WebEngine::GetUserAgent() const
@@ -187,46 +206,6 @@ void WebEngine::SetUserAgent(const std::string& userAgent)
   GetImplementation(*this).SetUserAgent(userAgent);
 }
 
-bool WebEngine::IsJavaScriptEnabled() const
-{
-  return GetImplementation(*this).IsJavaScriptEnabled();
-}
-
-void WebEngine::EnableJavaScript(bool enabled)
-{
-  GetImplementation(*this).EnableJavaScript(enabled);
-}
-
-bool WebEngine::AreImagesAutomaticallyLoaded() const
-{
-  return GetImplementation(*this).AreImagesAutomaticallyLoaded();
-}
-
-void WebEngine::LoadImagesAutomatically(bool automatic)
-{
-  GetImplementation(*this).LoadImagesAutomatically(automatic);
-}
-
-const std::string& WebEngine::GetDefaultTextEncodingName() const
-{
-  return GetImplementation(*this).GetDefaultTextEncodingName();
-}
-
-void WebEngine::SetDefaultTextEncodingName(const std::string& defaultTextEncodingName)
-{
-  GetImplementation(*this).SetDefaultTextEncodingName(defaultTextEncodingName);
-}
-
-int WebEngine::GetDefaultFontSize() const
-{
-  return GetImplementation(*this).GetDefaultFontSize();
-}
-
-void WebEngine::SetDefaultFontSize(int defaultFontSize)
-{
-  GetImplementation(*this).SetDefaultFontSize(defaultFontSize);
-}
-
 void WebEngine::SetSize(int width, int height)
 {
   return GetImplementation(*this).SetSize(width, height);
@@ -262,4 +241,9 @@ Dali::WebEnginePlugin::WebEnginePageLoadErrorSignalType& WebEngine::PageLoadErro
   return GetImplementation(*this).PageLoadErrorSignal();
 }
 
+Dali::WebEnginePlugin::WebEngineScrollEdgeReachedSignalType& WebEngine::ScrollEdgeReachedSignal()
+{
+  return GetImplementation( *this ).ScrollEdgeReachedSignal();
+}
+
 } // namespace Dali