Support fast opening of PD
[platform/framework/web/web-provider.git] / src / Plugin / AppBoxPlugin / AppBoxPdHelper.cpp
1 /*
2  * Copyright (c) 2013 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  *    Licensed under the Flora License, Version 1.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
7  *
8  *        http://floralicense.org/license/
9  *
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.
15  */
16 /**
17  * @file    AppBoxPdHelper.cpp
18  * @author  Yunchan Cho (yunchan.cho@samsung.com)
19  */
20 #include <string>
21 #include <Evas.h>
22 #include <ewk_view.h>
23 #include <Core/Util/Log.h>
24 #include "AppBoxPdHelper.h"
25
26 AppBoxPdHelper::AppBoxPdHelper(Evas_Object* pdWin)
27     : m_win(pdWin)
28     , m_boxWebView()
29     , m_pdWebView()
30     , m_opened(false)
31 {
32 }
33
34 AppBoxPdHelper::~AppBoxPdHelper()
35 {
36 }
37
38 void AppBoxPdHelper::startOpen()
39 {
40     LogD("enter");
41 }
42
43 void AppBoxPdHelper::finishOpen(Evas_Object* child)
44 {
45     LogD("enter");
46     m_opened = true;
47     setPdWebView(child);
48 }
49
50 void AppBoxPdHelper::close()
51 {
52     LogD("enter");
53 }
54
55 void AppBoxPdHelper::setBoxWebView(Evas_Object* webview)
56 {
57     LogD("enter");
58     m_boxWebView = webview;
59 }
60
61 void AppBoxPdHelper::setPdWebView(Evas_Object* webview)
62 {
63     LogD("enter");
64     m_pdWebView = webview;
65 }
66
67 Evas_Object* AppBoxPdHelper::getBoxWebView() const
68 {
69     LogD("enter");
70     return m_boxWebView;
71 }
72
73 Evas_Object* AppBoxPdHelper::getPdWebView() const
74 {
75     LogD("enter");
76     return m_pdWebView;
77 }
78
79 Evas* AppBoxPdHelper::getPdCanvas() const  
80 {
81     LogD("enter");
82     evas_object_evas_get(m_win);
83 }
84
85 bool AppBoxPdHelper::isPdOpened() const
86 {
87     LogD("enter");
88     return m_opened;
89 }