2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 * @file IFrameSupport.h
19 * @author Grzegorz Krawczyk (g.krawczyk@samsung.com)
24 #ifndef _WRT_PLUGINS_SRC_W3C_WIDGET_IFRAME_SUPPORT_H_
25 #define _WRT_PLUGINS_SRC_W3C_WIDGET_IFRAME_SUPPORT_H_
29 #include <JavaScriptCore/JavaScript.h>
30 #include <wrt_plugin_export.h>
32 namespace WrtPlugins {
36 IFrameData() : widget(0), addEventListener(0){}
39 JSObjectRef addEventListener;
41 typedef std::shared_ptr<IFrameData> IFrameDataPtr;
46 static void RegisterWidget(java_script_context_t global_context,
47 js_object_instance_t iframe,
48 js_object_instance_t object);
50 static void RegisterAddEventListener(java_script_context_t global_context,
51 js_object_instance_t iframe,
52 js_object_instance_t object);
54 static JSObjectRef getIFrameObjectForWidget(JSObjectRef widgetObject);
58 typedef std::map<JSObjectRef, IFrameDataPtr> IFramesContainer;
60 static IFramesContainer m_iframesObject;
63 static IFrameDataPtr getIFrameData(JSObjectRef iframe);