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