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 #ifndef WRT_RUNTIME_WEB_VIEW_IMPL_H_
6 #define WRT_RUNTIME_WEB_VIEW_IMPL_H_
9 #include <Elementary.h>
10 #include <efl_assist.h>
14 #include "runtime/web_view.h"
22 WebViewImpl(WebView* view, wrt::NativeWindow* window, Ewk_Context* context);
23 virtual ~WebViewImpl();
25 void LoadUrl(const std::string& url);
31 void SetVisibility(bool show);
32 bool EvalJavascript(const std::string& script);
33 void SetAppInfo(const std::string& app_name, const std::string& version);
34 bool SetUserAgent(const std::string& user_agent);
36 void SetEventListener(WebView::EventListener* listener);
37 Evas_Object* evas_object() const;
40 void OnKeyEvent(Ea_Callback_Type key_type);
41 void OnRotation(int degree);
45 void InitKeyCallback();
46 void InitLoaderCallback();
47 void InitPolicyDecideCallback();
48 void InitQuotaExceededCallback();
49 void InitIPCMessageCallback();
50 void InitOrientaionLockCallback();
51 void InitConsoleMessageCallback();
52 void InitCustomContextMenuCallback();
53 void InitRotationCallback();
54 void InitWindowCreateCallback();
55 void InitFullscreenCallback();
56 void InitNotificationPermissionCallback();
57 void InitGeolocationPermissionCallback();
58 void InitAuthenticationCallback();
59 void InitCertificateAllowCallback();
61 NativeWindow* window_;
62 Ewk_Context* context_;
63 Evas_Object* ewk_view_;
64 WebView::EventListener* listener_;
65 int rotation_handler_id_;
67 std::map<const std::string, Evas_Smart_Cb> smart_callbacks_;
72 #endif // WRT_RUNTIME_WEB_VIEW_IMPL_H_