[EWK_REFACTOR bug] Remove EWebView::ScrollFocusedEditableNode()
[platform/framework/web/chromium-efl.git] / tizen_src / ewk / efl_integration / eweb_view.h
1 // Copyright 2014 Samsung Electronics. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef EWEB_VIEW_H
6 #define EWEB_VIEW_H
7
8 #if defined(OS_TIZEN_MOBILE)
9 #if !defined(EWK_BRINGUP)
10 // FIXME: appfw/app_service.h is no more in Tizen 2.3, figure out what to include instead.
11 #include <appcore-agent/service_app.h>
12 #endif
13 #include <vector>
14 #endif
15
16 #include <map>
17 #include <string>
18 #include <Evas.h>
19 #include <locale.h>
20
21 #include "base/callback.h"
22 #include "base/memory/scoped_ptr.h"
23 #include "base/synchronization/waitable_event.h"
24 #include "content/public/common/context_menu_params.h"
25 #include "content/public/common/file_chooser_params.h"
26 #include "content/browser/renderer_host/event_with_latency_info.h"
27 #include "content/common/input/input_event_ack_state.h"
28 #include "content/public/browser/navigation_controller.h"
29 #include "content/public/browser/web_contents_delegate.h"
30 #include "content/public/common/menu_item.h"
31 #include "base/id_map.h"
32 #include "context_menu_controller_efl.h"
33 #include "eweb_context.h"
34 #include "ewk_touch.h"
35 #include "private/ewk_history_private.h"
36 #include "private/ewk_hit_test_private.h"
37 #include "private/ewk_auth_challenge_private.h"
38 #include "private/ewk_back_forward_list_private.h"
39 #include "private/ewk_settings_private.h"
40 #include "private/ewk_web_application_icon_data_private.h"
41 #include "public/ewk_view.h"
42 #include "eweb_view_callbacks.h"
43 #include "scroll_detector.h"
44 #include "selection_controller_efl.h"
45 #include "web_contents_delegate_efl.h"
46 #include "context_menu_controller_efl.h"
47 #include "file_chooser_controller_efl.h"
48 #include "ui/gfx/geometry/point.h"
49 #include "ui/gfx/geometry/size.h"
50 #include "browser/inputpicker/InputPicker.h"
51 #include "tizen_webview/public/tw_hit_test.h"
52 #include "popup_controller_efl.h"
53
54 #if defined(OS_TIZEN)
55 #include "browser/selectpicker/popup_picker.h"
56 #endif
57
58 #include "tizen_webview/public/tw_hit_test.h"
59 #include "tizen_webview/public/tw_callbacks.h"
60
61 namespace content {
62 class RenderViewHost;
63 class RenderWidgetHostViewEfl;
64 class WebContentsDelegateEfl;
65 class ContextMenuControllerEfl;
66 class DevToolsDelegateEfl;
67 class WebContentsViewEfl;
68 class PopupControllerEfl;
69 }
70
71 namespace ui {
72 class GestureRecognizer;
73 class GestureEvent;
74 class TouchEvent;
75 }
76
77 namespace tizen_webview {
78 class Hit_Test;
79 class WebContext;
80 class WebView;
81 class WebViewDelegate;
82 class WebViewEvasEventHandler;
83 }
84
85 class ErrorParams;
86 class _Ewk_Policy_Decision;
87
88 class WebAppScreenshotCapturedCallback : public base::RefCounted<WebAppScreenshotCapturedCallback> {
89  public:
90       WebAppScreenshotCapturedCallback(tizen_webview::Web_App_Screenshot_Captured_Callback func, void *user_data, Evas* canvas)
91           : func_(func), user_data_(user_data), canvas_(canvas) {}
92   void Run(Evas_Object* image) {
93     if (func_ != NULL)
94       (func_)(image, user_data_);
95   }
96
97  private:
98   tizen_webview::Web_App_Screenshot_Captured_Callback func_;
99   void *user_data_;
100   Evas* canvas_;
101 };
102
103 class EwkViewPlainTextGetCallback {
104  public:
105   EwkViewPlainTextGetCallback(tizen_webview::View_Plain_Text_Get_Callback callback,
106                               void* user_data)
107     : callback_(callback), user_data_(user_data)
108     { }
109   void TriggerCallback(Evas_Object* obj, const std::string& content_text);
110
111  private:
112   tizen_webview::View_Plain_Text_Get_Callback callback_;
113   void* user_data_;
114 };
115
116 class OrientationLockCallback {
117  public:
118   OrientationLockCallback(tizen_webview::Orientation_Lock_Cb lock,
119                           void* user_data)
120     : lock_(lock),
121       user_data_(user_data)
122     {}
123   private:
124     tizen_webview::Orientation_Lock_Cb lock_;
125     void* user_data_;
126 };
127
128 class MHTMLCallbackDetails {
129  public:
130   MHTMLCallbackDetails(tizen_webview::View_MHTML_Data_Get_Callback callback_func, void *user_data)
131     : callback_func_(callback_func),
132       user_data_(user_data)
133   {}
134   void Run(Evas_Object* obj, const std::string& mhtml_content);
135
136   tizen_webview::View_MHTML_Data_Get_Callback callback_func_;
137   void *user_data_;
138 };
139
140 class WebApplicationIconUrlGetCallback {
141  public:
142   WebApplicationIconUrlGetCallback(tizen_webview::Web_App_Icon_URL_Get_Callback func, void *user_data)
143     : func_(func), user_data_(user_data)
144   {}
145   void Run(const std::string &url) {
146     if (func_) {
147       (func_)(url.c_str(), user_data_);
148     }
149   }
150
151  private:
152   tizen_webview::Web_App_Icon_URL_Get_Callback func_;
153   void *user_data_;
154 };
155
156 class WebApplicationIconUrlsGetCallback {
157  public:
158   WebApplicationIconUrlsGetCallback(tizen_webview::Web_App_Icon_URLs_Get_Callback func, void *user_data)
159     : func_(func), user_data_(user_data)
160   {}
161   void Run(const std::map<std::string, std::string> &urls) {
162     if (func_) {
163       Eina_List *list = NULL;
164       for (std::map<std::string, std::string>::const_iterator it = urls.begin(); it != urls.end(); ++it) {
165         _Ewk_Web_App_Icon_Data *data = ewkWebAppIconDataCreate(it->first, it->second);
166         list = eina_list_append(list, data);
167       }
168       (func_)(list, user_data_);
169     }
170   }
171
172  private:
173   tizen_webview::Web_App_Icon_URLs_Get_Callback func_;
174   void *user_data_;
175 };
176
177 class WebApplicationCapableGetCallback {
178  public:
179   WebApplicationCapableGetCallback(tizen_webview::Web_App_Capable_Get_Callback func, void *user_data)
180     : func_(func), user_data_(user_data)
181   {}
182   void Run(bool capable) {
183     if (func_) {
184       (func_)(capable ? EINA_TRUE : EINA_FALSE, user_data_);
185     }
186   }
187
188  private:
189   tizen_webview::Web_App_Capable_Get_Callback func_;
190   void *user_data_;
191 };
192
193 class AsyncHitTestRequest;
194 class NotificationPermissionCallback {
195  public:
196   NotificationPermissionCallback(
197       Evas_Object* obj,
198       tizen_webview::View_Notification_Permission_Callback func,
199       void* user_data)
200       : obj_(obj), func_(func), user_data_(user_data) {}
201   bool Run(Ewk_Notification_Permission_Request* request) {
202     if (func_) {
203       return (func_)(obj_, request, user_data_) == EINA_TRUE;
204     }
205     return false;
206   }
207
208 private:
209   Evas_Object* obj_;
210   tizen_webview::View_Notification_Permission_Callback func_;
211   void* user_data_;
212 };
213
214 class WebViewAsyncRequestHitTestDataCallback;
215 class JavaScriptDialogManagerEfl;
216 class WebViewGeolocationPermissionCallback;
217 class WebViewUnfocusAllowCallback;
218
219 class EWebView {
220  public:
221   static EWebView* FromEvasObject(Evas_Object* eo);
222   static int GetOrientation();
223
224   // initialize data members and activate event handlers.
225   // call this once after created and before use
226   void Initialize();
227
228   void CreateNewWindow(content::WebContentsDelegate::WebContentsCreateCallback);
229   static Evas_Object* GetHostWindowDelegate(const content::WebContents*);
230
231   tizen_webview::WebView* GetPublicWebView();
232   tizen_webview::WebContext* context() const { return context_.get(); }
233   Evas_Object* evas_object() const { return evas_object_; }
234   Evas* GetEvas() const { return evas_object_evas_get(evas_object_); }
235
236   content::WebContents& web_contents() const
237   {
238     return *web_contents_.get();
239   }
240
241   template<EWebViewCallbacks::CallbackType callbackType>
242   EWebViewCallbacks::CallBack<callbackType> SmartCallback() const
243   {
244     return EWebViewCallbacks::CallBack<callbackType>(evas_object_);
245   }
246
247   void set_magnifier(bool status);
248
249   // ewk_view api
250   void SetURL(const char* url_string);
251   const char* GetURL() const;
252   void Reload();
253   void ReloadIgnoringCache();
254   Eina_Bool CanGoBack();
255   Eina_Bool CanGoForward();
256   Eina_Bool HasFocus() const;
257   void SetFocus(Eina_Bool focus);
258   Eina_Bool GoBack();
259   Eina_Bool GoForward();
260   void Suspend();
261   void Resume();
262   void Stop();
263   double GetTextZoomFactor() const;
264   void SetTextZoomFactor(double text_zoom_factor);
265   void ExecuteEditCommand(const char* command, const char* value);
266   void SetOrientation(int orientation);
267   void SetOrientationLockCallback(tizen_webview::Orientation_Lock_Cb func, void* data);
268   bool TouchEventsEnabled() const;
269   void SetTouchEventsEnabled(bool enabled);
270   bool MouseEventsEnabled() const;
271   void SetMouseEventsEnabled(bool enabled);
272   void HandleTouchEvents(Ewk_Touch_Event_Type type, const Eina_List *points, const Evas_Modifier *modifiers);
273   void Show();
274   void Hide();
275   bool ExecuteJavaScript(const char* script, tizen_webview::View_Script_Execute_Callback callback, void* userdata);
276   bool SetUserAgent(const char* userAgent);
277   bool SetUserAgentAppName(const char* application_name);
278   bool SetPrivateBrowsing(bool incognito);
279   bool GetPrivateBrowsing() const;
280   const char* GetUserAgent() const;
281   const char* GetUserAgentAppName() const;
282   const char* GetSelectedText() const;
283   bool IsLastAvailableTextEmpty() const;
284   Ewk_Settings* GetSettings();
285   _Ewk_Frame* GetMainFrame();
286   void UpdateWebKitPreferences();
287   void LoadHTMLString(const char* html, const char* base_uri, const char* unreachable_uri);
288   void LoadPlainTextString(const char* plain_text);
289   void LoadData(const char* data, size_t size, const char* mime_type, const char* encoding, const char* base_uri, const char* unreachable_uri = NULL);
290   void InvokeLoadError(const ErrorParams &error);
291   void InvokeAuthCallback(LoginDelegateEfl* login_delegate, const GURL& url, const std::string& realm);
292   void Find(const char* text, Ewk_Find_Options);
293   void InvokeAuthCallbackOnUI(_Ewk_Auth_Challenge* auth_challenge);
294   void SetContentSecurityPolicy(const char* policy, Ewk_CSP_Header_Type type);
295   void ShowPopupMenu(const std::vector<content::MenuItem>& items,
296                      int selectedIndex, bool multiple);
297   Eina_Bool HidePopupMenu();
298   void UpdateFormNavigation(int formElementCount, int currentNodeIndex,
299       bool prevState, bool nextState);
300   void FormNavigate(bool direction);
301   bool IsSelectPickerShown() const;
302   void CloseSelectPicker();
303   bool FormIsNavigating() const { return formIsNavigating_; }
304   void SetFormIsNavigating(bool formIsNavigating);
305   Eina_Bool PopupMenuUpdate(Eina_List* items, int selectedIndex);
306   Eina_Bool DidSelectPopupMenuItem(int selectedIndex);
307   Eina_Bool DidMultipleSelectPopupMenuItem(std::vector<int>& selectedIndices);
308   Eina_Bool PopupMenuClose();
309   void ShowContextMenu(
310       const content::ContextMenuParams& params,
311       content::ContextMenuType type = content::MENU_TYPE_LINK,
312       bool show_selection = true);
313   void CancelContextMenu(int request_id);
314   void SetScale(double scale_factor, int x, int y);
315   bool GetScrollPosition(int* x, int* y) const;
316   void SetScroll(int x, int y);
317   void UrlRequestSet(const char* url,
318       content::NavigationController::LoadURLType loadtype,
319       Eina_Hash* headers,
320       const char* body);
321
322   content::SelectionControllerEfl* GetSelectionController() const { return selection_controller_.get(); }
323   content::PopupControllerEfl* GetPopupController() const { return popup_controller_.get(); }
324   ScrollDetector* GetScrollDetector() const { return scroll_detector_.get(); }
325   void SelectRange(const gfx::Point& start, const gfx::Point& end);
326   void MoveCaret(const gfx::Point& point);
327   void QuerySelectionStyle();
328   void OnQuerySelectionStyleReply(const SelectionStylePrams& params);
329   void SelectClosestWord(const gfx::Point& touch_point);
330   void SelectLinkText(const gfx::Point& touch_point);
331   bool GetSelectionRange(Eina_Rectangle* left_rect, Eina_Rectangle* right_rect);
332   void GetSnapShotForRect(gfx::Rect& rect);
333
334   // Callback OnCopyFromBackingStore will be called once we get the snapshot from render
335   void OnCopyFromBackingStore(bool success, const SkBitmap& bitmap);
336
337   /**
338    * Creates a snapshot of given rectangle from EWebView
339    *
340    * @param rect rectangle of EWebView which will be taken into snapshot
341    *
342    * @return created snapshot or NULL if error occured.
343    * @note ownership of snapshot is passed to caller
344   */
345   Evas_Object* GetSnapshot(Eina_Rectangle rect);
346
347   bool GetSnapshotAsync(Eina_Rectangle rect, Evas* canvas, tizen_webview::Web_App_Screenshot_Captured_Callback callback, void* user_data);
348   void InvokePolicyResponseCallback(_Ewk_Policy_Decision* policy_decision);
349   void InvokePolicyNavigationCallback(content::RenderViewHost* rvh,
350       NavigationPolicyParams params, bool* handled);
351   void UseSettingsFont();
352
353   tizen_webview::Hit_Test* RequestHitTestDataAt(int x, int y,
354       tizen_webview::Hit_Test_Mode mode);
355   Eina_Bool AsyncRequestHitTestDataAt(int x, int y,
356       tizen_webview::Hit_Test_Mode mode,
357       tizen_webview::View_Hit_Test_Request_Callback,
358       void* user_data);
359   tizen_webview::Hit_Test* RequestHitTestDataAtBlinkCoords(int x, int y,
360       tizen_webview::Hit_Test_Mode mode);
361   Eina_Bool AsyncRequestHitTestDataAtBlinkCords(int x, int y,
362       tizen_webview::Hit_Test_Mode mode,
363       tizen_webview::View_Hit_Test_Request_Callback,
364       void* user_data);
365   void DispatchAsyncHitTestData(const Hit_Test_Params& params, int64_t request_id);
366   void UpdateHitTestData(const Hit_Test_Params& params);
367
368   int current_find_request_id() const { return current_find_request_id_; }
369   bool PlainTextGet(tizen_webview::View_Plain_Text_Get_Callback callback, void* user_data);
370   void InvokePlainTextGetCallback(const std::string& content_text, int plain_text_get_callback_id);
371   int SetEwkViewPlainTextGetCallback(tizen_webview::View_Plain_Text_Get_Callback callback, void* user_data);
372   void SetViewGeolocationPermissionCallback(tizen_webview::View_Geolocation_Permission_Callback callback, void* user_data);
373   bool InvokeViewGeolocationPermissionCallback(void* geolocation_permission_request_context, Eina_Bool* result);
374   void SetViewUnfocusAllowCallback(tizen_webview::View_Unfocus_Allow_Callback callback, void* user_data);
375   bool InvokeViewUnfocusAllowCallback(tizen_webview::Unfocus_Direction direction, Eina_Bool* result);
376   void DidChangeContentsSize(int width, int height);
377   const Eina_Rectangle GetContentsSize() const;
378   void GetScrollSize(int* w, int* h);
379   void StopFinding();
380   void SetProgressValue(double progress);
381   double GetProgressValue();
382   const char* GetTitle();
383   bool SaveAsPdf(int width, int height, const std::string& file_name);
384   void BackForwardListClear();
385   _Ewk_Back_Forward_List* GetBackForwardList() const;
386   void InvokeBackForwardListChangedCallback();
387   _Ewk_History* GetBackForwardHistory() const;
388   bool WebAppCapableGet(tizen_webview::Web_App_Capable_Get_Callback callback, void *userData);
389   bool WebAppIconUrlGet(tizen_webview::Web_App_Icon_URL_Get_Callback callback, void *userData);
390   bool WebAppIconUrlsGet(tizen_webview::Web_App_Icon_URLs_Get_Callback callback, void *userData);
391   void InvokeWebAppCapableGetCallback(bool capable, int callbackId);
392   void InvokeWebAppIconUrlGetCallback(const std::string &iconUrl, int callbackId);
393   void InvokeWebAppIconUrlsGetCallback(const std::map<std::string, std::string> &iconUrls, int callbackId);
394   void SetNotificationPermissionCallback(tizen_webview::View_Notification_Permission_Callback callback, void* user_data);
395   bool IsNotificationPermissionCallbackSet() const;
396   bool InvokeNotificationPermissionCallback(Ewk_Notification_Permission_Request* request);
397
398   bool GetMHTMLData(tizen_webview::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(tizen_webview::View_JavaScript_Alert_Callback callback, void* user_data);
405   void JavaScriptAlertReply();
406   void SetJavaScriptConfirmCallback(tizen_webview::View_JavaScript_Confirm_Callback callback, void* user_data);
407   void JavaScriptConfirmReply(bool result);
408   void SetJavaScriptPromptCallback(tizen_webview::View_JavaScript_Prompt_Callback callback, void* user_data);
409   void JavaScriptPromptReply(const char* result);
410   void set_renderer_crashed();
411   void GetPageScaleRange(double *min_scale, double *max_scale);
412   void DidChangePageScaleRange(double min_scale, double max_scale);
413   void SetDrawsTransparentBackground(bool enabled);
414   void GetSessionData(const char **data, unsigned *length) const;
415   bool RestoreFromSessionData(const char *data, unsigned length);
416   void ShowFileChooser(const content::FileChooserParams&);
417   void DidChangeContentsArea(int width, int height);
418   void SetBrowserFont();
419   void SetCertificatePem(const std::string& certificate);
420   bool IsDragging() const;
421
422   void RequestColorPicker(int r, int g, int b, int a);
423   void DismissColorPicker();
424   bool SetColorPickerColor(int r, int g, int b, int a);
425   void InputPickerShow(ui::TextInputType input_type, double input_value);
426   void OnSnapshot(const std::vector<unsigned char>& pixData, int width, int height, int snapshotId);
427
428   void ShowContentsDetectedPopup(const char*);
429
430   bool IsIMEShow();
431   gfx::Rect GetIMERect();
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 SetViewMode(blink::WebViewMode view_mode);
444
445   gfx::Point GetContextMenuPosition() const;
446
447   void SendDelayedMessages(content::RenderViewHost* render_view_host);
448
449   /// ---- Event handling
450   bool HandleShow();
451   bool HandleHide();
452   bool HandleMove(int x, int y);
453   bool HandleResize(int width, int height);
454   bool HandleTextSelectionDown(int x, int y);
455   bool HandleTextSelectionUp(int x, int y);
456
457   void HandleRendererProcessCrash();
458   void HandlePostponedGesture(int x, int y, ui::EventType type);
459  private:
460   void InitializeContent();
461   void EvasToBlinkCords(int x, int y, int* view_x, int* view_y);
462   Eina_Bool AsyncRequestHitTestDataAtBlinkCords(int x, int y,
463       tizen_webview::Hit_Test_Mode mode,
464       WebViewAsyncRequestHitTestDataCallback* cb);
465   void HandleLongPressGesture(int x, int y, tizen_webview::Hit_Test_Mode mode,
466       tizen_webview::Hit_Test*);
467   void HandleTapGesture(int x, int y, tizen_webview::Hit_Test_Mode mode,
468       tizen_webview::Hit_Test*);
469   content::WebContentsViewEfl* GetWebContentsViewEfl() const;
470
471 #if defined(OS_TIZEN_MOBILE) && !defined(EWK_BRINGUP)
472   static void cameraResultCb(service_h request, service_h reply,
473     service_result_e result, void* data);
474 #endif
475
476 #if defined(OS_TIZEN_MOBILE) && !defined(EWK_BRINGUP)
477   bool LaunchCamera(base::string16 mimetype);
478 #endif
479   content::RenderWidgetHostViewEfl* rwhv() const;
480   JavaScriptDialogManagerEfl* GetJavaScriptDialogManagerEfl();
481
482 #if defined(OS_TIZEN)
483   void ReleasePopupMenuList();
484 #endif
485
486   tizen_webview::WebView* public_webview_;
487   scoped_refptr<tizen_webview::WebContext> context_;
488   scoped_refptr<tizen_webview::WebContext> old_context_;
489   scoped_ptr<content::WebContents> web_contents_;
490   scoped_ptr<content::WebContentsDelegateEfl> web_contents_delegate_;
491   std::string pending_url_request_;
492   scoped_ptr<Ewk_Settings> settings_;
493   scoped_ptr<_Ewk_Frame> frame_;
494   scoped_ptr<_Ewk_Policy_Decision> window_policy_;
495   Evas_Object* evas_object_;
496   Evas_Object* native_view_;
497   bool touch_events_enabled_;
498   bool mouse_events_enabled_;
499   double text_zoom_factor_;
500   mutable std::string selected_text_;
501   mutable std::string user_agent_;
502   mutable std::string user_agent_app_name_;
503   scoped_ptr<_Ewk_Auth_Challenge> auth_challenge_;
504
505 #if defined(OS_TIZEN)
506   Eina_List* popupMenuItems_;
507   Popup_Picker* popupPicker_;
508 #endif
509   bool formIsNavigating_;
510   typedef struct {
511     int count;
512     int position;
513     bool prevState;
514     bool nextState;
515   } formNavigation;
516   formNavigation formNavigation_;
517   scoped_ptr<content::ContextMenuControllerEfl> context_menu_;
518   scoped_ptr<content::FileChooserControllerEfl> file_chooser_;
519   scoped_ptr<content::PopupControllerEfl> popup_controller_;
520   scoped_ptr<content::SelectionControllerEfl> selection_controller_;
521   base::string16 previous_text_;
522   int current_find_request_id_;
523   static int find_request_id_counter_;
524   IDMap<EwkViewPlainTextGetCallback, IDMapOwnPointer> plain_text_get_callback_map_;
525   gfx::Size contents_size_;
526   double progress_;
527   mutable std::string title_;
528   mutable std::string pem_certificate_;
529   Hit_Test_Params hit_test_params_;
530   base::WaitableEvent hit_test_completion_;
531   IDMap<MHTMLCallbackDetails, IDMapOwnPointer> mhtml_callback_map_;
532   double page_scale_factor_;
533   double min_page_scale_factor_;
534   double max_page_scale_factor_;
535   scoped_ptr<OrientationLockCallback> orientation_lock_callback_;
536   scoped_ptr<WebViewGeolocationPermissionCallback> geolocation_permission_cb_;
537   scoped_ptr<WebViewUnfocusAllowCallback> unfocus_allow_cb_;
538   scoped_ptr<content::InputPicker> inputPicker_;
539   IDMap<WebApplicationIconUrlGetCallback, IDMapOwnPointer> web_app_icon_url_get_callback_map_;
540   IDMap<WebApplicationIconUrlsGetCallback, IDMapOwnPointer> web_app_icon_urls_get_callback_map_;
541   IDMap<WebApplicationCapableGetCallback, IDMapOwnPointer> web_app_capable_get_callback_map_;
542   IDMap< WebAppScreenshotCapturedCallback, IDMapOwnPointer> screen_capture_cb_map_;
543   scoped_ptr<NotificationPermissionCallback> notification_permission_callback_;
544   content::DevToolsDelegateEfl* inspector_server_;
545   scoped_ptr<ScrollDetector> scroll_detector_;
546 #if defined(OS_TIZEN_MOBILE)
547   content::FileChooserParams::Mode filechooser_mode_;
548 #endif
549   bool is_initialized_;
550
551   scoped_ptr<_Ewk_Back_Forward_List> back_forward_list_;
552
553   static content::WebContentsDelegate::WebContentsCreateCallback
554       create_new_window_web_contents_cb_;
555
556 private:
557   Eina_Bool AsyncRequestHitTestPrivate(
558       int x, int y, tizen_webview::Hit_Test_Mode mode,
559       AsyncHitTestRequest* asyncHitTestRequest);
560
561   gfx::Vector2d previous_scroll_position_;
562
563   gfx::Point context_menu_position_;
564
565   std::set<IPC::Message*> delayed_messages_;
566
567   std::map<int64_t, WebViewAsyncRequestHitTestDataCallback*> hit_test_callback_;
568   // only tizen_webview::WebView can create and delete this
569   EWebView(tizen_webview::WebView* owner, tizen_webview::WebContext*, Evas_Object* smart_object);
570   ~EWebView();
571   friend class tizen_webview::WebView;
572   friend class tizen_webview::WebViewEvasEventHandler;
573 };
574
575 namespace tizen_webview {
576 typedef ::EWebView WebViewImpl;
577 };
578
579 const unsigned int g_default_tilt_motion_sensitivity = 3;
580
581
582 #endif