WebView and WebApplication basic behavior and struct implements
[platform/framework/web/crosswalk-tizen.git] / src / runtime / web_view.cc
1 // Copyright 2015 Samsung Electronics Co, Ltd. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "web_view.h"
6
7 #include "native_window.h"
8
9 using namespace std;
10 namespace wrt {
11
12 WebView::WebView(NativeWindow * window,Ewk_Context * context): window_(window), context_(context), always_run_(false) {
13 }
14
15 void WebView::LoadUrl(const std::string& url) {
16   //TODO. To be implemented
17 }
18
19 void WebView::Suspend() {
20   if (!always_run_) {
21     //suspend webview
22   }
23   // change the visibility
24 }
25
26 void WebView::Resume() {
27   if (!always_run_) {
28     // resume webview
29   }
30   // change the visiblity
31 }
32
33 void WebView::Reload() {
34 }
35
36 void WebView::AlwaysRun(bool run) {
37   always_run_ = run;
38 }
39
40 bool WebView::EvalJavascript(const std::string& script) {
41   return false;
42 }
43
44 void WebView::Initialize() {
45 }
46
47 std::string WebView::GetUrl() {
48   return std::string();
49 }
50
51 Evas_Object* WebView::evas_object() const {
52   //TODO
53   return NULL;
54 }
55
56 }