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