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