*/
#include <dpl/popup/popup_controller.h>
#include <global_context.h>
-#include <user_callback_controller.h>
#include <global_logic.h>
namespace GlobalContext {
// Touch all WebRuntime controllers
// Remember to always add here new singletons!
GlobalLogicSingleton::Instance().GetGlobalModel();
- UserCallbackModule::initialize();
DPL::Popup::PopupControllerSingleton::Instance().Touch();
// Start UI process rpc server
}
+++ /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 user_callback_controller.cpp
- * @author Przemyslaw Dobrowolski (p.dobrowolsk@samsung.com)
- * @version 1.0
- * @brief Implementation file for user callback controller
- */
-#include <user_callback_controller.h>
-#include <dpl/singleton.h>
-#include <dpl/singleton_impl.h>
-#include <dpl/event/controller.h>
-#include <dpl/generic_event.h>
-#include <dpl/type_list.h>
-
-namespace UserCallbackControllerEvents {
-/**
- * Send guarded user callback
- *
- * @brief This event send asynchronous user callback call event
- *
- * After user callback is emmited, user callback will be deleted by logic.
- */
-DECLARE_GENERIC_EVENT_1(EmitUserCallbackEvent, UserCallbackCall *)
-} // namespace UserCallbackControllerEvents
-
-class UserCallbackController :
- public DPL::Event::Controller<DPL::TypeListDecl<
- UserCallbackControllerEvents::EmitUserCallbackEvent>::Type>
-{
- UserCallbackController() {}
- virtual ~UserCallbackController() {}
- virtual void OnEventReceived(
- const UserCallbackControllerEvents::EmitUserCallbackEvent &event)
- {
- UserCallbackCall *userCallback = event.GetArg0();
- m_userCallbackLogic.EmitUserCallback(userCallback);
- }
- UserCallbackLogic m_userCallbackLogic;
- friend class DPL::Singleton<UserCallbackController>;
-};
-typedef DPL::Singleton<UserCallbackController> UserCallbackControllerSingleton;
-IMPLEMENT_SINGLETON(UserCallbackController)
-
-
-void POST_USER_CALLBACK(UserCallbackCall *call)
-{
- CONTROLLER_POST_EVENT(UserCallbackController,
- UserCallbackControllerEvents::EmitUserCallbackEvent(
- call));
-}
-
-void UserCallbackModule::initialize()
-{
- UserCallbackControllerSingleton::Instance().Touch();
-}
+++ /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 user_callback_controller.h
- * @author Przemyslaw Dobrowolski (p.dobrowolsk@samsung.com)
- * @version 1.0
- * @brief Header file for user callback controller
- */
-#ifndef USER_CALLBACK_CONTROLLER_H
-#define USER_CALLBACK_CONTROLLER_H
-
-#include <user_callback_logic.h>
-
-namespace UserCallbackModule
-{
-void initialize();
-}
-
-void POST_USER_CALLBACK(UserCallbackCall *call);
-
-
-#endif // USER_CALLBACK_CONTROLLER_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 user_callback_logic.cpp
- * @author Przemyslaw Dobrowolski (p.dobrowolsk@samsung.com)
- * @version 1.0
- * @brief Implementation file for user callback logic
- */
-#include <user_callback_logic.h>
-#include <dpl/exception.h>
-#include <dpl/log/log.h>
-
-UserCallbackLogic::UserCallbackLogic()
-{
-}
-
-UserCallbackLogic::~UserCallbackLogic()
-{
-}
-
-void UserCallbackLogic::EmitUserCallback(const UserCallbackCall *callback)
-{
- LogDebug("Calling user callback...");
-
- // Guard user callback call
- UNHANDLED_EXCEPTION_HANDLER_BEGIN
- {
- callback->Exec();
- }
- UNHANDLED_EXCEPTION_HANDLER_END
-
- // Delete abstract usercallback
- delete callback;
-
- LogDebug("User callback called.");
-}
+++ /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 user_callback_logic.h
- * @author Przemyslaw Dobrowolski (p.dobrowolsk@samsung.com)
- * @version 1.0
- * @brief Implementation file for user callback logic
- */
-#ifndef USER_CALLBACK_LOGIC_H
-#define USER_CALLBACK_LOGIC_H
-
-#include <cstddef>
-#include <dpl/assert.h>
-
-class UserCallbackCall
-{
- public:
- virtual ~UserCallbackCall()
- {
- }
- virtual void Exec() const = 0;
-};
-
-template<typename Callback>
-class GenericUserCallbackCall0 :
- public UserCallbackCall
-{
- private:
- Callback m_callback;
-
- public:
- GenericUserCallbackCall0(Callback callback) :
- m_callback(callback)
- {
- }
-
- virtual void Exec() const
- {
- Assert(m_callback != NULL);
- m_callback();
- }
-};
-
-template<typename Callback, typename Arg0>
-class GenericUserCallbackCall1 :
- public UserCallbackCall
-{
- private:
- Callback m_callback;
- Arg0 m_arg0;
-
- public:
- GenericUserCallbackCall1(Callback callback,
- Arg0 arg0) :
- m_callback(callback),
- m_arg0(arg0)
- {
- }
-
- virtual void Exec() const
- {
- Assert(m_callback != NULL);
- m_callback(m_arg0);
- }
-};
-
-template<typename Callback, typename Arg0, typename Arg1>
-class GenericUserCallbackCall2 :
- public UserCallbackCall
-{
- private:
- Callback m_callback;
- Arg0 m_arg0;
- Arg1 m_arg1;
-
- public:
- GenericUserCallbackCall2(Callback callback,
- Arg0 arg0,
- Arg1 arg1) :
- m_callback(callback),
- m_arg0(arg0),
- m_arg1(arg1)
- {
- }
-
- virtual void Exec() const
- {
- Assert(m_callback != NULL);
- m_callback(m_arg0, m_arg1);
- }
-};
-
-template<typename Callback, typename Arg0, typename Arg1, typename Arg2>
-class GenericUserCallbackCall3 :
- public UserCallbackCall
-{
- private:
- Callback m_callback;
- Arg0 m_arg0;
- Arg1 m_arg1;
- Arg2 m_arg2;
-
- public:
- GenericUserCallbackCall3(Callback callback,
- Arg0 arg0,
- Arg1 arg1,
- Arg2 arg2) :
- m_callback(callback),
- m_arg0(arg0),
- m_arg1(arg1),
- m_arg2(arg2)
- {
- }
-
- virtual void Exec() const
- {
- Assert(m_callback != NULL);
- m_callback(m_arg0, m_arg1, m_arg2);
- }
-};
-
-template<typename Callback, typename Arg0, typename Arg1, typename Arg2,
- typename Arg3>
-class GenericUserCallbackCall4 :
- public UserCallbackCall
-{
- private:
- Callback m_callback;
- Arg0 m_arg0;
- Arg1 m_arg1;
- Arg2 m_arg2;
- Arg3 m_arg3;
-
- public:
- GenericUserCallbackCall4(Callback callback,
- Arg0 arg0,
- Arg1 arg1,
- Arg2 arg2,
- Arg3 arg3) :
- m_callback(callback),
- m_arg0(arg0),
- m_arg1(arg1),
- m_arg2(arg2),
- m_arg3(arg3)
- {
- }
-
- virtual void Exec() const
- {
- Assert(m_callback != NULL);
- m_callback(m_arg0, m_arg1, m_arg2, m_arg3);
- }
-};
-
-template<typename Callback, typename Arg0, typename Arg1, typename Arg2,
- typename Arg3, typename Arg4>
-class GenericUserCallbackCall5 :
- public UserCallbackCall
-{
- private:
- Callback m_callback;
- Arg0 m_arg0;
- Arg1 m_arg1;
- Arg2 m_arg2;
- Arg3 m_arg3;
- Arg4 m_arg4;
-
- public:
- GenericUserCallbackCall5(Callback callback,
- Arg0 arg0,
- Arg1 arg1,
- Arg2 arg2,
- Arg3 arg3,
- Arg4 arg4) :
- m_callback(callback),
- m_arg0(arg0),
- m_arg1(arg1),
- m_arg2(arg2),
- m_arg3(arg3),
- m_arg4(arg4)
- {
- }
-
- virtual void Exec() const
- {
- Assert(m_callback != NULL);
- m_callback(m_arg0, m_arg1, m_arg2, m_arg3, m_arg4);
- }
-};
-
-/**
- * @brief User callback logic
- */
-class UserCallbackLogic
-{
- public:
- virtual ~UserCallbackLogic();
-
- /**
- * This method send user callback from separate context
- */
- void EmitUserCallback(const UserCallbackCall *callback);
-
- private:
- UserCallbackLogic();
-
- friend class UserCallbackController;
-};
-
-#endif // WIDGET_LOGIC_H
+++ /dev/null
-Collective headers for main libraries (EFL and WebKit)
m_type = GetType(name);
}
-Scheme::Scheme(Type type) : m_type(type) {
- m_name = GetName(type);
-}
-
std::string Scheme::GetName (Type type)
{
Assert(type >= FILE && type < COUNT);
};
explicit Scheme(const std::string& name);
- explicit Scheme(Type type);
virtual ~Scheme() {}
std::string GetName() const { return m_name; }
return notificationShow(notiData);
}
-bool cancelWebNotification(WebNotificationDataPtr /*notiData*/)
-{
- LogInfo("cancelWebNotification called");
- return false;
-}
-
bool notificationShow(WebNotificationDataPtr notiData)
{
LogDebug("notificationShow called");
bool showWebNotification(WebNotificationDataPtr notiData);
-bool cancelWebNotification(WebNotificationDataPtr notiData);
} // namespace SecuritySupport
} // namespace WebNotification
SET(VIEW_MODULE_SOURCES
${PROJECT_SOURCE_DIR}/src/global_logic/global_logic.cpp #TODO this should be moved to separate module
${PROJECT_SOURCE_DIR}/src/global_logic/global_model.cpp #TODO this should be moved to separate module
- ${PROJECT_SOURCE_DIR}/src/domain/user_callback_controller.cpp #TODO this should be moved to separate module
- ${PROJECT_SOURCE_DIR}/src/domain/user_callback_logic.cpp #TODO this should be moved to separate module
${PROJECT_SOURCE_DIR}/src/view/webkit/view_logic.cpp
${PROJECT_SOURCE_DIR}/src/view/webkit/view_logic_filesystem_support.cpp
${PROJECT_SOURCE_DIR}/src/view/webkit/view_logic_scheme_support.cpp