[EWK_REFACTOR] Remove SelectRange() in EWebView
[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 MoveCaret(const gfx::Point& point);
322   void QuerySelectionStyle();
323   void OnQuerySelectionStyleReply(const SelectionStylePrams& params);
324   void SelectClosestWord(const gfx::Point& touch_point);
325   void SelectLinkText(const gfx::Point& touch_point);
326   bool GetSelectionRange(Eina_Rectangle* left_rect, Eina_Rectangle* right_rect);
327   void GetSnapShotForRect(gfx::Rect& rect);
328
329   // Callback OnCopyFromBackingStore will be called once we get the snapshot from render
330   void OnCopyFromBackingStore(bool success, const SkBitmap& bitmap);
331
332   /**
333    * Creates a snapshot of given rectangle from EWebView
334    *
335    * @param rect rectangle of EWebView which will be taken into snapshot
336    *
337    * @return created snapshot or NULL if error occured.
338    * @note ownership of snapshot is passed to caller
339   */
340   Evas_Object* GetSnapshot(Eina_Rectangle rect);
341
342   bool GetSnapshotAsync(Eina_Rectangle rect, Evas* canvas, Ewk_Web_App_Screenshot_Captured_Callback callback, void* user_data);
343   void InvokePolicyResponseCallback(_Ewk_Policy_Decision* policy_decision);
344   void InvokePolicyNavigationCallback(content::RenderViewHost* rvh,
345       NavigationPolicyParams params, bool* handled);
346   void UseSettingsFont();
347
348   _Ewk_Hit_Test* RequestHitTestDataAt(int x, int y, Ewk_Hit_Test_Mode mode);
349   Eina_Bool AsyncRequestHitTestDataAt(int x, int y,
350       Ewk_Hit_Test_Mode mode,
351       Ewk_View_Hit_Test_Request_Callback,
352       void* user_data);
353   _Ewk_Hit_Test* RequestHitTestDataAtBlinkCoords(int x, int y,
354       Ewk_Hit_Test_Mode mode);
355   Eina_Bool AsyncRequestHitTestDataAtBlinkCords(int x, int y,
356       Ewk_Hit_Test_Mode mode,
357       Ewk_View_Hit_Test_Request_Callback,
358       void* user_data);
359   void DispatchAsyncHitTestData(const Hit_Test_Params& params, int64_t request_id);
360   void UpdateHitTestData(const Hit_Test_Params& params);
361
362   int current_find_request_id() const { return current_find_request_id_; }
363   bool PlainTextGet(Ewk_View_Plain_Text_Get_Callback callback, void* user_data);
364   void InvokePlainTextGetCallback(const std::string& content_text, int plain_text_get_callback_id);
365   int SetEwkViewPlainTextGetCallback(Ewk_View_Plain_Text_Get_Callback callback, void* user_data);
366   void SetViewGeolocationPermissionCallback(Ewk_View_Geolocation_Permission_Callback callback, void* user_data);
367   bool InvokeViewGeolocationPermissionCallback(_Ewk_Geolocation_Permission_Request* geolocation_permission_request_context, Eina_Bool* result);
368   void SetViewUnfocusAllowCallback(Ewk_View_Unfocus_Allow_Callback callback, void* user_data);
369   bool InvokeViewUnfocusAllowCallback(Ewk_Unfocus_Direction direction, Eina_Bool* result);
370   void DidChangeContentsSize(int width, int height);
371   const Eina_Rectangle GetContentsSize() const;
372   void GetScrollSize(int* w, int* h);
373   void StopFinding();
374   void SetProgressValue(double progress);
375   double GetProgressValue();
376   const char* GetTitle();
377   bool SaveAsPdf(int width, int height, const std::string& file_name);
378   void BackForwardListClear();
379   _Ewk_Back_Forward_List* GetBackForwardList() const;
380   void InvokeBackForwardListChangedCallback();
381   _Ewk_History* GetBackForwardHistory() const;
382   bool WebAppCapableGet(Ewk_Web_App_Capable_Get_Callback callback, void *userData);
383   bool WebAppIconUrlGet(Ewk_Web_App_Icon_URL_Get_Callback callback, void *userData);
384   bool WebAppIconUrlsGet(Ewk_Web_App_Icon_URLs_Get_Callback callback, void *userData);
385   void InvokeWebAppCapableGetCallback(bool capable, int callbackId);
386   void InvokeWebAppIconUrlGetCallback(const std::string &iconUrl, int callbackId);
387   void InvokeWebAppIconUrlsGetCallback(const std::map<std::string, std::string> &iconUrls, int callbackId);
388   void SetNotificationPermissionCallback(Ewk_View_Notification_Permission_Callback callback, void* user_data);
389   bool IsNotificationPermissionCallbackSet() const;
390   bool InvokeNotificationPermissionCallback(Ewk_Notification_Permission_Request* request);
391
392   bool GetMHTMLData(Ewk_View_MHTML_Data_Get_Callback callback, void* user_data);
393   void OnMHTMLContentGet(const std::string& mhtml_content, int callback_id);
394   bool IsFullscreen();
395   void ExitFullscreen();
396   double GetScale();
397   void DidChangePageScaleFactor(double scale_factor);
398   void SetJavaScriptAlertCallback(Ewk_View_JavaScript_Alert_Callback callback, void* user_data);
399   void JavaScriptAlertReply();
400   void SetJavaScriptConfirmCallback(Ewk_View_JavaScript_Confirm_Callback callback, void* user_data);
401   void JavaScriptConfirmReply(bool result);
402   void SetJavaScriptPromptCallback(Ewk_View_JavaScript_Prompt_Callback callback, void* user_data);
403   void JavaScriptPromptReply(const char* result);
404   void set_renderer_crashed();
405   void GetPageScaleRange(double *min_scale, double *max_scale);
406   void DidChangePageScaleRange(double min_scale, double max_scale);
407   void SetDrawsTransparentBackground(bool enabled);
408   void GetSessionData(const char **data, unsigned *length) const;
409   bool RestoreFromSessionData(const char *data, unsigned length);
410   void ShowFileChooser(const content::FileChooserParams&);
411   void DidChangeContentsArea(int width, int height);
412   void SetBrowserFont();
413   void SetCertificatePem(const std::string& certificate);
414   bool IsDragging() const;
415
416   void RequestColorPicker(int r, int g, int b, int a);
417   void DismissColorPicker();
418   bool SetColorPickerColor(int r, int g, int b, int a);
419   void InputPickerShow(ui::TextInputType input_type, double input_value);
420   void OnSnapshot(const std::vector<unsigned char>& pixData, int width, int height, int snapshotId);
421
422   void ShowContentsDetectedPopup(const char*);
423
424   // Returns TCP port number with Inspector, or 0 if error.
425   int StartInspectorServer(int port = 0);
426   bool StopInspectorServer();
427
428   void LoadNotFoundErrorPage(const std::string& invalidUrl);
429   static std::string GetPlatformLocale();
430   bool GetLinkMagnifierEnabled() const;
431   void SetLinkMagnifierEnabled(bool enabled);
432
433   void SetOverrideEncoding(const std::string& encoding);
434   void SetViewMode(blink::WebViewMode view_mode);
435
436   gfx::Point GetContextMenuPosition() const;
437
438   void SendDelayedMessages(content::RenderViewHost* render_view_host);
439
440   /// ---- Event handling
441   bool HandleShow();
442   bool HandleHide();
443   bool HandleMove(int x, int y);
444   bool HandleResize(int width, int height);
445   bool HandleTextSelectionDown(int x, int y);
446   bool HandleTextSelectionUp(int x, int y);
447
448   void HandleRendererProcessCrash();
449   void HandlePostponedGesture(int x, int y, ui::EventType type);
450  private:
451   void InitializeContent();
452   void EvasToBlinkCords(int x, int y, int* view_x, int* view_y);
453   Eina_Bool AsyncRequestHitTestDataAtBlinkCords(int x, int y,
454       Ewk_Hit_Test_Mode mode,
455       WebViewAsyncRequestHitTestDataCallback* cb);
456   void HandleLongPressGesture(int x, int y, Ewk_Hit_Test_Mode mode,
457       _Ewk_Hit_Test*);
458   void HandleTapGesture(int x, int y, Ewk_Hit_Test_Mode mode,
459       _Ewk_Hit_Test*);
460   content::WebContentsViewEfl* GetWebContentsViewEfl() const;
461
462 #if defined(OS_TIZEN_MOBILE) && !defined(EWK_BRINGUP)
463   static void cameraResultCb(service_h request, service_h reply,
464     service_result_e result, void* data);
465 #endif
466
467 #if defined(OS_TIZEN_MOBILE) && !defined(EWK_BRINGUP)
468   bool LaunchCamera(base::string16 mimetype);
469 #endif
470   content::RenderWidgetHostViewEfl* rwhv() const;
471   JavaScriptDialogManagerEfl* GetJavaScriptDialogManagerEfl();
472
473 #if defined(OS_TIZEN)
474   void ReleasePopupMenuList();
475 #endif
476
477   tizen_webview::WebView* public_webview_;
478   scoped_refptr<tizen_webview::WebContext> context_;
479   scoped_refptr<tizen_webview::WebContext> old_context_;
480   scoped_ptr<content::WebContents> web_contents_;
481   scoped_ptr<content::WebContentsDelegateEfl> web_contents_delegate_;
482   std::string pending_url_request_;
483   scoped_ptr<Ewk_Settings> settings_;
484   scoped_ptr<_Ewk_Frame> frame_;
485   scoped_ptr<_Ewk_Policy_Decision> window_policy_;
486   Evas_Object* evas_object_;
487   Evas_Object* native_view_;
488   bool touch_events_enabled_;
489   bool mouse_events_enabled_;
490   double text_zoom_factor_;
491   mutable std::string selected_text_;
492   mutable std::string user_agent_;
493   mutable std::string user_agent_app_name_;
494   scoped_ptr<_Ewk_Auth_Challenge> auth_challenge_;
495
496 #if defined(OS_TIZEN)
497   Eina_List* popupMenuItems_;
498   Popup_Picker* popupPicker_;
499 #endif
500   bool formIsNavigating_;
501   typedef struct {
502     int count;
503     int position;
504     bool prevState;
505     bool nextState;
506   } formNavigation;
507   formNavigation formNavigation_;
508   scoped_ptr<content::ContextMenuControllerEfl> context_menu_;
509   scoped_ptr<content::FileChooserControllerEfl> file_chooser_;
510   scoped_ptr<content::PopupControllerEfl> popup_controller_;
511   scoped_ptr<content::SelectionControllerEfl> selection_controller_;
512   base::string16 previous_text_;
513   int current_find_request_id_;
514   static int find_request_id_counter_;
515   IDMap<EwkViewPlainTextGetCallback, IDMapOwnPointer> plain_text_get_callback_map_;
516   gfx::Size contents_size_;
517   double progress_;
518   mutable std::string title_;
519   mutable std::string pem_certificate_;
520   Hit_Test_Params hit_test_params_;
521   base::WaitableEvent hit_test_completion_;
522   IDMap<MHTMLCallbackDetails, IDMapOwnPointer> mhtml_callback_map_;
523   double page_scale_factor_;
524   double min_page_scale_factor_;
525   double max_page_scale_factor_;
526   scoped_ptr<OrientationLockCallback> orientation_lock_callback_;
527   scoped_ptr<WebViewGeolocationPermissionCallback> geolocation_permission_cb_;
528   scoped_ptr<WebViewUnfocusAllowCallback> unfocus_allow_cb_;
529   scoped_ptr<content::InputPicker> inputPicker_;
530   IDMap<WebApplicationIconUrlGetCallback, IDMapOwnPointer> web_app_icon_url_get_callback_map_;
531   IDMap<WebApplicationIconUrlsGetCallback, IDMapOwnPointer> web_app_icon_urls_get_callback_map_;
532   IDMap<WebApplicationCapableGetCallback, IDMapOwnPointer> web_app_capable_get_callback_map_;
533   IDMap< WebAppScreenshotCapturedCallback, IDMapOwnPointer> screen_capture_cb_map_;
534   scoped_ptr<NotificationPermissionCallback> notification_permission_callback_;
535   content::DevToolsDelegateEfl* inspector_server_;
536   scoped_ptr<ScrollDetector> scroll_detector_;
537 #if defined(OS_TIZEN_MOBILE)
538   content::FileChooserParams::Mode filechooser_mode_;
539 #endif
540   bool is_initialized_;
541
542   scoped_ptr<_Ewk_Back_Forward_List> back_forward_list_;
543
544   static content::WebContentsDelegate::WebContentsCreateCallback
545       create_new_window_web_contents_cb_;
546
547 private:
548   Eina_Bool AsyncRequestHitTestPrivate(
549       int x, int y, Ewk_Hit_Test_Mode mode,
550       AsyncHitTestRequest* asyncHitTestRequest);
551
552   gfx::Vector2d previous_scroll_position_;
553
554   gfx::Point context_menu_position_;
555
556   std::set<IPC::Message*> delayed_messages_;
557
558   std::map<int64_t, WebViewAsyncRequestHitTestDataCallback*> hit_test_callback_;
559   // only tizen_webview::WebView can create and delete this
560   EWebView(tizen_webview::WebView* owner, tizen_webview::WebContext*, Evas_Object* smart_object);
561   ~EWebView();
562   friend class tizen_webview::WebView;
563   friend class tizen_webview::WebViewEvasEventHandler;
564 };
565
566 namespace tizen_webview {
567 typedef ::EWebView WebViewImpl;
568 };
569
570 const unsigned int g_default_tilt_motion_sensitivity = 3;
571
572
573 #endif