Merge "Revert clean up of NativeWindow" into devel/wrt2
[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 "runtime/web_view.h"
6
7 #include <ewk_chromium.h>
8 #include <functional>
9 #include <sstream>
10
11 #include "runtime/native_window.h"
12 #include "runtime/web_view_impl.h"
13
14 namespace wrt {
15
16 WebView::WebView(wrt::NativeWindow* window, Ewk_Context* context)
17     : impl_(new WebViewImpl(this, window, context)) {
18 }
19
20 WebView::~WebView() {
21   delete impl_;
22 }
23
24 void WebView::LoadUrl(const std::string& url) {
25   impl_->LoadUrl(url);
26 }
27
28 std::string WebView::GetUrl() {
29   return impl_->GetUrl();
30 }
31
32 void WebView::Suspend() {
33   impl_->Suspend();
34 }
35
36 void WebView::Resume() {
37   impl_->Resume();
38 }
39
40 void WebView::Reload() {
41   impl_->Reload();
42 }
43
44 void WebView::SetVisibility(bool show) {
45   impl_->SetVisibility(show);
46 }
47
48 bool WebView::EvalJavascript(const std::string& script) {
49   return impl_->EvalJavascript(script);
50 }
51
52 void WebView::SetEventListener(EventListener* listener) {
53   impl_->SetEventListener(listener);
54 }
55
56 Evas_Object* WebView::evas_object() const {
57   return impl_->evas_object();
58 }
59
60 }  // namespace wrt
61