+wrt (0.8.90) unstable; urgency=low
+
+ * [Engine] Clean unused code
+ * [Engine] Remove elm_exit() from ViewLogic
+ * [Engine] Fixed JIRA(N_SE-8886)
+
+ * Git : slp/pkgs/w/wrt
+ * Tag : wrt_0.8.90
+
+ -- Jihoon Chung <jihoon.chung@samsung.com> Tue, 04 Sep 2012 23:29:29 +0900
+
wrt (0.8.89) unstable; urgency=low
* [Engine] Arch directory removed
-#sbs-git:slp/pkgs/w/wrt wrt 0.8.89
+#sbs-git:slp/pkgs/w/wrt wrt 0.8.90
Name: wrt
Summary: web runtime
-Version: 0.8.89
+Version: 0.8.90
Release: 1
Group: Development/Libraries
License: Apache License, Version 2.0
SET(WRT_CORE_BASE_SOURCES
${WRT_SRC_DIR}/domain/global_context.cpp
+ ${WRT_SRC_DIR}/domain/widget_data_types.cpp
${WRT_SRC_DIR}/domain/widget_deserialize_model.cpp
${WRT_SRC_DIR}/domain/widget_localize_model.cpp
${WRT_SRC_DIR}/domain/localization_setting.cpp
~CoreModuleImpl()
{
- LogError("Core module implementation destroyed");
+ LogDebug("Core module implementation destroyed");
}
bool Init()
typedef struct UserCallbacks {
void (*progressFinish)(void *data);
void (*loadFinish)(bool success, void *data);
+ void (*webCrash)(void *data);
+ void (*windowClose)(void *data);
void (*resume)(bool success, void *data);
void (*suspend)(bool success, void *data);
void (*reset)(bool success, void *data);
UserCallbacks():
progressFinish(NULL),
loadFinish(NULL),
+ windowClose(NULL),
resume(NULL),
suspend(NULL),
reset(NULL),
#include <profiling_util.h>
#include <signal.h>
#include "webkit/bundles/plugin_module_support.h"
+#include <dpl/wrt-dao-ro/widget_dao_read_only.h>
namespace { //Anonymous
m_view->hideWidget();
}
-//TODO remove
-void dummyOperationStatusCallback (WidgetHandle widgetHandle,
- CommonError::Type result, UserParam userParam) {
-
-}
-
void RunnableWidgetObject::Suspend() {
LogDebug("Suspending widget");
Assert(m_widgetModel);
LogWarning("Background enabled, skipping suspend");
return;
}
- OperationStatusStruct operationStruct;
- operationStruct.operationStatusCallback = &dummyOperationStatusCallback;
- m_view->suspendWidget(operationStruct);
+ m_view->suspendWidget();
}
void RunnableWidgetObject::Resume()
{
LogDebug("Resuming widget");
Assert(m_widgetModel);
-
- OperationStatusStruct operationStruct;
- operationStruct.operationStatusCallback = &dummyOperationStatusCallback;
-
- m_view->resumeWidget(operationStruct);
+ m_view->resumeWidget();
}
void RunnableWidgetObject::Reset()
#include <i_view_module.h>
#include <string>
#include <common_error.h>
-#include <widget_launch_struct.h>
#include <ewk_context.h>
namespace WRT {
+++ /dev/null
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/*
- * @file ace_settings_address.h
- * @author Przemyslaw Dobrowolski (p.dobrowolsk@samsung.com)
- * @version 1.0
- * @brief This is a header for default ACE settings address
- */
-#ifndef WRT_SRC_COMMON_ACE_SETTINGS_ADDRESS_H_
-#define WRT_SRC_COMMON_ACE_SETTINGS_ADDRESS_H_
-
-namespace AceSettings {
-char const * const DefaultAddress = "/tmp/wrt_ace_settings";
-} // namespace AceSettings
-
-#endif // WRT_SRC_COMMON_ACE_SETTINGS_ADDRESS_H_
+++ /dev/null
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/*
- * @file PolicyEffect.h
- * @author B.Grzelewski (b.grzelewski@samsung.com)
- * @version 1.0
- * @brief This file contains the declaration of PolicyEffect type.
- */
-#ifndef _SRC_DOMAIN_POLICY_EFFECT_H_
-#define _SRC_DOMAIN_POLICY_EFFECT_H_
-
-enum class PolicyEffect {
- DENY = 0,
- PERMIT,
- PROMPT_ONESHOT,
- PROMPT_SESSION,
- PROMPT_BLANKET
-};
-
-inline static std::ostream & operator<<(std::ostream& stream,
- PolicyEffect effect)
-{
- switch (effect) {
- case PolicyEffect::DENY: stream << "DENY"; break;
- case PolicyEffect::PERMIT: stream << "PERMIT"; break;
- case PolicyEffect::PROMPT_ONESHOT: stream << "PROMPT_ONESHOT"; break;
- case PolicyEffect::PROMPT_SESSION: stream << "PROMPT_SESSION"; break;
- case PolicyEffect::PROMPT_BLANKET: stream << "PROMPT_BLANKET"; break;
- default: Assert(false && "Invalid PolicyEffect constant");
- }
- return stream;
-}
-
-#endif // _SRC_DOMAIN_POLICY_EFFECT_H_
--- /dev/null
+/*
+ * Copyright (c) 2012 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * This file have been implemented in compliance with W3C WARP SPEC.
+ * but there are some patent issue between W3C WARP SPEC and APPLE.
+ * so if you want to use this file, refer to the README file in root directory
+ */
+/**
+ * @file widget_data_types.cpp
+ * @author Krzysztof Jackiewicz (k.jackiewicz@samsung.com)
+ * @author Tomasz Iwanek (t.iwanek@samsung.com) (implementation moved to cpp)
+ * @version 0.1
+ * @brief
+ */
+
+#include <widget_data_types.h>
+
+#include <dpl/foreach.h>
+
+WidgetAccessList::WidgetAccessList() : m_isAccessAll(false)
+{
+}
+
+WidgetAccessList::WidgetAccessList(const WrtDB::WidgetAccessInfoList &widgetAccessInfoList) :
+ m_isAccessAll(false)
+{
+ FOREACH(it, widgetAccessInfoList)
+ {
+ if (DPL::FromUTF32String(L"*") == it->strIRI) {
+ m_isAccessAll = true;
+ m_warpIriList.clear();
+ return;
+ }
+
+ WarpIRI warpIri;
+
+ warpIri.set(DPL::ToUTF8String(it->strIRI).c_str(),
+ it->bSubDomains);
+
+ if (warpIri.isAccessDefinition()) {
+ m_warpIriList.push_back(warpIri);
+ }
+ }
+}
+
+bool WidgetAccessList::getIsAccessAll() const
+{
+ return m_isAccessAll;
+}
+
+const WarpIRIList* WidgetAccessList::getWarpIRIList() const
+{
+ return &m_warpIriList;
+}
+
+bool WidgetAccessList::isRequiredIRI(const DPL::String &iri) const
+{
+ if (m_isAccessAll) {
+ return true;
+ }
+
+ WarpIRI requestIri;
+ requestIri.set(iri.c_str(), false);
+
+ FOREACH(it, m_warpIriList)
+ {
+ if (it->isSubDomain(requestIri)) {
+ return true;
+ }
+ }
+
+ return false;
+}
+
+bool WidgetAccessList::operator ==(const WidgetAccessList& other) const
+{
+ return m_warpIriList == other.m_warpIriList &&
+ m_isAccessAll == other.m_isAccessAll;
+}
+
+WidgetSettingList::WidgetSettingList() :
+ m_RotationLock(Screen_Portrait),
+ m_IndicatorPresence(Indicator_Enable),
+ m_BackButtonPresence(BackButton_Disable),
+ m_ContextMenu(ContextMenu_Enable),
+ m_Encryption(Encryption_Disable)
+{
+}
+
+WidgetSettingList::WidgetSettingList(WidgetSettings &widgetSettings)
+{
+ m_RotationLock = Screen_Portrait;
+ m_IndicatorPresence = Indicator_Enable;
+ m_BackButtonPresence = BackButton_Disable;
+ m_ContextMenu = ContextMenu_Enable;
+ m_Encryption = Encryption_Disable;
+
+ FOREACH(it, widgetSettings)
+ {
+ DPL::String name = it->settingName;
+ DPL::String value = it->settingValue;
+
+ if (name == SETTING_NAME_SCREEN_ORIENTATION) {
+ if (value == SETTING_VALUE_SCREEN_ORIENTATION_PORTRAIT) {
+ m_RotationLock = Screen_Portrait;
+ } else if (value ==
+ SETTING_VALUE_SCREEN_ORIENTATION_LANDSCAPE)
+ {
+ m_RotationLock = Screen_Landscape;
+ } else {
+ LogError("Invalid screen orientation value!! [" <<
+ value << "]");
+ m_RotationLock = Screen_Portrait;
+ }
+ } else if (name == SETTING_NAME_INDICATOR_PRESENCE) {
+ if (value == SETTING_VALUE_INDICATOR_PRESENCE_ENALBE) {
+ m_IndicatorPresence = Indicator_Enable;
+ } else if (value == SETTING_VALUE_INDICATOR_PRESENCE_DISABLE) {
+ m_IndicatorPresence = Indicator_Disable;
+ } else {
+ LogError("Invalid indicator presence value!! [" <<
+ value << "]");
+ m_IndicatorPresence = Indicator_Enable;
+ }
+ } else if (name == SETTING_NAME_BACKBUTTON_PRESENCE) {
+ if (value == SETTING_VALUE_BACKBUTTON_PRESENCE_ENALBE) {
+ m_BackButtonPresence = BackButton_Enable;
+ } else if (value ==
+ SETTING_VALUE_BACKBUTTON_PRESENCE_DISABLE) {
+ m_BackButtonPresence = BackButton_Disable;
+ } else {
+ LogError("Invalid backbutton presence value!! [" <<
+ value << "]");
+ m_BackButtonPresence = BackButton_Disable;
+ }
+ } else if (name == SETTING_NAME_CONTEXTMENU) {
+ if (value == SETTING_VALUE_CONTEXTMENU_ENALBE) {
+ m_ContextMenu = ContextMenu_Enable;
+ } else if (value ==
+ SETTING_VALUE_CONTEXTMENU_DISABLE) {
+ m_ContextMenu = ContextMenu_Disable;
+ } else {
+ LogError("Invalid contextmenu value!! [" <<
+ value << "]");
+ m_ContextMenu = ContextMenu_Enable;
+ }
+ } else if (name == SETTING_NAME_ENCRYPTION) {
+ if (value == SETTING_VALUE_ENCRYPTION_ENABLE) {
+ m_Encryption = Encryption_Enable;
+ } else if (value ==
+ SETTING_VALUE_ENCRYPTION_DISABLE) {
+ m_Encryption = Encryption_Disable;
+ } else {
+ LogError("Invalid encryption value!! [" <<
+ value << "]");
+ m_Encryption = Encryption_Disable;
+ }
+ } else {
+ LogError("Invalid setting name!! [" << name << "]");
+ }
+ }
+ LogDebug("m_RotationLock: " << m_RotationLock);
+ LogDebug("m_IndicatorPresence: " << m_IndicatorPresence);
+ LogDebug("m_BackButtonPresence: " << m_BackButtonPresence);
+ LogDebug("m_ContextMenu: " << m_ContextMenu);
+ LogDebug("m_Encryption: " << m_Encryption);
+}
+
+WidgetSettingScreenLock WidgetSettingList::getRotationValue() const
+{
+ return m_RotationLock;
+}
+
+WidgetSettingIndicatorPresence WidgetSettingList::getIndicatorPresence() const
+{
+ return m_IndicatorPresence;
+}
+
+WidgetSettingBackButtonPresence WidgetSettingList::getBackButtonPresence() const
+{
+ return m_BackButtonPresence;
+}
+
+WidgetSettingContextMenu WidgetSettingList::getContextMenu() const
+{
+ return m_ContextMenu;
+}
+
+WidgetSettingEncryption WidgetSettingList::getEncryption() const
+{
+ return m_Encryption;
+}
+
+bool WidgetSettingList::isEncrypted() const
+{
+ if (m_Encryption == Encryption_Enable) {
+ return true;
+ }
+ return false;
+}
+
+bool WidgetSettingList::operator ==(const WidgetSettingList& other) const
+{
+ return m_RotationLock == other.m_RotationLock &&
+ m_IndicatorPresence == other.m_IndicatorPresence &&
+ m_BackButtonPresence == other.m_BackButtonPresence &&
+ m_ContextMenu == other.m_ContextMenu &&
+ m_Encryption == other.m_Encryption;
+}
#ifndef WRT_SRC_DOMAIN_WIDGET_DATA_TYPES_H_
#define WRT_SRC_DOMAIN_WIDGET_DATA_TYPES_H_
-#include <string>
#include <list>
-#include <set>
-#include <map>
-#include <dpl/foreach.h>
+
#include <dpl/utils/warp_iri.h>
#include <dpl/utils/widget_version.h>
#include <dpl/optional_typedefs.h>
class WidgetModel;
-// TODO move implementation to cpp
class WidgetAccessList
{
public:
- WidgetAccessList() : m_isAccessAll(false)
- {
- }
+ WidgetAccessList();
- WidgetAccessList(const WrtDB::WidgetAccessInfoList &widgetAccessInfoList) :
- m_isAccessAll(false)
- {
- FOREACH(it, widgetAccessInfoList)
- {
- if (DPL::FromUTF32String(L"*") == it->strIRI) {
- m_isAccessAll = true;
- m_warpIriList.clear();
- return;
- }
-
- WarpIRI warpIri;
-
- warpIri.set(DPL::ToUTF8String(it->strIRI).c_str(),
- it->bSubDomains);
-
- if (warpIri.isAccessDefinition()) {
- m_warpIriList.push_back(warpIri);
- }
- }
- }
+ WidgetAccessList(const WrtDB::WidgetAccessInfoList &widgetAccessInfoList);
- bool getIsAccessAll() const
- {
- return m_isAccessAll;
- }
+ bool getIsAccessAll() const;
- const WarpIRIList* getWarpIRIList() const
- {
- return &m_warpIriList;
- }
+ const WarpIRIList* getWarpIRIList() const;
- bool isRequiredIRI(const DPL::String &iri) const
- {
- if (m_isAccessAll) {
- return true;
- }
-
- WarpIRI requestIri;
- requestIri.set(iri.c_str(), false);
-
- FOREACH(it, m_warpIriList)
- {
- if (it->isSubDomain(requestIri)) {
- return true;
- }
- }
-
- return false;
- }
+ bool isRequiredIRI(const DPL::String &iri) const;
- bool operator ==(const WidgetAccessList& other) const
- {
- return m_warpIriList == other.m_warpIriList &&
- m_isAccessAll == other.m_isAccessAll;
- }
+ bool operator ==(const WidgetAccessList& other) const;
private:
WarpIRIList m_warpIriList;
class WidgetSettingList
{
public:
- WidgetSettingList() :
- m_RotationLock(Screen_Portrait),
- m_IndicatorPresence(Indicator_Enable),
- m_BackButtonPresence(BackButton_Disable),
- m_ContextMenu(ContextMenu_Enable),
- m_Encryption(Encryption_Disable)
- {
- }
+ WidgetSettingList();
- WidgetSettingList(WidgetSettings &widgetSettings)
- {
- m_RotationLock = Screen_Portrait;
- m_IndicatorPresence = Indicator_Enable;
- m_BackButtonPresence = BackButton_Disable;
- m_ContextMenu = ContextMenu_Enable;
- m_Encryption = Encryption_Disable;
-
- FOREACH(it, widgetSettings)
- {
- DPL::String name = it->settingName;
- DPL::String value = it->settingValue;
-
- if (name == SETTING_NAME_SCREEN_ORIENTATION) {
- if (value == SETTING_VALUE_SCREEN_ORIENTATION_PORTRAIT) {
- m_RotationLock = Screen_Portrait;
- } else if (value ==
- SETTING_VALUE_SCREEN_ORIENTATION_LANDSCAPE)
- {
- m_RotationLock = Screen_Landscape;
- } else {
- LogError("Invalid screen orientation value!! [" <<
- value << "]");
- m_RotationLock = Screen_Portrait;
- }
- } else if (name == SETTING_NAME_INDICATOR_PRESENCE) {
- if (value == SETTING_VALUE_INDICATOR_PRESENCE_ENALBE) {
- m_IndicatorPresence = Indicator_Enable;
- } else if (value == SETTING_VALUE_INDICATOR_PRESENCE_DISABLE) {
- m_IndicatorPresence = Indicator_Disable;
- } else {
- LogError("Invalid indicator presence value!! [" <<
- value << "]");
- m_IndicatorPresence = Indicator_Enable;
- }
- } else if (name == SETTING_NAME_BACKBUTTON_PRESENCE) {
- if (value == SETTING_VALUE_BACKBUTTON_PRESENCE_ENALBE) {
- m_BackButtonPresence = BackButton_Enable;
- } else if (value ==
- SETTING_VALUE_BACKBUTTON_PRESENCE_DISABLE) {
- m_BackButtonPresence = BackButton_Disable;
- } else {
- LogError("Invalid backbutton presence value!! [" <<
- value << "]");
- m_BackButtonPresence = BackButton_Disable;
- }
- } else if (name == SETTING_NAME_CONTEXTMENU) {
- if (value == SETTING_VALUE_CONTEXTMENU_ENALBE) {
- m_ContextMenu = ContextMenu_Enable;
- } else if (value ==
- SETTING_VALUE_CONTEXTMENU_DISABLE) {
- m_ContextMenu = ContextMenu_Disable;
- } else {
- LogError("Invalid contextmenu value!! [" <<
- value << "]");
- m_ContextMenu = ContextMenu_Enable;
- }
- } else if (name == SETTING_NAME_ENCRYPTION) {
- if (value == SETTING_VALUE_ENCRYPTION_ENABLE) {
- m_Encryption = Encryption_Enable;
- } else if (value ==
- SETTING_VALUE_ENCRYPTION_DISABLE) {
- m_Encryption = Encryption_Disable;
- } else {
- LogError("Invalid encryption value!! [" <<
- value << "]");
- m_Encryption = Encryption_Disable;
- }
- } else {
- LogError("Invalid setting name!! [" << name << "]");
- }
- }
- LogDebug("m_RotationLock: " << m_RotationLock);
- LogDebug("m_IndicatorPresence: " << m_IndicatorPresence);
- LogDebug("m_BackButtonPresence: " << m_BackButtonPresence);
- LogDebug("m_ContextMenu: " << m_ContextMenu);
- LogDebug("m_Encryption: " << m_Encryption);
- }
+ WidgetSettingList(WidgetSettings &widgetSettings);
- WidgetSettingScreenLock getRotationValue() const
- {
- return m_RotationLock;
- }
+ WidgetSettingScreenLock getRotationValue() const;
- WidgetSettingIndicatorPresence getIndicatorPresence() const
- {
- return m_IndicatorPresence;
- }
+ WidgetSettingIndicatorPresence getIndicatorPresence() const;
- WidgetSettingBackButtonPresence getBackButtonPresence() const
- {
- return m_BackButtonPresence;
- }
+ WidgetSettingBackButtonPresence getBackButtonPresence() const;
- WidgetSettingContextMenu getContextMenu() const
- {
- return m_ContextMenu;
- }
+ WidgetSettingContextMenu getContextMenu() const;
- WidgetSettingEncryption getEncryption() const
- {
- return m_Encryption;
- }
+ WidgetSettingEncryption getEncryption() const;
- bool isEncrypted() const
- {
- if (m_Encryption == Encryption_Enable) {
- return true;
- }
- return false;
- }
+ bool isEncrypted() const;
- bool operator ==(const WidgetSettingList& other) const
- {
- return m_RotationLock == other.m_RotationLock &&
- m_IndicatorPresence == other.m_IndicatorPresence &&
- m_BackButtonPresence == other.m_BackButtonPresence &&
- m_ContextMenu == other.m_ContextMenu &&
- m_Encryption == other.m_Encryption;
- }
+ bool operator ==(const WidgetSettingList& other) const;
private:
WidgetSettingScreenLock m_RotationLock;
WidgetSettingIndicatorPresence m_IndicatorPresence;
+++ /dev/null
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#pragma GCC system_header
-
-#include <Edje.h>
-#include <Ecore.h>
-#include <Elementary.h>
-#include <Ecore_X.h>
-#include <Ecore_Evas.h>
-#include <Ecore_X_Atoms.h>
-#include <Evas.h>
+++ /dev/null
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#pragma GCC system_header
-
-#include <EWebKit.h>
-#include <ewk_view.h>
-#include <JavaScriptCore/JavaScript.h>
-#include <JavaScriptCore/JSObjectRef.h>
#include <i_runnable_widget_object.h>
class WidgetModel; //FORWARD DECLARATION
-struct OperationStatusStruct; //FORWARD DECLARATION
namespace ViewModule {
/** \brief Interface to ViewModule. Object of IViewModule type is returned from
virtual void prepareView(WidgetModel *, const std::string &) = 0;
virtual void showWidget() = 0;
virtual void hideWidget() = 0;
- virtual void suspendWidget(const OperationStatusStruct&)= 0;
- virtual void resumeWidget(const OperationStatusStruct&) = 0;
+ virtual void suspendWidget()= 0;
+ virtual void resumeWidget() = 0;
virtual void resetWidget() = 0;
virtual void goBack() = 0;
virtual Evas_Object* getCurrentWebview() = 0;
m_ewkViewList.clear();
}
-void ViewLogic::suspendWidget(
- const OperationStatusStruct& op)
+void ViewLogic::suspendWidget()
{
LogInfo("Pausing widget");
Assert(m_model);
}
};
-void ViewLogic::resumeWidget(const OperationStatusStruct& op)
+void ViewLogic::resumeWidget()
{
LogInfo("Resume widget");
Assert(m_model);
}
void ViewLogic::processDidCrashCallback(WKPageRef /*page*/,
- const void* /*clientInfo*/)
+ const void* clientInfo)
{
LogInfo("processDidCrashCallback");
- // terminate UI process because Web process is not available.
- elm_exit();
+ ViewLogic const * const view =
+ static_cast<ViewLogic const * const>(clientInfo);
+ if (view->m_cbs->webCrash) {
+ view->m_cbs->webCrash(view->m_cbsData);
+ }
}
int ViewLogic::appcoreLowMemoryCallback(void *data)
LogDebug("windowClose");
if (1 >= m_ewkViewList.size()) {
- // terminate webapp
- elm_exit();
- return;
+ if (m_cbs->windowClose) {
+ m_cbs->windowClose(m_cbsData);
+ }
} else {
// hide current ewkView
void prepareView(WidgetModel* m, const std::string &startUrl);
void showWidget();
void hideWidget();
- void suspendWidget(const OperationStatusStruct &);
- void resumeWidget(const OperationStatusStruct &);
+ void suspendWidget();
+ void resumeWidget();
void resetWidget();
void goBack();
Evas_Object* getCurrentWebview();
#ifndef WINDOW_INITIALIZE_H_
#define WINDOW_INITIALIZE_H_
-#include <framework_efl.h>
+#include <dpl/framework_efl.h>
#include <vector>
#include <string>
wrtClient->m_splashScreen->stopSplashScreen();
}
+void WrtClient::windowCloseCallback(void* data)
+{
+ LogDebug("window close called, terminating app");
+ WrtClient* wrtClient = static_cast<WrtClient*>(data);
+ wrtClient->SwitchToStep(&WrtClient::shutdownStep);
+ wrtClient->DPL::Event::ControllerEventHandler<NextStepEvent>::PostEvent(
+ NextStepEvent());
+}
+
+void WrtClient::webCrashCallback(void* data)
+{
+ LogDebug("webProcess crashed");
+ WrtClient* wrtClient = static_cast<WrtClient*>(data);
+ wrtClient->SwitchToStep(&WrtClient::shutdownStep);
+ wrtClient->DPL::Event::ControllerEventHandler<NextStepEvent>::PostEvent(
+ NextStepEvent());
+}
+
void WrtClient::launchStep()
{
LogDebug("Launching widget ...");
cbs->loadFinish = loadFinishCallback;
cbs->bufferSet = setLayout;
cbs->bufferUnset = unsetLayout;
+ cbs->windowClose = windowCloseCallback;
+ cbs->webCrash = webCrashCallback;
m_widget->SetUserCallbacks(cbs, this);
m_widget->Show();
LogDebug("Enable backend");
}
}
-
+
// Set log tagging
DPL::Log::LogSystemSingleton::Instance().SetTag("WRT-CLIENT");
static int languageChangedCallback(void *data);
static void loadFinishCallback(bool success, void* data);
static void progressFinishCallback(void* data);
+ static void windowCloseCallback(void* data);
+ static void webCrashCallback(void* data);
static void setLayout(Evas_Object* newBuffer, void* data);
static void unsetLayout(Evas_Object* currentBuffer, void* data);
// Private data
return 0;
}
} else {
- printf("result: %s\n", "failed");
- return -1;
+ printf("result: %s\n", "App isn't running");
+ return 0;
}
}