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