2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 #include "wrt-client.h"
19 #include <sys/resource.h>
20 #include <appcore-efl.h>
21 #include <appcore-common.h>
25 #include <dpl/log/log.h>
26 #include <dpl/optional_typedefs.h>
27 #include <dpl/exception.h>
28 #include <common/application_data.h>
29 #include <core_module.h>
30 #include <localization_setting.h>
31 #include <widget_deserialize_model.h>
33 #include <dpl/localization/w3c_file_localization.h>
34 #include <dpl/localization/LanguageTagsProvider.h>
35 #include "webkit/bundles/plugin_module_support.h"
36 #include <popup-runner/PopupInvoker.h>
38 #include "process_pool.h"
39 #include "menu_db_util.h"
40 #include "launchpad_util.h"
42 //W3C PACKAGING enviroment variable name
43 #define W3C_DEBUG_ENV_VARIABLE "DEBUG_LOAD_FINISH"
45 // window signal callback
46 const char *EDJE_SHOW_BACKWARD_SIGNAL = "show,backward,signal";
47 const std::string VIEWMODE_TYPE_FULLSCREEN = "fullscreen";
48 const std::string VIEWMODE_TYPE_MAXIMIZED = "maximized";
49 char const* const ELM_SWALLOW_CONTENT = "elm.swallow.content";
50 const char* const BUNDLE_PATH = "/usr/lib/wrt-wk2-bundles/libwrt-wk2-bundle.so";
51 const char* const caCertPath = "/opt/usr/share/certs/ca-certificate.crt";
54 const char* const DUMMY_PROCESS_PATH = "/usr/bin/wrt_launchpad_daemon_candidate";
55 static Ewk_Context* s_preparedEwkContext = NULL;
56 static WindowData* s_preparedWindowData = NULL;
57 static int app_argc = 0;
58 static char** app_argv = NULL;
60 WrtClient::WrtClient(int argc, char **argv) :
61 Application(argc, argv, "wrt-client", false),
62 DPL::TaskDecl<WrtClient>(this),
64 m_initializing(false),
69 m_returnStatus(ReturnStatus::Succeeded),
70 m_widgetState(WidgetState::WidgetState_Stopped)
73 LogDebug("App Created");
76 WrtClient::~WrtClient()
78 LogDebug("App Finished");
81 WrtClient::ReturnStatus::Type WrtClient::getReturnStatus() const
83 return m_returnStatus;
86 void WrtClient::OnStop()
88 LogInfo("Stopping Dummy Client");
91 void WrtClient::OnCreate()
94 ADD_PROFILING_POINT("OnCreate callback", "point");
98 void WrtClient::OnResume()
100 if (m_widgetState != WidgetState_Suspended) {
101 LogWarning("Widget is not suspended, resuming was skipped");
105 m_widgetState = WidgetState_Running;
108 void WrtClient::OnPause()
110 if (m_widgetState != WidgetState_Running) {
111 LogWarning("Widget is not running to be suspended");
115 m_widgetState = WidgetState_Suspended;
118 void WrtClient::OnReset(bundle *b)
121 // bundle argument is freed after OnReset() is returned
122 // So bundle duplication is needed
123 ApplicationDataSingleton::Instance().setBundle(bundle_dup(b));
125 if (true == m_initializing) {
126 LogDebug("can not handle reset event");
129 if (true == m_launched) {
130 if (m_widgetState == WidgetState_Stopped) {
131 LogError("Widget is not running to be reset");
135 m_windowData->emitSignalForUserLayout(EDJE_SHOW_BACKWARD_SIGNAL, "");
136 m_widgetState = WidgetState_Running;
138 if (true == checkArgument()) {
145 // low memory callback set
146 appcore_set_event_callback(
147 APPCORE_EVENT_LOW_MEMORY,
148 WrtClient::appcoreLowMemoryCallback,
152 void WrtClient::OnTerminate()
154 LogDebug("Wrt Shutdown now");
158 void WrtClient::showHelpAndQuit()
160 printf("Usage: wrt-client [OPTION]... [WIDGET: ID]...\n"
162 "Mandatory arguments to long options are mandatory for short "
164 " -h, --help show this help\n"
166 "launch widget with given tizen ID\n"
168 "launch widget with given tizen ID\n"
174 bool WrtClient::checkArgument()
176 std::string tizenId = getTizenIdFromArgument(m_argc, m_argv);
178 if (tizenId.empty()) {
183 LogDebug("Tizen id: " << m_tizenId);
188 std::string WrtClient::getTizenIdFromArgument(int argc, char **argv)
190 LogInfo("checkArgument");
191 std::string arg = argv[0];
197 if (arg.find("wrt-client") != std::string::npos) {
204 if (arg == "-h" || arg == "--help") {
206 } else if (arg == "-l" || arg == "--launch" ||
207 arg == "-t" || arg == "--tizen")
217 // Launch widget based on application basename
218 size_t pos = arg.find_last_of('/');
220 if (pos != std::string::npos) {
221 arg = arg.erase(0, pos + 1);
228 void WrtClient::setStep()
232 AddStep(&WrtClient::initStep);
234 setSdkLauncherDebugData();
236 AddStep(&WrtClient::launchStep);
237 AddStep(&WrtClient::shutdownStep);
239 m_initializing = true;
241 DPL::Event::ControllerEventHandler<NextStepEvent>::PostEvent(NextStepEvent());
244 void WrtClient::setSdkLauncherDebugData()
246 LogDebug("setSdkLauncherDebugData");
248 /* check bundle from sdk launcher */
249 bundle *bundleFromSdkLauncher;
250 bundleFromSdkLauncher = bundle_import_from_argv(m_argc, m_argv);
251 const char *bundle_debug = bundle_get_val(bundleFromSdkLauncher, "debug");
252 const char *bundle_pid = bundle_get_val(bundleFromSdkLauncher, "pid");
253 if (bundle_debug != NULL && bundle_pid != NULL) {
254 if (strcmp(bundle_debug, "true") == 0) {
256 m_sdkLauncherPid = atoi(bundle_pid);
261 bundle_free(bundleFromSdkLauncher);
264 bool WrtClient::checkDebugMode(SDKDebugData* debugData)
266 LogError("Checking for debug mode");
269 bool debugMode = debugData->debugMode;
271 LogInfo("[DEBUG_MODE] Widget is launched in " <<
272 (debugMode ? "DEBUG" : "RETAIL") <<
275 if (debugMode == true) {
276 // In WAC widget, only test widgets can use web inspector.
278 // every launched widgets as debug mode can use it.
279 if (m_dao->getWidgetType().appType == WrtDB::APP_TYPE_WAC20) {
281 WRT::CoreModuleSingleton::Instance().developerMode();
282 //This code will be activated
283 //after WAC test certificate is used by SDK
284 //bool isTestWidget = view->m_widgetModel->IsTestWidget.Get();
287 // LogInfo("This is not WAC Test Widget");
290 if (!developerMode) {
291 LogInfo("This is not WAC Developer Mode");
299 void WrtClient::OnEventReceived(const NextStepEvent& /*event*/)
301 LogDebug("Executing next step");
305 void WrtClient::initStep()
308 if (WRT::CoreModuleSingleton::Instance().Init()) {
309 m_initialized = true;
311 m_returnStatus = ReturnStatus::Failed;
312 SwitchToStep(&WrtClient::shutdownStep);
315 // ecore_event_jobs are processed sequentially without concession to
316 // other type events. To give a chance of execute to other events,
317 // ecore_timer_add was used.
318 DPL::Event::ControllerEventHandler<NextStepEvent>::PostTimedEvent(
319 NextStepEvent(), 0.001);
322 bool WrtClient::checkWACTestCertififedWidget()
324 // WAC Waikiki Beta Release Core Specification: Widget Runtime
327 // WR-4710 The WRT MUST enable debug functions only for WAC test widgets
328 // i.e. the functions must not be usable for normal WAC widgets, even when
329 // a WAC test widget is executing.
330 ADD_PROFILING_POINT("DeveloperModeCheck", "start");
333 // A widget signed with a WAC-issued test certificate as described in
336 bool developerWidget = m_dao->isTestWidget();
337 bool developerMode = WRT::CoreModuleSingleton::Instance().developerMode();
339 LogDebug("Is WAC test widget: " << developerWidget);
340 LogDebug("Is developer Mode: " << developerMode);
342 if (developerWidget) {
343 if (!developerMode) {
344 LogError("WAC test certified developer widget is needed for " <<
348 //TODO: WR-4660 (show popup about developer widget
350 LogInfo("POPUP: THIS IS TEST WIDGET!");
353 ADD_PROFILING_POINT("DeveloperModeCheck", "stop");
357 void WrtClient::loadFinishCallback(Evas_Object* webview)
359 ADD_PROFILING_POINT("loadFinishCallback", "start");
360 SDKDebugData* debug = new SDKDebugData;
361 debug->debugMode = m_debugMode;
362 debug->pid = new unsigned long(getpid());
364 LogInfo("Post result of launch");
366 // Start inspector server, if current mode is debugger mode.
367 // In the WK2 case, ewk_view_inspector_server_start should
368 // be called after WebProcess is created.
369 if (checkDebugMode(debug)) {
371 ewk_view_inspector_server_start(m_widget->GetCurrentWebview(), 0);
372 if (debug->portnum == 0) {
373 LogWarning("Failed to get portnum");
375 LogInfo("Assigned port number for inspector : "
379 LogDebug("Debug mode is disabled");
382 //w3c packaging test debug (message on 4>)
383 const char * makeScreen = getenv(W3C_DEBUG_ENV_VARIABLE);
384 if (makeScreen != NULL && strcmp(makeScreen, "1") == 0) {
385 FILE* doutput = fdopen(4, "w");
386 fprintf(doutput, "didFinishLoadForFrameCallback: ready\n");
391 LogDebug("Launch succesfull");
394 m_initializing = false;
396 ADD_PROFILING_POINT("loadFinishCallback", "stop");
397 printf("launched\n");
402 m_returnStatus = ReturnStatus::Failed;
404 DPL::Event::ControllerEventHandler<NextStepEvent>::
405 PostEvent(NextStepEvent());
408 if (debug->debugMode) {
409 LogDebug("Send RT signal to wrt-launcher(pid: " << m_sdkLauncherPid);
411 /* send real time signal with result to wrt-launcher */
413 LogDebug("userData->portnum : " << debug->portnum);
414 sv.sival_int = debug->portnum;
418 sigqueue(m_sdkLauncherPid, SIGRTMIN, sv);
421 ApplicationDataSingleton::Instance().freeBundle();
423 LogDebug("Cleaning wrtClient launch resources...");
428 void WrtClient::progressFinishCallback()
430 m_splashScreen->stopSplashScreen();
433 void WrtClient::webkitExitCallback()
435 LogDebug("window close called, terminating app");
436 SwitchToStep(&WrtClient::shutdownStep);
437 DPL::Event::ControllerEventHandler<NextStepEvent>::PostEvent(
441 void WrtClient::webCrashCallback()
443 LogError("webProcess crashed");
444 SwitchToStep(&WrtClient::shutdownStep);
445 DPL::Event::ControllerEventHandler<NextStepEvent>::PostEvent(
449 void WrtClient::launchStep()
451 ADD_PROFILING_POINT("launchStep", "start");
452 LogDebug("Launching widget ...");
454 ADD_PROFILING_POINT("getRunnableWidgetObject", "start");
455 m_widget = WRT::CoreModuleSingleton::Instance()
456 .getRunnableWidgetObject(m_tizenId);
457 ADD_PROFILING_POINT("getRunnableWidgetObject", "stop");
460 LogError("RunnableWidgetObject is NULL, stop launchStep");
461 DPL::Event::ControllerEventHandler<NextStepEvent>::PostEvent(
466 if (m_widgetState == WidgetState_Running) {
467 LogWarning("Widget already running, stop launchStep");
468 DPL::Event::ControllerEventHandler<NextStepEvent>::PostEvent(
473 if (m_widgetState == WidgetState_Authorizing) {
474 LogWarning("Widget already authorizing, stop launchStep");
475 DPL::Event::ControllerEventHandler<NextStepEvent>::PostEvent(
480 m_dao.reset(new WrtDB::WidgetDAOReadOnly(DPL::FromASCIIString(m_tizenId)));
481 DPL::Optional<DPL::String> defloc = m_dao->getDefaultlocale();
482 if (!defloc.IsNull()) {
483 LanguageTagsProviderSingleton::Instance().addWidgetDefaultLocales(
487 LocalizationSetting::SetLanguageChangedCallback(
488 languageChangedCallback, this);
490 ADD_PROFILING_POINT("CreateWindow", "start");
491 if (s_preparedWindowData == NULL)
493 m_windowData.reset(new WindowData(static_cast<unsigned long>(getpid()), true));
497 m_windowData.reset(s_preparedWindowData);
498 s_preparedWindowData = NULL;
500 ADD_PROFILING_POINT("CreateWindow", "stop");
502 WRT::UserDelegatesPtr cbs(new WRT::UserDelegates);
503 ADD_PROFILING_POINT("Create splash screen", "start");
504 m_splashScreen.reset(
505 new SplashScreenSupport(m_windowData->m_win));
506 if (m_splashScreen->createSplashScreen(m_dao->getSplashImgSrc())) {
507 m_splashScreen->startSplashScreen();
508 cbs->progressFinish = DPL::MakeDelegate(
511 progressFinishCallback);
513 ADD_PROFILING_POINT("Create splash screen", "stop");
514 DPL::OptionalString startUrl = W3CFileLocalization::getStartFile(m_dao);
515 if (!m_widget->PrepareView(DPL::ToUTF8String(*startUrl),
516 m_windowData->m_win, s_preparedEwkContext))
518 DPL::Event::ControllerEventHandler<NextStepEvent>::PostEvent(
522 //you can't show window with splash screen before PrepareView
523 //ewk_view_add_with_context() in viewLogic breaks window
525 m_windowData->init();
527 WrtDB::WidgetLocalizedInfo localizedInfo =
528 W3CFileLocalization::getLocalizedInfo(m_dao);
529 std::string name = "";
530 if (!(localizedInfo.name.IsNull())) {
531 name = DPL::ToUTF8String(*(localizedInfo.name));
533 elm_win_title_set(m_windowData->m_win, name.c_str());
534 evas_object_show(m_windowData->m_win);
535 initializeWindowModes();
536 connectElmCallback();
538 if (!checkWACTestCertififedWidget()) {
539 LogWarning("WAC Certificate failed, stop launchStep");
543 m_widgetState = WidgetState_Authorizing;
544 if (!m_widget->CheckBeforeLaunch()) {
545 LogError("CheckBeforeLaunch failed, stop launchStep");
546 DPL::Event::ControllerEventHandler<NextStepEvent>::PostEvent(
550 LogInfo("Widget launch accepted. Entering running state");
551 m_widgetState = WidgetState_Running;
553 cbs->loadFinish = DPL::MakeDelegate(this, &WrtClient::loadFinishCallback);
554 cbs->bufferSet = DPL::MakeDelegate(this, &WrtClient::setLayout);
555 cbs->bufferUnset = DPL::MakeDelegate(this, &WrtClient::unsetLayout);
556 cbs->webkitExit = DPL::MakeDelegate(this, &WrtClient::webkitExitCallback);
557 cbs->webCrash = DPL::MakeDelegate(this, &WrtClient::webCrashCallback);
558 cbs->toggleFullscreen = DPL::MakeDelegate(
559 m_windowData.get(), &WindowData::toggleFullscreen);
561 m_widget->SetUserDelegates(cbs);
564 m_windowData->emitSignalForUserLayout(EDJE_SHOW_BACKWARD_SIGNAL, "");
566 ADD_PROFILING_POINT("launchStep", "stop");
569 void WrtClient::initializeWindowModes()
571 Assert(m_windowData);
573 auto windowModes = m_dao->getWindowModes();
574 bool fullscreen = false;
575 bool backbutton = false;
576 if (m_dao->getWidgetType().appType == WrtDB::APP_TYPE_TIZENWEBAPP) {
577 WidgetSettings widgetSettings;
578 m_dao->getWidgetSettings(widgetSettings);
579 WidgetSettingList settings(widgetSettings);
581 (settings.getBackButtonPresence() == BackButton_Enable);
584 FOREACH(it, windowModes)
586 std::string viewMode = DPL::ToUTF8String(*it);
587 if (viewMode == VIEWMODE_TYPE_FULLSCREEN) {
590 } else if (viewMode == VIEWMODE_TYPE_MAXIMIZED) {
595 m_windowData->setViewMode(fullscreen,
599 void WrtClient::backButtonCallback(void* data,
600 Evas_Object * /*obj*/,
601 void * /*event_info*/)
603 LogInfo("BackButtonCallback");
606 WrtClient* This = static_cast<WrtClient*>(data);
608 This->m_widget->Backward();
611 int WrtClient::appcoreLowMemoryCallback(void* /*data*/)
613 LogInfo("appcoreLowMemoryCallback");
614 //WrtClient* This = static_cast<WrtClient*>(data);
616 // TODO call RunnableWidgetObject API regarding low memory
617 // The API should be implemented
622 void WrtClient::connectElmCallback()
624 Assert(m_windowData);
626 if (m_dao->getWidgetType().appType == WrtDB::APP_TYPE_TIZENWEBAPP) {
627 WidgetSettings widgetSettings;
628 m_dao->getWidgetSettings(widgetSettings);
629 WidgetSettingList settings(widgetSettings);
630 if (settings.getBackButtonPresence() == BackButton_Enable) {
631 m_windowData->addFloatBackButtonCallback(
633 &WrtClient::backButtonCallback,
637 WidgetSettingScreenLock rotationValue = settings.getRotationValue();
638 if (rotationValue == Screen_Portrait) {
639 elm_win_rotation_with_resize_set(m_windowData->m_win, 0);
640 ewk_view_orientation_send(m_widget->GetCurrentWebview(), 0);
641 } else if (rotationValue == Screen_Landscape) {
642 elm_win_rotation_with_resize_set(m_windowData->m_win, 270);
643 ewk_view_orientation_send(m_widget->GetCurrentWebview(), 90);
645 elm_win_rotation_with_resize_set(m_windowData->m_win, 0);
646 ewk_view_orientation_send(m_widget->GetCurrentWebview(), 0);
651 void WrtClient::setLayout(Evas_Object* newBuffer)
653 LogDebug("add new webkit buffer to window");
656 elm_object_part_content_set(m_windowData->m_user_layout,
660 evas_object_show(newBuffer);
663 void WrtClient::unsetLayout(Evas_Object* currentBuffer)
665 LogDebug("remove current webkit buffer from window");
666 Assert(currentBuffer);
667 evas_object_hide(currentBuffer);
669 elm_object_part_content_unset(m_windowData->m_user_layout,
670 ELM_SWALLOW_CONTENT);
673 void WrtClient::shutdownStep()
675 LogDebug("Closing Wrt connection ...");
677 if (m_widget && m_widgetState) {
678 m_widgetState = WidgetState_Stopped;
681 ewk_context_delete(s_preparedEwkContext);
682 WRT::CoreModuleSingleton::Instance().Terminate();
685 m_initialized = false;
687 m_windowData.reset();
691 int WrtClient::languageChangedCallback(void *data)
693 LogDebug("Language Changed");
697 WrtClient* wrtClient = static_cast<WrtClient*>(data);
698 if (!(wrtClient->m_dao)) {
702 // reset function fetches system locales and recreates language tags
703 LanguageTagsProviderSingleton::Instance().resetLanguageTags();
704 // widget default locales are added to language tags below
705 DPL::OptionalString defloc = wrtClient->m_dao->getDefaultlocale();
706 if (!defloc.IsNull()) {
707 LanguageTagsProviderSingleton::Instance().addWidgetDefaultLocales(
711 if (wrtClient->m_launched &&
712 wrtClient->m_widgetState != WidgetState_Stopped)
714 wrtClient->m_widget->ReloadStartPage();
719 void WrtClient::Quit()
722 DPL::Application::Quit();
725 static Eina_Bool proces_pool_fd_handler(void* /*data*/, Ecore_Fd_Handler *handler)
727 int fd = ecore_main_fd_handler_fd_get(handler);
729 if (ecore_main_fd_handler_active_get(handler, ECORE_FD_ERROR))
731 LogDebug("ECORE_FD_ERROR");
734 return ECORE_CALLBACK_CANCEL;
737 if (ecore_main_fd_handler_active_get(handler, ECORE_FD_READ))
739 LogDebug("ECORE_FD_READ");
741 app_pkt_t* pkt = (app_pkt_t*) malloc(sizeof(char) * AUL_SOCK_MAXBUFF);
742 memset(pkt, 0, AUL_SOCK_MAXBUFF);
744 int recv_ret = recv(fd, pkt, AUL_SOCK_MAXBUFF, 0);
750 LogDebug("recv error!");
753 LogDebug("recv_ret : " << recv_ret << ", pkt->len : " << pkt->len);
755 ecore_main_fd_handler_del(handler);
757 __wrt_launchpad_main_loop(pkt, app_argv[0], &app_argc, &app_argv);
762 ecore_main_loop_quit();
763 return ECORE_CALLBACK_CANCEL;
766 return ECORE_CALLBACK_CANCEL;
772 // set evas backend type
773 if (!getenv("ELM_ENGINE"))
775 if (!setenv("ELM_ENGINE", "gl", 1))
777 LogDebug("Enable backend");
782 LogDebug("ELM_ENGINE : " << getenv("ELM_ENGINE"));
786 setenv("COREGL_FASTPATH", "1", 1);
788 setenv("CAIRO_GL_COMPOSITOR", "msaa", 1);
789 setenv("CAIRO_GL_LAZY_FLUSHING", "yes", 1);
790 setenv("ELM_IMAGE_CACHE", "0", 1);
797 // process pool - store arg's value
801 UNHANDLED_EXCEPTION_HANDLER_BEGIN
803 ADD_PROFILING_POINT("main-entered", "point");
806 DPL::Log::LogSystemSingleton::Instance().SetTag("WRT");
808 // Set environment variables
811 if (argc > 1 && argv[1] != NULL && !strcmp(argv[1], "-d"))
813 LogInfo("Entered dummy process mode");
814 sprintf(argv[0], "%s ",
817 LogInfo("Prepare ewk_context");
818 appcore_set_i18n("wrt-client", NULL);
820 ewk_set_arguments(argc, argv);
821 setenv("WRT_LAUNCHING_PERFORMANCE", "1", 1);
822 s_preparedEwkContext = ewk_context_new_with_injected_bundle_path(BUNDLE_PATH);
824 if (s_preparedEwkContext == NULL)
826 LogInfo("Creating webkit context was failed!");
830 LogInfo("ewk_context_certificate_file_set()");
831 ewk_context_certificate_file_set(s_preparedEwkContext, caCertPath);
833 int client_fd = __connect_process_pool_server();
837 LogInfo("Connecting process_pool_server was failed!");
841 LogInfo("Prepare window_data");
842 LogInfo("elm_init()");
843 elm_init(argc, argv);
844 LogInfo("WindowData()");
845 s_preparedWindowData = new WindowData(static_cast<unsigned long>(getpid()));
847 ecore_main_fd_handler_add(client_fd, ECORE_FD_READ, proces_pool_fd_handler, NULL, NULL, NULL);
848 ecore_main_fd_handler_add(client_fd, ECORE_FD_ERROR, proces_pool_fd_handler, NULL, NULL, NULL);
850 setpriority(PRIO_PROCESS, 0, 0);
852 LogDebug("ecore_main_loop_begin()");
853 ecore_main_loop_begin();
854 LogDebug("ecore_main_loop_begin()_end");
856 std::string tizenId = WrtClient::getTizenIdFromArgument(argc, argv);
857 PluginModuleSupport::init(s_preparedEwkContext, tizenId);
862 // This code is to fork a web process without exec.
863 std::string tizenId = WrtClient::getTizenIdFromArgument(argc, argv);
865 if (!tizenId.empty())
867 LogDebug("Launching by fork mode");
868 // Language env setup
869 appcore_set_i18n("wrt-client", NULL);
871 ewk_set_arguments(argc, argv);
872 setenv("WRT_LAUNCHING_PERFORMANCE", "1", 1);
873 s_preparedEwkContext = ewk_context_new_with_injected_bundle_path(
876 if (s_preparedEwkContext == NULL)
878 LogInfo("Creating webkit context was failed!");
879 Wrt::Popup::PopupInvoker().showInfo("Error", "Creating webkit context was failed.", "OK");
884 PluginModuleSupport::init(s_preparedEwkContext, tizenId);
886 LogInfo("ewk_context_certificate_file_set()");
887 ewk_context_certificate_file_set(s_preparedEwkContext, caCertPath);
891 // Output on stdout will be flushed after every newline character,
892 // even if it is redirected to a pipe. This is useful for running
893 // from a script and parsing output.
894 // (Standard behavior of stdlib is to use full buffering when
895 // redirected to a pipe, which means even after an end of line
896 // the output may not be flushed).
899 WrtClient app(app_argc, app_argv);
901 ADD_PROFILING_POINT("Before appExec", "point");
902 int ret = app.Exec();
903 LogDebug("App returned: " << ret);
904 ret = app.getReturnStatus();
905 LogDebug("WrtClient returned: " << ret);
908 UNHANDLED_EXCEPTION_HANDLER_END