3 * Copyright (c) 2013 Samsung Electronics Co., Ltd All Rights Reserved
5 * Licensed under the Flora License, Version 1.1 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://floralicense.org/license/
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
19 * @author Yunchan Cho (yunchan.cho@samsung.com)
24 #include "IRenderView.h"
25 #include "IPdHelper.h"
27 #define EXPORT_CLASS __attribute__ ((visibility("default"))
29 class EXPORT_CLASS PdHelper: public IPdHelper {
31 static IPdHelperPtr create(
33 std::string pdStartUrl,
34 RenderInfoPtr pdRenderInfo)
36 return IPdHelperPtr(new PdHelper(pdWin, pdStartUrl, pdRenderInfo));
38 virtual void startOpen();
39 virtual void finishOpen(Evas_Object*& child);
41 virtual void setBaseWebView(Evas_Object*& parent);
42 virtual Evas_Object* getBaseWebView() const;
43 virtual Evas* getPdCanvas() const;
44 virtual bool isPdOpened() const;
48 virtual void didExecuteScript(Evas_Object* webview, std::string& result);
50 std::string validateUrl(std::string& url);
51 static void executeScriptCallback(
52 Evas_Object* webview, const char* result, void* data);
54 PdHelper(Evas_Object* pdWin, std::string pdStartUrl, RenderInfoPtr pdRenderInfo);
58 Evas_Object* m_baseWebView;
59 Evas_Object* m_pdWebView;
60 std::string m_startUrl;
61 RenderInfoPtr m_renderInfo;