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