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