*/
/**
*
- * @file AddEventListenerSupport.h
+ * @file js_overlay_addEventListener.h
* @author Grzegorz Krawczyk (g.krawczyk@samsung.com)
+ * @author Yunchan Cho (yunchan.cho@samsung.com)
* @version 0.1
* @brief
*/
#include <memory>
#include <JavaScriptCore/JavaScript.h>
#include <StorageEvent/IStorageEvent.h>
+#include <TizenServiceEvent/ITizenServiceEvent.h>
+#include <js_overlay_types.h>
namespace WrtPlugins {
namespace W3C {
class AddEventListenerSupport
{
public:
- static void initializeContext(JSContextRef context);
+ static void initialize(JSContextRef context);
+ static void deinitialize();
static bool isInitialized();
const JSValueRef arguments[],
JSValueRef* exception);
- static void CallListenersFromDifferentIFrames(
+ static void CallStorageListenersFromDifferentIFrames(
JSObjectRef iframe,
const WrtDeviceApis::StorageEvent::Api::IStorageEventPtr& event);
+ static void CallServiceListenersFromIFrame(
+ JSObjectRef iframe,
+ const WrtDeviceApis::TizenServiceEvent::Api::ITizenServiceEventPtr& event);
+
private:
+
struct CallbackData{
+ CustomEventType eventType;
JSObjectRef object;
JSObjectRef thisObject;
};