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