Remove leftover code from EWebView
[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() { return settings_.get(); }
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 SelectLinkText(const gfx::Point& touch_point);
309   bool GetSelectionRange(Eina_Rectangle* left_rect, Eina_Rectangle* right_rect);
310   Eina_Bool ClearSelection();
311
312   // Callback OnCopyFromBackingStore will be called once we get the snapshot from render
313   void OnCopyFromBackingStore(bool success, const SkBitmap& bitmap);
314
315   void RenderViewCreated(content::RenderViewHost* render_view_host);
316
317   /**
318    * Creates a snapshot of given rectangle from EWebView
319    *
320    * @param rect rectangle of EWebView which will be taken into snapshot
321    *
322    * @return created snapshot or NULL if error occured.
323    * @note ownership of snapshot is passed to caller
324   */
325   Evas_Object* GetSnapshot(Eina_Rectangle rect);
326
327   bool GetSnapshotAsync(Eina_Rectangle rect, Ewk_Web_App_Screenshot_Captured_Callback callback, void* user_data);
328   void InvokePolicyResponseCallback(_Ewk_Policy_Decision* policy_decision);
329   void InvokePolicyNavigationCallback(content::RenderViewHost* rvh,
330       NavigationPolicyParams params, bool* handled);
331   void UseSettingsFont();
332
333   _Ewk_Hit_Test* RequestHitTestDataAt(int x, int y, Ewk_Hit_Test_Mode mode);
334   Eina_Bool AsyncRequestHitTestDataAt(int x, int y,
335       Ewk_Hit_Test_Mode mode,
336       Ewk_View_Hit_Test_Request_Callback,
337       void* user_data);
338   _Ewk_Hit_Test* RequestHitTestDataAtBlinkCoords(int x, int y,
339       Ewk_Hit_Test_Mode mode);
340   Eina_Bool AsyncRequestHitTestDataAtBlinkCords(int x, int y,
341       Ewk_Hit_Test_Mode mode,
342       Ewk_View_Hit_Test_Request_Callback,
343       void* user_data);
344   void DispatchAsyncHitTestData(const Hit_Test_Params& params, int64_t request_id);
345   void UpdateHitTestData(const Hit_Test_Params& params);
346
347   int current_find_request_id() const { return current_find_request_id_; }
348   bool PlainTextGet(Ewk_View_Plain_Text_Get_Callback callback, void* user_data);
349   void InvokePlainTextGetCallback(const std::string& content_text, int plain_text_get_callback_id);
350   int SetEwkViewPlainTextGetCallback(Ewk_View_Plain_Text_Get_Callback callback, void* user_data);
351   void SetViewGeolocationPermissionCallback(Ewk_View_Geolocation_Permission_Callback callback, void* user_data);
352   bool InvokeViewGeolocationPermissionCallback(_Ewk_Geolocation_Permission_Request* geolocation_permission_request_context, Eina_Bool* result);
353   void SetViewUserMediaPermissionCallback(
354       Ewk_View_User_Media_Permission_Callback callback,
355       void* user_data);
356   bool InvokeViewUserMediaPermissionCallback(
357       _Ewk_User_Media_Permission_Request* user_media_permission_request_context,
358       Eina_Bool* result);
359   void SetViewUnfocusAllowCallback(Ewk_View_Unfocus_Allow_Callback callback, void* user_data);
360   bool InvokeViewUnfocusAllowCallback(Ewk_Unfocus_Direction direction, Eina_Bool* result);
361   void DidChangeContentsSize(int width, int height);
362   const Eina_Rectangle GetContentsSize() const;
363   void GetScrollSize(int* w, int* h);
364   void StopFinding();
365   void SetProgressValue(double progress);
366   double GetProgressValue();
367   const char* GetTitle();
368   bool SaveAsPdf(int width, int height, const std::string& file_name);
369   void BackForwardListClear();
370   _Ewk_Back_Forward_List* GetBackForwardList() const;
371   void InvokeBackForwardListChangedCallback();
372   _Ewk_History* GetBackForwardHistory() const;
373   bool WebAppCapableGet(Ewk_Web_App_Capable_Get_Callback callback, void *userData);
374   bool WebAppIconUrlGet(Ewk_Web_App_Icon_URL_Get_Callback callback, void *userData);
375   bool WebAppIconUrlsGet(Ewk_Web_App_Icon_URLs_Get_Callback callback, void *userData);
376   void InvokeWebAppCapableGetCallback(bool capable, int callbackId);
377   void InvokeWebAppIconUrlGetCallback(const std::string &iconUrl, int callbackId);
378   void InvokeWebAppIconUrlsGetCallback(const std::map<std::string, std::string> &iconUrls, int callbackId);
379   void SetNotificationPermissionCallback(Ewk_View_Notification_Permission_Callback callback, void* user_data);
380   bool IsNotificationPermissionCallbackSet() const;
381   bool InvokeNotificationPermissionCallback(Ewk_Notification_Permission_Request* request);
382
383   bool GetMHTMLData(Ewk_View_MHTML_Data_Get_Callback callback, void* user_data);
384   void OnMHTMLContentGet(const std::string& mhtml_content, int callback_id);
385   bool IsFullscreen();
386   void ExitFullscreen();
387   double GetScale();
388   void DidChangePageScaleFactor(double scale_factor);
389   void SetJavaScriptAlertCallback(Ewk_View_JavaScript_Alert_Callback callback, void* user_data);
390   void JavaScriptAlertReply();
391   void SetJavaScriptConfirmCallback(Ewk_View_JavaScript_Confirm_Callback callback, void* user_data);
392   void JavaScriptConfirmReply(bool result);
393   void SetJavaScriptPromptCallback(Ewk_View_JavaScript_Prompt_Callback callback, void* user_data);
394   void JavaScriptPromptReply(const char* result);
395   void set_renderer_crashed();
396   void GetPageScaleRange(double *min_scale, double *max_scale);
397   void SetDrawsTransparentBackground(bool enabled);
398   void GetSessionData(const char **data, unsigned *length) const;
399   bool RestoreFromSessionData(const char *data, unsigned length);
400   void ShowFileChooser(const content::FileChooserParams&);
401   void SetBrowserFont();
402   void SetCertificatePem(const std::string& certificate);
403   bool IsDragging() const;
404
405   void RequestColorPicker(int r, int g, int b, int a);
406   void DismissColorPicker();
407   bool SetColorPickerColor(int r, int g, int b, int a);
408   void InputPickerShow(ui::TextInputType input_type, double input_value);
409
410   void ShowContentsDetectedPopup(const char*);
411
412   // Returns TCP port number with Inspector, or 0 if error.
413   int StartInspectorServer(int port = 0);
414   bool StopInspectorServer();
415
416   void LoadNotFoundErrorPage(const std::string& invalidUrl);
417   static std::string GetPlatformLocale();
418   bool GetLinkMagnifierEnabled() const;
419   void SetLinkMagnifierEnabled(bool enabled);
420
421   void SetOverrideEncoding(const std::string& encoding);
422   void SetQuotaPermissionRequestCallback(Ewk_Quota_Permission_Request_Callback callback,
423                                          void* user_data);
424   void InvokeQuotaPermissionRequest(_Ewk_Quota_Permission_Request* request,
425                                     const content::QuotaPermissionContext::PermissionCallback& cb);
426   void QuotaRequestReply(const _Ewk_Quota_Permission_Request *request,
427                          bool allow);
428   void QuotaRequestCancel(const _Ewk_Quota_Permission_Request *request);
429
430   void SetViewMode(blink::WebViewMode view_mode);
431
432   gfx::Point GetContextMenuPosition() const;
433
434   content::ContextMenuControllerEfl* GetContextMenuController() {
435     return context_menu_.get();
436   }
437   void ResetContextMenuController();
438
439   /// ---- Event handling
440   bool HandleShow();
441   bool HandleHide();
442   bool HandleMove(int x, int y);
443   bool HandleResize(int width, int height);
444   bool HandleTextSelectionDown(int x, int y);
445   bool HandleTextSelectionUp(int x, int y);
446
447   void HandleRendererProcessCrash();
448   void InvokeWebProcessCrashedCallback();
449
450   void HandleTapGestureForSelection(bool is_content_editable);
451   void HandleZoomGesture(blink::WebGestureEvent& event);
452
453  private:
454   void InitializeContent();
455   void SendDelayedMessages(content::RenderViewHost* render_view_host);
456
457   void EvasToBlinkCords(int x, int y, int* view_x, int* view_y);
458   Eina_Bool AsyncRequestHitTestDataAtBlinkCords(int x, int y,
459       Ewk_Hit_Test_Mode mode,
460       WebViewAsyncRequestHitTestDataCallback* cb);
461
462   content::WebContentsViewEfl* GetWebContentsViewEfl() const;
463
464 #if defined(OS_TIZEN_MOBILE) && !defined(EWK_BRINGUP)
465   static void cameraResultCb(service_h request, service_h reply,
466     service_result_e result, void* data);
467 #endif
468
469 #if defined(OS_TIZEN_MOBILE) && !defined(EWK_BRINGUP)
470   bool LaunchCamera(base::string16 mimetype);
471 #endif
472   content::RenderWidgetHostViewEfl* rwhv() const;
473   JavaScriptDialogManagerEfl* GetJavaScriptDialogManagerEfl();
474
475   void ReleasePopupMenuList();
476
477   void ShowContextMenuInternal(const content::ContextMenuParams&);
478
479   void UpdateWebkitPreferencesEfl(content::RenderViewHost*);
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   gfx::Vector2d previous_scroll_position_;
550
551   gfx::Point context_menu_position_;
552
553   std::vector<IPC::Message*> delayed_messages_;
554
555   std::map<int64_t, WebViewAsyncRequestHitTestDataCallback*> hit_test_callback_;
556 };
557
558 const unsigned int g_default_tilt_motion_sensitivity = 3;
559
560
561 #endif