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