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