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.
5 #include "runtime/web_view.h"
9 #include "runtime/native_window.h"
13 WebView::WebView(NativeWindow* window, Ewk_Context* context)
17 rotation_handler_id_ = window->AddRotationHandler(
18 std::bind(&WebView::OnRotation,
20 std::placeholders::_1));
24 window_->RemoveRotationHandler(rotation_handler_id_);
27 void WebView::LoadUrl(const std::string& url) {
28 // TODO(sngn.lee): To be implemented
31 void WebView::Suspend() {
35 // change the visibility
38 void WebView::Resume() {
42 // change the visiblity
45 void WebView::Reload() {
48 void WebView::AlwaysRun(bool run) {
52 bool WebView::EvalJavascript(const std::string& script) {
56 void WebView::Initialize() {
59 std::string WebView::GetUrl() {
63 Evas_Object* WebView::evas_object() const {
64 // TODO(sngn.lee): To be implemented
68 void WebView::OnRotation(int degree) {
69 // TOOD(sngn.lee): To be impelmented