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