Update wrt_0.8.90
authorjihoon.chung <jihoon.chung@samsung.com>
Tue, 4 Sep 2012 14:37:35 +0000 (23:37 +0900)
committerjihoon.chung <jihoon.chung@samsung.com>
Tue, 4 Sep 2012 14:37:35 +0000 (23:37 +0900)
20 files changed:
debian/changelog
packaging/wrt.spec
src/CMakeLists.txt
src/api_new/core_module.cpp
src/api_new/i_runnable_widget_object.h
src/api_new/runnable_widget_object.cpp
src/api_new/runnable_widget_object.h
src/common/ace_settings_address.h [deleted file]
src/domain/PolicyEffect.h [deleted file]
src/domain/widget_data_types.cpp [new file with mode: 0644]
src/domain/widget_data_types.h
src/framework/framework_efl.h [deleted file]
src/framework/framework_ewebkit.h [deleted file]
src/view/i_view_module.h
src/view/webkit/view_logic.cpp
src/view/webkit/view_logic.h
src/wrt-client/window_data.h
src/wrt-client/wrt-client.cpp
src/wrt-client/wrt-client.h
src/wrt-launcher/wrt-launcher.cpp

index 2c7f915..07dbae3 100644 (file)
@@ -1,3 +1,14 @@
+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
index ff7ceed..f5ea5c0 100644 (file)
@@ -1,7 +1,7 @@
-#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
index 28a98a7..dc7f299 100755 (executable)
@@ -28,6 +28,7 @@ SET(WRT_SRC_DIR
 
 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
index 454b895..be65560 100644 (file)
@@ -110,7 +110,7 @@ public:
 
     ~CoreModuleImpl()
     {
-        LogError("Core module implementation destroyed");
+        LogDebug("Core module implementation destroyed");
     }
 
     bool Init()
index e047d8a..342c4f3 100644 (file)
@@ -33,6 +33,8 @@ namespace WRT {
 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);
@@ -42,6 +44,7 @@ typedef struct UserCallbacks {
     UserCallbacks():
             progressFinish(NULL),
             loadFinish(NULL),
+            windowClose(NULL),
             resume(NULL),
             suspend(NULL),
             reset(NULL),
index 82f882e..054d3c9 100644 (file)
@@ -34,6 +34,7 @@
 #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
 
@@ -158,12 +159,6 @@ void RunnableWidgetObject::Hide() {
     m_view->hideWidget();
 }
 
-//TODO remove
-void dummyOperationStatusCallback (WidgetHandle widgetHandle,
-        CommonError::Type result, UserParam userParam) {
-
-}
-
 void RunnableWidgetObject::Suspend() {
     LogDebug("Suspending widget");
     Assert(m_widgetModel);
@@ -175,20 +170,14 @@ void RunnableWidgetObject::Suspend() {
         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()
index 1e95b93..065a4ee 100644 (file)
@@ -30,7 +30,6 @@
 #include <i_view_module.h>
 #include <string>
 #include <common_error.h>
-#include <widget_launch_struct.h>
 #include <ewk_context.h>
 
 namespace WRT {
diff --git a/src/common/ace_settings_address.h b/src/common/ace_settings_address.h
deleted file mode 100644 (file)
index 8c1027f..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * 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_
diff --git a/src/domain/PolicyEffect.h b/src/domain/PolicyEffect.h
deleted file mode 100644 (file)
index 30a1d21..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * 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_
diff --git a/src/domain/widget_data_types.cpp b/src/domain/widget_data_types.cpp
new file mode 100644 (file)
index 0000000..fc56231
--- /dev/null
@@ -0,0 +1,222 @@
+/*
+ * 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;
+}
index d5d8d16..99301a6 100644 (file)
 #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>
@@ -89,70 +86,20 @@ typedef DPL::Optional<WidgetVersion> OptionalWidgetVersion;
 
 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;
@@ -240,135 +187,23 @@ enum WidgetSettingEncryption
 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;
diff --git a/src/framework/framework_efl.h b/src/framework/framework_efl.h
deleted file mode 100644 (file)
index bd47066..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * 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>
diff --git a/src/framework/framework_ewebkit.h b/src/framework/framework_ewebkit.h
deleted file mode 100644 (file)
index 882ffaf..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * 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>
index ec3c5c2..923fbdd 100644 (file)
@@ -30,7 +30,6 @@
 #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
@@ -47,8 +46,8 @@ public:
     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;
index 2504c7f..8bbdf83 100644 (file)
@@ -228,8 +228,7 @@ void ViewLogic::hideWidget()
     m_ewkViewList.clear();
 }
 
-void ViewLogic::suspendWidget(
-        const OperationStatusStruct& op)
+void ViewLogic::suspendWidget()
 {
     LogInfo("Pausing widget");
     Assert(m_model);
@@ -246,7 +245,7 @@ void ViewLogic::suspendWidget(
     }
 };
 
-void ViewLogic::resumeWidget(const OperationStatusStruct& op)
+void ViewLogic::resumeWidget()
 {
     LogInfo("Resume widget");
     Assert(m_model);
@@ -1593,12 +1592,15 @@ Eina_Bool ViewLogic::windowCloseIdlerCallback(void* data)
 }
 
 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)
@@ -1787,9 +1789,9 @@ void ViewLogic::windowClose()
     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
 
index fc1c091..69c5a59 100644 (file)
@@ -51,8 +51,8 @@ class ViewLogic : public ViewModule::IViewModule
     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();
index 61af80c..262df32 100755 (executable)
@@ -23,7 +23,7 @@
 #ifndef WINDOW_INITIALIZE_H_
 #define WINDOW_INITIALIZE_H_
 
-#include <framework_efl.h>
+#include <dpl/framework_efl.h>
 
 #include <vector>
 #include <string>
index 19308ae..c2d0ed8 100644 (file)
@@ -431,6 +431,24 @@ void WrtClient::progressFinishCallback(void* data)
     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 ...");
@@ -502,6 +520,8 @@ void WrtClient::launchStep()
     cbs->loadFinish = loadFinishCallback;
     cbs->bufferSet = setLayout;
     cbs->bufferUnset = unsetLayout;
+    cbs->windowClose = windowCloseCallback;
+    cbs->webCrash = webCrashCallback;
 
     m_widget->SetUserCallbacks(cbs, this);
     m_widget->Show();
@@ -661,7 +681,7 @@ int main(int argc,
                 LogDebug("Enable backend");
         }
     }
+
     // Set log tagging
     DPL::Log::LogSystemSingleton::Instance().SetTag("WRT-CLIENT");
 
index c7410a1..1f97871 100644 (file)
@@ -90,6 +90,8 @@ class WrtClient :
     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
index fbcf23f..d05a730 100644 (file)
@@ -507,8 +507,8 @@ int main(int argc, char* argv[])
                 return 0;
             }
         } else {
-            printf("result: %s\n", "failed");
-            return -1;
+            printf("result: %s\n", "App isn't running");
+            return 0;
         }
     }