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