3 * Copyright (c) 2013 Samsung Electronics Co., Ltd All Rights Reserved
5 * Licensed under the Flora License, Version 1.0 (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)
27 #include "IRenderView.h"
28 #include "IPdHelper.h"
30 #define EXPORT_CLASS __attribute__ ((visibility("default"))
32 class EXPORT_CLASS PdHelper: public IPdHelper {
34 static IPdHelperPtr create(
36 std::string pdStartUrl,
37 RenderInfoPtr pdRenderInfo)
39 return IPdHelperPtr(new PdHelper(pdWin, pdStartUrl, pdRenderInfo));
41 virtual void startOpen();
42 virtual void finishOpen(Evas_Object* child);
44 virtual void setBoxWebView(Evas_Object* webview);
45 virtual void setPdWebView(Evas_Object* webview);
46 virtual Evas_Object* getBoxWebView() const;
47 virtual Evas_Object* getPdWebView() const;
48 virtual Evas* getPdCanvas() const;
49 virtual bool isPdOpened() const;
53 virtual void didExecuteScript(Evas_Object* webview, std::string& result);
55 std::string validateUrl(std::string& url);
56 static void executeScriptCallback(
57 Evas_Object* webview, const char* result, void* data);
59 PdHelper(Evas_Object* pdWin, std::string pdStartUrl, RenderInfoPtr pdRenderInfo);
63 Evas_Object* m_boxWebView;
64 Evas_Object* m_pdWebView;
65 std::string m_startUrl;
66 RenderInfoPtr m_renderInfo;