secure-storage
ui-gadget-1
wrt-commons-auto-save-dao-rw
+ wrt-commons-security-origin-dao
REQUIRED
)
${PROJECT_SOURCE_DIR}/src/view/common/view_logic_geolocation_support.cpp
${PROJECT_SOURCE_DIR}/src/view/common/view_logic_password_support.cpp
${PROJECT_SOURCE_DIR}/src/view/common/view_logic_security_support.cpp
+ ${PROJECT_SOURCE_DIR}/src/view/common/view_logic_security_origin_support.cpp
${PROJECT_SOURCE_DIR}/src/view/common/view_logic_storage_support.cpp
${PROJECT_SOURCE_DIR}/src/view/common/view_logic_uri_support.cpp
${PROJECT_SOURCE_DIR}/src/view/common/view_logic_user_agent_support.cpp
--- /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 view_logic_security_origin_support.cpp
+ * @author Jihoon Chung (jihoon.chung@samsung.com)
+ * @version 1.0
+ * @brief Support security origin dao
+ */
+
+#include "view_logic_security_origin_support.h"
+
+#include <memory>
+#include <dpl/log/log.h>
+#include <dpl/assert.h>
+#include <wrt-commons/security-origin-dao/security_origin_dao.h>
+#include <widget_model.h>
+
+namespace ViewModule {
+
+class SecurityOriginSupportImplementation
+{
+ private:
+ WidgetModel* m_model;
+ SecurityOriginDB::SecurityOriginDAOPtr m_securityOriginDAO;
+
+ public:
+ SecurityOriginSupportImplementation(WidgetModel* widgetModel) :
+ m_model(NULL)
+ {
+ Assert(widgetModel);
+ m_model = widgetModel;
+ }
+
+ ~SecurityOriginSupportImplementation()
+ {
+ }
+
+ SecurityOriginDB::SecurityOriginDAO* getSecurityOriginDAO(void)
+ {
+ Assert(m_model);
+ if (!m_securityOriginDAO) {
+ LogDebug("initialize securityOriginDAO");
+ m_securityOriginDAO =
+ SecurityOriginDB::SecurityOriginDAOPtr(
+ new SecurityOriginDB::SecurityOriginDAO(
+ m_model->Handle.Get()));
+ // initialize security result data. Remove allow, deny for
+ m_securityOriginDAO->removeSecurityOriginData(
+ SecurityOriginDB::RESULT_ALLOW_ONCE);
+ m_securityOriginDAO->removeSecurityOriginData(
+ SecurityOriginDB::RESULT_DENY_ONCE);
+ }
+ return m_securityOriginDAO.get();
+ }
+};
+
+SecurityOriginSupport::SecurityOriginSupport(WidgetModel* widgetModel) :
+ m_impl(new SecurityOriginSupportImplementation(widgetModel))
+{
+}
+
+SecurityOriginSupport::~SecurityOriginSupport()
+{
+}
+
+SecurityOriginDB::SecurityOriginDAO* SecurityOriginSupport::getSecurityOriginDAO(void)
+{
+ return m_impl->getSecurityOriginDAO();
+}
+} // namespace ViewModule
--- /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 view_logic_security_origin_support.h
+ * @author Jihoon Chung (jihoon.chung@samsung.com)
+ * @version 1.0
+ * @brief Header file for security origin
+ */
+
+#ifndef VIEW_LOGIC_SECURITY_ORIGIN_SUPPORT_H_
+#define VIEW_LOGIC_SECURITY_ORIGIN_SUPPORT_H_
+
+#include <memory>
+#include <wrt-commons/security-origin-dao/security_origin_dao.h>
+
+class WidgetModel;
+namespace SecurityOriginDB {
+ class SecurityOriginDAO;
+}
+
+namespace ViewModule {
+
+class SecurityOriginSupportImplementation;
+
+class SecurityOriginSupport
+{
+ public:
+ SecurityOriginSupport(WidgetModel* widgetModel);
+ virtual ~SecurityOriginSupport();
+ SecurityOriginDB::SecurityOriginDAO* getSecurityOriginDAO();
+
+ private:
+ std::unique_ptr<SecurityOriginSupportImplementation> m_impl;
+};
+} // namespace ViewModule
+
+
+#endif // VIEW_LOGIC_SECURITY_ORIGIN_SUPPORT_H_
#include <common/view_logic_custom_header_support.h>
#include <common/view_logic_password_support.h>
#include <common/view_logic_security_support.h>
+#include <common/view_logic_security_origin_support.h>
#include <common/view_logic_storage_support.h>
#include <common/view_logic_uri_support.h>
#include <common/view_logic_user_agent_support.h>
m_schemeSupport.reset(new SchemeSupport(m_model->Type.Get().appType));
ViewModule::StorageSupport::initializeStorage(m_model);
m_appsSupport->initialize(m_model);
+ m_securityOriginSupport.reset(new ViewModule::SecurityOriginSupport(m_model));
// temp
// m_vibrationSupport->initialize();
#include <EWebKit2.h>
class SchemeSupport;
+namespace ViewModule {
+class SecurityOriginSupport;
+}
class ViewLogic : public ViewModule::IViewModule
{
std::unique_ptr<SchemeSupport> m_schemeSupport;
std::unique_ptr<ViewModule::AppsSupport> m_appsSupport;
std::unique_ptr<ViewModule::VibrationSupport> m_vibrationSupport;
+ std::unique_ptr<ViewModule::SecurityOriginSupport> m_securityOriginSupport;
};
#endif //VIEW_LOGIC_H_