Remove tw_webview
[platform/framework/web/chromium-efl.git] / tizen_src / ewk / efl_integration / eweb_view.h
1 // Copyright 2014 Samsung Electronics. 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 #ifndef EWEB_VIEW_H
6 #define EWEB_VIEW_H
7
8 #if defined(OS_TIZEN_MOBILE)
9 #if !defined(EWK_BRINGUP)
10 // FIXME: appfw/app_service.h is no more in Tizen 2.3, figure out what to include instead.
11 #include <appcore-agent/service_app.h>
12 #endif
13 #include <vector>
14 #endif
15
16 #include <map>
17 #include <string>
18 #include <Evas.h>
19 #include <locale.h>
20
21 #include "base/callback.h"
22 #include "base/memory/scoped_ptr.h"
23 #include "base/synchronization/waitable_event.h"
24 #include "content/public/common/context_menu_params.h"
25 #include "content/public/common/file_chooser_params.h"
26 #include "content/browser/renderer_host/event_with_latency_info.h"
27 #include "content/common/input/input_event_ack_state.h"
28 #include "content/public/browser/navigation_controller.h"
29 #include "content/public/browser/web_contents_delegate.h"
30 #include "content/public/browser/web_contents_efl_delegate.h"
31 #include "content/public/common/menu_item.h"
32 #include "base/id_map.h"
33 #include "context_menu_controller_efl.h"
34 #include "eweb_context.h"
35 #include "ewk_touch.h"
36 #include "private/ewk_history_private.h"
37 #include "private/ewk_hit_test_private.h"
38 #include "private/ewk_auth_challenge_private.h"
39 #include "private/ewk_back_forward_list_private.h"
40 #include "private/ewk_settings_private.h"
41 #include "private/ewk_web_application_icon_data_private.h"
42 #include "public/ewk_hit_test.h"
43 #include "public/ewk_view.h"
44 #include "eweb_view_callbacks.h"
45 #include "scroll_detector.h"
46 #include "selection_controller_efl.h"
47 #include "web_contents_delegate_efl.h"
48 #include "context_menu_controller_efl.h"
49 #include "file_chooser_controller_efl.h"
50 #include "ui/gfx/geometry/point.h"
51 #include "ui/gfx/geometry/size.h"
52 #include "browser/inputpicker/InputPicker.h"
53 #include "popup_controller_efl.h"
54
55 #include "browser/selectpicker/popup_picker.h"
56
57 namespace content {
58 class RenderViewHost;
59 class RenderWidgetHostViewEfl;
60 class WebContentsDelegateEfl;
61 class ContextMenuControllerEfl;
62 class DevToolsDelegateEfl;
63 class WebContentsViewEfl;
64 class PopupControllerEfl;
65 }
66
67 namespace tizen_webview {
68 class WebViewEvasEventHandler;
69 }
70
71 class ErrorParams;
72 class _Ewk_Policy_Decision;
73 class _Ewk_Hit_Test;
74 class Ewk_Context;
75
76 class WebAppScreenshotCapturedCallback : public base::RefCounted<WebAppScreenshotCapturedCallback> {
77  public:
78       WebAppScreenshotCapturedCallback(Ewk_Web_App_Screenshot_Captured_Callback func, void *user_data, Evas* canvas)
79           : func_(func), user_data_(user_data), canvas_(canvas) {}
80   void Run(Evas_Object* image) {
81     if (func_ != NULL)
82       (func_)(image, user_data_);
83   }
84
85  private:
86   Ewk_Web_App_Screenshot_Captured_Callback func_;
87   void *user_data_;
88   Evas* canvas_;
89 };
90
91 class EwkViewPlainTextGetCallback {
92  public:
93   EwkViewPlainTextGetCallback(Ewk_View_Plain_Text_Get_Callback callback,
94                               void* user_data)
95     : callback_(callback), user_data_(user_data)
96     { }
97   void TriggerCallback(Evas_Object* obj, const std::string& content_text);
98
99  private:
100   Ewk_View_Plain_Text_Get_Callback callback_;
101   void* user_data_;
102 };
103
104 class OrientationLockCallback {
105  public:
106   OrientationLockCallback(Ewk_Orientation_Lock_Cb lock,
107                           void* user_data)
108     : lock_(lock),
109       user_data_(user_data)
110     {}
111   private:
112     Ewk_Orientation_Lock_Cb lock_;
113     void* user_data_;
114 };
115
116 class MHTMLCallbackDetails {
117  public:
118   MHTMLCallbackDetails(Ewk_View_MHTML_Data_Get_Callback callback_func, void *user_data)
119     : callback_func_(callback_func),
120       user_data_(user_data)
121   {}
122   void Run(Evas_Object* obj, const std::string& mhtml_content);
123
124   Ewk_View_MHTML_Data_Get_Callback callback_func_;
125   void *user_data_;
126 };
127
128 class WebApplicationIconUrlGetCallback {
129  public:
130   WebApplicationIconUrlGetCallback(Ewk_Web_App_Icon_URL_Get_Callback func, void *user_data)
131     : func_(func), user_data_(user_data)
132   {}
133   void Run(const std::string &url) {
134     if (func_) {
135       (func_)(url.c_str(), user_data_);
136     }
137   }
138
139  private:
140   Ewk_Web_App_Icon_URL_Get_Callback func_;
141   void *user_data_;
142 };
143
144 class WebApplicationIconUrlsGetCallback {
145  public:
146   WebApplicationIconUrlsGetCallback(Ewk_Web_App_Icon_URLs_Get_Callback func, void *user_data)
147     : func_(func), user_data_(user_data)
148   {}
149   void Run(const std::map<std::string, std::string> &urls) {
150     if (func_) {
151       Eina_List *list = NULL;
152       for (std::map<std::string, std::string>::const_iterator it = urls.begin(); it != urls.end(); ++it) {
153         _Ewk_Web_App_Icon_Data *data = ewkWebAppIconDataCreate(it->first, it->second);
154         list = eina_list_append(list, data);
155       }
156       (func_)(list, user_data_);
157     }
158   }
159
160  private:
161   Ewk_Web_App_Icon_URLs_Get_Callback func_;
162   void *user_data_;
163 };
164
165 class WebApplicationCapableGetCallback {
166  public:
167   WebApplicationCapableGetCallback(Ewk_Web_App_Capable_Get_Callback func, void *user_data)
168     : func_(func), user_data_(user_data)
169   {}
170   void Run(bool capable) {
171     if (func_) {
172       (func_)(capable ? EINA_TRUE : EINA_FALSE, user_data_);
173     }
174   }
175
176  private:
177   Ewk_Web_App_Capable_Get_Callback func_;
178   void *user_data_;
179 };
180
181 class AsyncHitTestRequest;
182 class NotificationPermissionCallback {
183  public:
184   NotificationPermissionCallback(
185       Evas_Object* obj,
186       Ewk_View_Notification_Permission_Callback func,
187       void* user_data)
188       : obj_(obj), func_(func), user_data_(user_data) {}
189   bool Run(Ewk_Notification_Permission_Request* request) {
190     if (func_) {
191       return (func_)(obj_, request, user_data_) == EINA_TRUE;
192     }
193     return false;
194   }
195
196 private:
197   Evas_Object* obj_;
198   Ewk_View_Notification_Permission_Callback func_;
199   void* user_data_;
200 };
201
202 class WebViewAsyncRequestHitTestDataCallback;
203 class JavaScriptDialogManagerEfl;
204 class WebViewGeolocationPermissionCallback;
205 class WebViewUnfocusAllowCallback;
206
207 class EWebView {
208  public:
209   static EWebView* FromEvasObject(Evas_Object* eo);
210   static int GetOrientation();
211
212   EWebView(Ewk_Context*, Evas_Object* smart_object);
213   ~EWebView();
214
215   // initialize data members and activate event handlers.
216   // call this once after created and before use
217   void Initialize();
218
219   void CreateNewWindow(content::WebContentsEflDelegate::WebContentsCreateCallback);
220   static Evas_Object* GetHostWindowDelegate(const content::WebContents*);
221
222   Ewk_Context* context() const { return context_.get(); }
223   Evas_Object* evas_object() const { return evas_object_; }
224   Evas* GetEvas() const { return evas_object_evas_get(evas_object_); }
225
226   content::WebContents& web_contents() const
227   {
228     return *web_contents_.get();
229   }
230
231   template<EWebViewCallbacks::CallbackType callbackType>
232   EWebViewCallbacks::CallBack<callbackType> SmartCallback() const
233   {
234     return EWebViewCallbacks::CallBack<callbackType>(evas_object_);
235   }
236
237   void set_magnifier(bool status);
238
239   // ewk_view api
240   void SetURL(const char* url_string);
241   const char* GetURL() const;
242   void Reload();
243   void ReloadIgnoringCache();
244   Eina_Bool CanGoBack();
245   Eina_Bool CanGoForward();
246   Eina_Bool HasFocus() const;
247   void SetFocus(Eina_Bool focus);
248   Eina_Bool GoBack();
249   Eina_Bool GoForward();
250   void Suspend();
251   void Resume();
252   void Stop();
253   double GetTextZoomFactor() const;
254   void SetTextZoomFactor(double text_zoom_factor);
255   void ExecuteEditCommand(const char* command, const char* value);
256   void SetOrientation(int orientation);
257   void SetOrientationLockCallback(Ewk_Orientation_Lock_Cb func, void* data);
258   bool TouchEventsEnabled() const;
259   void SetTouchEventsEnabled(bool enabled);
260   bool MouseEventsEnabled() const;
261   void SetMouseEventsEnabled(bool enabled);
262   void HandleTouchEvents(Ewk_Touch_Event_Type type, const Eina_List *points, const Evas_Modifier *modifiers);
263   void Show();
264   void Hide();
265   bool ExecuteJavaScript(const char* script, Ewk_View_Script_Execute_Callback callback, void* userdata);
266   bool SetUserAgent(const char* userAgent);
267   bool SetUserAgentAppName(const char* application_name);
268   bool SetPrivateBrowsing(bool incognito);
269   bool GetPrivateBrowsing() const;
270   const char* GetUserAgent() const;
271   const char* GetUserAgentAppName() const;
272   const char* GetSelectedText() const;
273   Ewk_Settings* GetSettings();
274   _Ewk_Frame* GetMainFrame();
275   void UpdateWebKitPreferences();
276   void LoadHTMLString(const char* html, const char* base_uri, const char* unreachable_uri);
277   void LoadPlainTextString(const char* plain_text);
278   void LoadData(const char* data, size_t size, const char* mime_type, const char* encoding, const char* base_uri, const char* unreachable_uri = NULL);
279   void InvokeLoadError(const ErrorParams &error);
280   void InvokeAuthCallback(LoginDelegateEfl* login_delegate, const GURL& url, const std::string& realm);
281   void Find(const char* text, Ewk_Find_Options);
282   void InvokeAuthCallbackOnUI(_Ewk_Auth_Challenge* auth_challenge);
283   void SetContentSecurityPolicy(const char* policy, Ewk_CSP_Header_Type type);
284   void ShowPopupMenu(const std::vector<content::MenuItem>& items,
285                      int selectedIndex, bool multiple);
286   Eina_Bool HidePopupMenu();
287   void UpdateFormNavigation(int formElementCount, int currentNodeIndex,
288       bool prevState, bool nextState);
289   void FormNavigate(bool direction);
290   bool IsSelectPickerShown() const;
291   void CloseSelectPicker();
292   bool FormIsNavigating() const { return formIsNavigating_; }
293   void SetFormIsNavigating(bool formIsNavigating);
294   Eina_Bool PopupMenuUpdate(Eina_List* items, int selectedIndex);
295   Eina_Bool DidSelectPopupMenuItem(int selectedIndex);
296   Eina_Bool DidMultipleSelectPopupMenuItem(std::vector<int>& selectedIndices);
297   Eina_Bool PopupMenuClose();
298   void ShowContextMenu(
299       const content::ContextMenuParams& params,
300       content::ContextMenuType type = content::MENU_TYPE_LINK,
301       bool show_selection = true);
302   void CancelContextMenu(int request_id);
303   void SetScale(double scale_factor, int x, int y);
304   bool GetScrollPosition(int* x, int* y) const;
305   void SetScroll(int x, int y);
306   void UrlRequestSet(const char* url,
307       content::NavigationController::LoadURLType loadtype,
308       Eina_Hash* headers,
309       const char* body);
310
311   content::SelectionControllerEfl* GetSelectionController() const { return selection_controller_.get(); }
312   content::PopupControllerEfl* GetPopupController() const { return popup_controller_.get(); }
313   ScrollDetector* GetScrollDetector() const { return scroll_detector_.get(); }
314   void MoveCaret(const gfx::Point& point);
315   void QuerySelectionStyle();
316   void OnQuerySelectionStyleReply(const SelectionStylePrams& params);
317   void SelectClosestWord(const gfx::Point& touch_point);
318   void SelectLinkText(const gfx::Point& touch_point);
319   bool GetSelectionRange(Eina_Rectangle* left_rect, Eina_Rectangle* right_rect);
320   void GetSnapShotForRect(gfx::Rect& rect);
321
322   // Callback OnCopyFromBackingStore will be called once we get the snapshot from render
323   void OnCopyFromBackingStore(bool success, const SkBitmap& bitmap);
324
325   void RenderViewCreated(content::RenderViewHost* render_view_host);
326
327   /**
328    * Creates a snapshot of given rectangle from EWebView
329    *
330    * @param rect rectangle of EWebView which will be taken into snapshot
331    *
332    * @return created snapshot or NULL if error occured.
333    * @note ownership of snapshot is passed to caller
334   */
335   Evas_Object* GetSnapshot(Eina_Rectangle rect);
336
337   bool GetSnapshotAsync(Eina_Rectangle rect, Evas* canvas, Ewk_Web_App_Screenshot_Captured_Callback callback, void* user_data);
338   void InvokePolicyResponseCallback(_Ewk_Policy_Decision* policy_decision);
339   void InvokePolicyNavigationCallback(content::RenderViewHost* rvh,
340       NavigationPolicyParams params, bool* handled);
341   void UseSettingsFont();
342
343   _Ewk_Hit_Test* RequestHitTestDataAt(int x, int y, Ewk_Hit_Test_Mode mode);
344   Eina_Bool AsyncRequestHitTestDataAt(int x, int y,
345       Ewk_Hit_Test_Mode mode,
346       Ewk_View_Hit_Test_Request_Callback,
347       void* user_data);
348   _Ewk_Hit_Test* RequestHitTestDataAtBlinkCoords(int x, int y,
349       Ewk_Hit_Test_Mode mode);
350   Eina_Bool AsyncRequestHitTestDataAtBlinkCords(int x, int y,
351       Ewk_Hit_Test_Mode mode,
352       Ewk_View_Hit_Test_Request_Callback,
353       void* user_data);
354   void DispatchAsyncHitTestData(const Hit_Test_Params& params, int64_t request_id);
355   void UpdateHitTestData(const Hit_Test_Params& params);
356
357   int current_find_request_id() const { return current_find_request_id_; }
358   bool PlainTextGet(Ewk_View_Plain_Text_Get_Callback callback, void* user_data);
359   void InvokePlainTextGetCallback(const std::string& content_text, int plain_text_get_callback_id);
360   int SetEwkViewPlainTextGetCallback(Ewk_View_Plain_Text_Get_Callback callback, void* user_data);
361   void SetViewGeolocationPermissionCallback(Ewk_View_Geolocation_Permission_Callback callback, void* user_data);
362   bool InvokeViewGeolocationPermissionCallback(_Ewk_Geolocation_Permission_Request* geolocation_permission_request_context, Eina_Bool* result);
363   void SetViewUnfocusAllowCallback(Ewk_View_Unfocus_Allow_Callback callback, void* user_data);
364   bool InvokeViewUnfocusAllowCallback(Ewk_Unfocus_Direction direction, Eina_Bool* result);
365   void DidChangeContentsSize(int width, int height);
366   const Eina_Rectangle GetContentsSize() const;
367   void GetScrollSize(int* w, int* h);
368   void StopFinding();
369   void SetProgressValue(double progress);
370   double GetProgressValue();
371   const char* GetTitle();
372   bool SaveAsPdf(int width, int height, const std::string& file_name);
373   void BackForwardListClear();
374   _Ewk_Back_Forward_List* GetBackForwardList() const;
375   void InvokeBackForwardListChangedCallback();
376   _Ewk_History* GetBackForwardHistory() const;
377   bool WebAppCapableGet(Ewk_Web_App_Capable_Get_Callback callback, void *userData);
378   bool WebAppIconUrlGet(Ewk_Web_App_Icon_URL_Get_Callback callback, void *userData);
379   bool WebAppIconUrlsGet(Ewk_Web_App_Icon_URLs_Get_Callback callback, void *userData);
380   void InvokeWebAppCapableGetCallback(bool capable, int callbackId);
381   void InvokeWebAppIconUrlGetCallback(const std::string &iconUrl, int callbackId);
382   void InvokeWebAppIconUrlsGetCallback(const std::map<std::string, std::string> &iconUrls, int callbackId);
383   void SetNotificationPermissionCallback(Ewk_View_Notification_Permission_Callback callback, void* user_data);
384   bool IsNotificationPermissionCallbackSet() const;
385   bool InvokeNotificationPermissionCallback(Ewk_Notification_Permission_Request* request);
386
387   bool GetMHTMLData(Ewk_View_MHTML_Data_Get_Callback callback, void* user_data);
388   void OnMHTMLContentGet(const std::string& mhtml_content, int callback_id);
389   bool IsFullscreen();
390   void ExitFullscreen();
391   double GetScale();
392   void DidChangePageScaleFactor(double scale_factor);
393   void SetJavaScriptAlertCallback(Ewk_View_JavaScript_Alert_Callback callback, void* user_data);
394   void JavaScriptAlertReply();
395   void SetJavaScriptConfirmCallback(Ewk_View_JavaScript_Confirm_Callback callback, void* user_data);
396   void JavaScriptConfirmReply(bool result);
397   void SetJavaScriptPromptCallback(Ewk_View_JavaScript_Prompt_Callback callback, void* user_data);
398   void JavaScriptPromptReply(const char* result);
399   void set_renderer_crashed();
400   void GetPageScaleRange(double *min_scale, double *max_scale);
401   void DidChangePageScaleRange(double min_scale, double max_scale);
402   void SetDrawsTransparentBackground(bool enabled);
403   void GetSessionData(const char **data, unsigned *length) const;
404   bool RestoreFromSessionData(const char *data, unsigned length);
405   void ShowFileChooser(const content::FileChooserParams&);
406   void DidChangeContentsArea(int width, int height);
407   void SetBrowserFont();
408   void SetCertificatePem(const std::string& certificate);
409   bool IsDragging() const;
410
411   void RequestColorPicker(int r, int g, int b, int a);
412   void DismissColorPicker();
413   bool SetColorPickerColor(int r, int g, int b, int a);
414   void InputPickerShow(ui::TextInputType input_type, double input_value);
415   void OnSnapshot(const std::vector<unsigned char>& pixData, int width, int height, int snapshotId);
416
417   void ShowContentsDetectedPopup(const char*);
418
419   // Returns TCP port number with Inspector, or 0 if error.
420   int StartInspectorServer(int port = 0);
421   bool StopInspectorServer();
422
423   void LoadNotFoundErrorPage(const std::string& invalidUrl);
424   static std::string GetPlatformLocale();
425   bool GetLinkMagnifierEnabled() const;
426   void SetLinkMagnifierEnabled(bool enabled);
427
428   void SetOverrideEncoding(const std::string& encoding);
429   void SetViewMode(blink::WebViewMode view_mode);
430
431   gfx::Point GetContextMenuPosition() const;
432
433   content::ContextMenuControllerEfl* GetContextMenuController() {
434     return context_menu_.get();
435   }
436   void ResetContextMenuController();
437
438   /// ---- Event handling
439   bool HandleShow();
440   bool HandleHide();
441   bool HandleMove(int x, int y);
442   bool HandleResize(int width, int height);
443   bool HandleTextSelectionDown(int x, int y);
444   bool HandleTextSelectionUp(int x, int y);
445
446   void HandleRendererProcessCrash();
447   void HandlePostponedGesture(int x, int y, ui::EventType type);
448  private:
449   void InitializeContent();
450   void SendDelayedMessages(content::RenderViewHost* render_view_host);
451
452   void EvasToBlinkCords(int x, int y, int* view_x, int* view_y);
453   Eina_Bool AsyncRequestHitTestDataAtBlinkCords(int x, int y,
454       Ewk_Hit_Test_Mode mode,
455       WebViewAsyncRequestHitTestDataCallback* cb);
456   void HandleLongPressGesture(int x, int y, Ewk_Hit_Test_Mode mode,
457       _Ewk_Hit_Test*);
458   void HandleTapGesture(int x, int y, Ewk_Hit_Test_Mode mode,
459       _Ewk_Hit_Test*);
460   content::WebContentsViewEfl* GetWebContentsViewEfl() const;
461
462 #if defined(OS_TIZEN_MOBILE) && !defined(EWK_BRINGUP)
463   static void cameraResultCb(service_h request, service_h reply,
464     service_result_e result, void* data);
465 #endif
466
467 #if defined(OS_TIZEN_MOBILE) && !defined(EWK_BRINGUP)
468   bool LaunchCamera(base::string16 mimetype);
469 #endif
470   content::RenderWidgetHostViewEfl* rwhv() const;
471   JavaScriptDialogManagerEfl* GetJavaScriptDialogManagerEfl();
472
473   void ReleasePopupMenuList();
474
475   scoped_refptr<tizen_webview::WebViewEvasEventHandler> evas_event_handler_;
476   scoped_refptr<Ewk_Context> context_;
477   scoped_refptr<Ewk_Context> old_context_;
478   scoped_ptr<content::WebContents> web_contents_;
479   scoped_ptr<content::WebContentsDelegateEfl> web_contents_delegate_;
480   std::string pending_url_request_;
481   scoped_ptr<Ewk_Settings> settings_;
482   scoped_ptr<_Ewk_Frame> frame_;
483   scoped_ptr<_Ewk_Policy_Decision> window_policy_;
484   Evas_Object* evas_object_;
485   Evas_Object* native_view_;
486   bool touch_events_enabled_;
487   bool mouse_events_enabled_;
488   double text_zoom_factor_;
489   mutable std::string selected_text_;
490   mutable std::string user_agent_;
491   mutable std::string user_agent_app_name_;
492   scoped_ptr<_Ewk_Auth_Challenge> auth_challenge_;
493
494   Eina_List* popupMenuItems_;
495   Popup_Picker* popupPicker_;
496   bool formIsNavigating_;
497   typedef struct {
498     int count;
499     int position;
500     bool prevState;
501     bool nextState;
502   } formNavigation;
503   formNavigation formNavigation_;
504   scoped_ptr<content::ContextMenuControllerEfl> context_menu_;
505   scoped_ptr<content::FileChooserControllerEfl> file_chooser_;
506   scoped_ptr<content::PopupControllerEfl> popup_controller_;
507   scoped_ptr<content::SelectionControllerEfl> selection_controller_;
508   base::string16 previous_text_;
509   int current_find_request_id_;
510   static int find_request_id_counter_;
511   IDMap<EwkViewPlainTextGetCallback, IDMapOwnPointer> plain_text_get_callback_map_;
512   gfx::Size contents_size_;
513   double progress_;
514   mutable std::string title_;
515   mutable std::string pem_certificate_;
516   Hit_Test_Params hit_test_params_;
517   base::WaitableEvent hit_test_completion_;
518   IDMap<MHTMLCallbackDetails, IDMapOwnPointer> mhtml_callback_map_;
519   double page_scale_factor_;
520   double min_page_scale_factor_;
521   double max_page_scale_factor_;
522   scoped_ptr<OrientationLockCallback> orientation_lock_callback_;
523   scoped_ptr<WebViewGeolocationPermissionCallback> geolocation_permission_cb_;
524   scoped_ptr<WebViewUnfocusAllowCallback> unfocus_allow_cb_;
525   scoped_ptr<content::InputPicker> inputPicker_;
526   IDMap<WebApplicationIconUrlGetCallback, IDMapOwnPointer> web_app_icon_url_get_callback_map_;
527   IDMap<WebApplicationIconUrlsGetCallback, IDMapOwnPointer> web_app_icon_urls_get_callback_map_;
528   IDMap<WebApplicationCapableGetCallback, IDMapOwnPointer> web_app_capable_get_callback_map_;
529   IDMap< WebAppScreenshotCapturedCallback, IDMapOwnPointer> screen_capture_cb_map_;
530   scoped_ptr<NotificationPermissionCallback> notification_permission_callback_;
531   content::DevToolsDelegateEfl* inspector_server_;
532   scoped_ptr<ScrollDetector> scroll_detector_;
533 #if defined(OS_TIZEN_MOBILE)
534   content::FileChooserParams::Mode filechooser_mode_;
535 #endif
536   bool is_initialized_;
537
538   scoped_ptr<_Ewk_Back_Forward_List> back_forward_list_;
539
540   static content::WebContentsEflDelegate::WebContentsCreateCallback
541       create_new_window_web_contents_cb_;
542
543 private:
544   Eina_Bool AsyncRequestHitTestPrivate(
545       int x, int y, Ewk_Hit_Test_Mode mode,
546       AsyncHitTestRequest* asyncHitTestRequest);
547
548   gfx::Vector2d previous_scroll_position_;
549
550   gfx::Point context_menu_position_;
551
552   std::set<IPC::Message*> delayed_messages_;
553
554   std::map<int64_t, WebViewAsyncRequestHitTestDataCallback*> hit_test_callback_;
555 };
556
557 namespace tizen_webview {
558 typedef ::EWebView WebViewImpl;
559 };
560
561 const unsigned int g_default_tilt_motion_sensitivity = 3;
562
563
564 #endif