- Previously, the web engine was fixed and selected for all DALi/NUI APPs in dali.sh, but now it can be chosen in the constructor.
Change-Id: I442edc86cbc93bc5a71c467b2aea8a46475607db
return WebEngine(baseObject);
}
+WebEngine WebEngine::New(int32_t type)
+{
+ //type is used for actual target
+ Internal::Adaptor::WebEngine* baseObject = new Internal::Adaptor::WebEngine();
+
+ return WebEngine(baseObject);
+}
+
Dali::WebEngineContext* WebEngine::GetContext()
{
return Internal::Adaptor::GetContext();
ToolkitTestApplication application;
char argv[] = "--test";
- WebView view = WebView::New(1, (char**)&argv);
+ WebView view = WebView::New(1, (char**)&argv, 0);
DALI_TEST_CHECK(view);
// Check GetScreenshot
WebView WebView::New(uint32_t argc, char** argv)
{
- return Internal::WebView::New(argc, argv);
+ return Internal::WebView::New(argc, argv, -1);
+}
+
+WebView WebView::New(uint32_t argc, char** argv, int32_t type)
+{
+ return Internal::WebView::New(argc, argv, type);
}
Toolkit::WebView WebView::FindWebView(Dali::WebEnginePlugin* plugin)
*/
static WebView New(uint32_t argc, char** argv);
+ /**
+ * @brief Create an initialized WebView with web engine type.
+ *
+ * @param [in] argc The count of arguments of Applications
+ * @param [in] argv The string array of arguments of Applications
+ * @param [in] type The web engine type (0: Chromium, 1: LWE, otherwise: depend on system environment)
+ */
+ static WebView New(uint32_t argc, char** argv, int32_t type);
+
/**
* @brief Find web view by web engine plugin.
*/
}
}
-WebView::WebView(uint32_t argc, char** argv)
+WebView::WebView(uint32_t argc, char** argv, int32_t type)
: Control(ControlBehaviour(ACTOR_BEHAVIOUR_DEFAULT | DISABLE_STYLE_CHANGE_SIGNALS)),
mVisual(),
mWebViewSize(Stage::GetCurrent().GetSize()),
mCornerRadius(Vector4::ZERO),
mCornerRadiusPolicy(1.0f)
{
- mWebEngine = Dali::WebEngine::New();
+ mWebEngine = Dali::WebEngine::New(type);
// WebEngine is empty when it is not properly initialized.
if(mWebEngine)
return handle;
}
-Toolkit::WebView WebView::New(uint32_t argc, char** argv)
+Toolkit::WebView WebView::New(uint32_t argc, char** argv, int32_t type)
{
- WebView* impl = new WebView(argc, argv);
+ WebView* impl = new WebView(argc, argv, type);
Toolkit::WebView handle = Toolkit::WebView(*impl);
if(impl->GetPlugin())
{
WebView(const std::string& locale, const std::string& timezoneId);
- WebView(uint32_t argc, char** argv);
+ WebView(uint32_t argc, char** argv, int32_t type);
virtual ~WebView();
static Toolkit::WebView New(const std::string& locale, const std::string& timezoneId);
/**
- * @copydoc Dali::Toolkit::WebView::New( uint32_t, char** )
+ * @copydoc Dali::Toolkit::WebView::New( uint32_t, char**, int32_t )
*/
- static Toolkit::WebView New(uint32_t argc, char** argv);
+ static Toolkit::WebView New(uint32_t argc, char** argv, int32_t type);
/**
* @copydoc Dali::Toolkit::WebView::FindWebView()