merge with master
[platform/framework/web/wrt-plugins-common.git] / src / js-overlay / js_function_manager.cpp
index d1be598..dfa55b2 100644 (file)
@@ -39,77 +39,70 @@ const char* JSHOOK_NAME = "jsHook";
 const char* ADD_EVENT_LISTENER_NAME = "addEventListener";
 }
 
-namespace JavaScriptFunctions
-{
+namespace JavaScriptFunctions {
 //options
-    class_definition_options_t jsHookfunctionsOptions =
-    {
-        JS_FUNCTION,
-        CREATE_INSTANCE,
-        NONE_NOTICE,
-        USE_OVERLAYED, //ignored
-        NULL,
-        NULL,
-        reinterpret_cast<js_function_impl>(JSCFunctions::JavaScriptHookProc)
-    };
-
-    class_definition_options_t jsPrintfunctionsOptions =
-    {
-        JS_FUNCTION,
-        CREATE_INSTANCE,
-        NONE_NOTICE,
-        USE_OVERLAYED, //ignored
-        NULL,
-        NULL,
-        reinterpret_cast<js_function_impl>(JSCFunctions::JavaScriptPrintProc)
-    };
-
-    class_definition_options_t addEventListenerOptions =
-    {
-        JS_FUNCTION,
-        CREATE_INSTANCE,
-        ALWAYS_NOTICE,
-        OVERLAYED_BEFORE_ORIGINAL,
-        IFrameSupport::RegisterAddEventListener,
-        NULL,
-        reinterpret_cast<js_function_impl>(AddEventListenerSupport::AddEventListener)
-    };
-
-    js_entity_definition_t jsPrint =
-    {
-        JSGLOBAL_OBJECT,
-        JSPRINT_NAME,
-        "",
-        NULL,
-        NULL,
-        &jsPrintfunctionsOptions
-    };
-
-    js_entity_definition_t jsHook =
-    {
-        JSGLOBAL_OBJECT,
-        JSHOOK_NAME,
-        "",
-        NULL,
-        NULL,
-        &jsHookfunctionsOptions
-    };
-
-    js_entity_definition_t addEventListener =
-    {
-        JSGLOBAL_OBJECT,
-        ADD_EVENT_LISTENER_NAME,
-        "",
-        NULL,
-        NULL,
-        &addEventListenerOptions
-    };
-    const js_entity_definition_ptr_t jsPrintPtr = &jsPrint;
-    const js_entity_definition_ptr_t jsHookPtr = &jsHook;
-    const js_entity_definition_ptr_t addEventListenerPtr = &addEventListener;
+class_definition_options_t jsHookfunctionsOptions = {
+    JS_FUNCTION,
+    CREATE_INSTANCE,
+    NONE_NOTICE,
+    USE_OVERLAYED,     //ignored
+    NULL,
+    NULL,
+    reinterpret_cast<js_function_impl>(JSCFunctions::JavaScriptHookProc)
+};
+
+class_definition_options_t jsPrintfunctionsOptions = {
+    JS_FUNCTION,
+    CREATE_INSTANCE,
+    NONE_NOTICE,
+    USE_OVERLAYED,     //ignored
+    NULL,
+    NULL,
+    reinterpret_cast<js_function_impl>(JSCFunctions::JavaScriptPrintProc)
+};
+
+class_definition_options_t addEventListenerOptions = {
+    JS_FUNCTION,
+    CREATE_INSTANCE,
+    ALWAYS_NOTICE,
+    OVERLAYED_BEFORE_ORIGINAL,
+    IFrameSupport::RegisterAddEventListener,
+    NULL,
+    reinterpret_cast<js_function_impl>(AddEventListenerSupport::
+                                           AddEventListener)
+};
+
+js_entity_definition_t jsPrint = {
+    JSGLOBAL_OBJECT,
+    JSPRINT_NAME,
+    "",
+    NULL,
+    NULL,
+    &jsPrintfunctionsOptions
+};
+
+js_entity_definition_t jsHook = {
+    JSGLOBAL_OBJECT,
+    JSHOOK_NAME,
+    "",
+    NULL,
+    NULL,
+    &jsHookfunctionsOptions
+};
+
+js_entity_definition_t addEventListener = {
+    JSGLOBAL_OBJECT,
+    ADD_EVENT_LISTENER_NAME,
+    "",
+    NULL,
+    NULL,
+    &addEventListenerOptions
+};
+const js_entity_definition_ptr_t jsPrintPtr = &jsPrint;
+const js_entity_definition_ptr_t jsHookPtr = &jsHook;
+const js_entity_definition_ptr_t addEventListenerPtr = &addEventListener;
 }
 
-
 bool JsFunctionManager::initialize()
 {
     LogInfo("JSObjectDeclaration for js functions are intialized");