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.
17 * @file js_page_session.h
18 * @author Grzegorz Krawczyk (g.krawczyk@samsung.com)
21 #ifndef WRT_PLUGIN_JS_PAGE_SESSION_H_
22 #define WRT_PLUGIN_JS_PAGE_SESSION_H_
26 #include <dpl/wrt-dao-ro/plugin_dao_read_only.h>
27 #include <js_overlay_types.h>
30 using namespace WrtPlugins::W3C;
36 void startSession(int widgetHandle,
37 JSGlobalContextRef view,
39 const char* encodedBundle,
44 //TODO im not sure if it is needed. I think it should be hidden
45 void performLibrariesUnload();
46 bool loadPluginOnDemand(const WrtDB::DbPluginHandle &pluginHandle,
47 JavaScriptObject& parentObject,
48 JSGlobalContextRef context);
50 void loadFrame(JSGlobalContextRef context);
51 void unloadFrame(JSGlobalContextRef context);
53 // reset custom window properties. (Tizen requirements)
54 void setCustomProperties(double scaleFactor,
55 const char* encodedBundle,
58 void dispatchJavaScriptEvent(CustomEventType eventType);
60 JSPageSession(const PluginContainerSupportPtr& containerSupport);
62 virtual ~JSPageSession();
66 std::unique_ptr<Impl> m_impl;
69 typedef std::shared_ptr<JSPageSession> JSPageSessionPtr;
71 #endif // PLUGIN_LOGIC_H