[M108 Migration] Migrate patches related to NavigationThrottle and Ewk_Error
[platform/framework/web/chromium-efl.git] / tizen_src / ewk / efl_integration / eweb_view.h
index 36aa94c..00a71e1 100644 (file)
@@ -180,7 +180,7 @@ class EWebView {
   // call this once after created and before use
   void Initialize();
 
-  void CreateNewWindow(
+  bool CreateNewWindow(
       content::WebContentsEflDelegate::WebContentsCreateCallback);
   static Evas_Object* GetHostWindowDelegate(const content::WebContents*);
 
@@ -242,7 +242,7 @@ class EWebView {
   bool GetPrivateBrowsing() const;
   const char* GetUserAgent() const;
   const char* GetUserAgentAppName() const;
-  const char* GetSelectedText() const;
+  const char* CacheSelectedText();
   Ewk_Settings* GetSettings() { return settings_.get(); }
   _Ewk_Frame* GetMainFrame();
   void UpdateWebKitPreferences();
@@ -257,10 +257,7 @@ class EWebView {
                 const char* base_uri,
                 const char* unreachable_uri = NULL);
 
-  void InvokeLoadError(const GURL& url,
-                       int error_code,
-                       const std::string& error_description,
-                       bool is_main_frame);
+  void InvokeLoadError(const GURL& url, int error_code, bool is_cancellation);
 
   void SetViewAuthCallback(Ewk_View_Authentication_Callback callback,
                            void* user_data);
@@ -290,7 +287,7 @@ class EWebView {
   void HandleLongPressGesture(const content::ContextMenuParams&);
   void ShowContextMenu(const content::ContextMenuParams&);
   void CancelContextMenu(int request_id);
-  void SetScale(double scale_factor, int x, int y);
+  void SetScale(double scale_factor);
   bool GetScrollPosition(int* x, int* y) const;
   void SetScroll(int x, int y);
   void UrlRequestSet(const char* url,
@@ -414,6 +411,7 @@ class EWebView {
   void ExitFullscreen();
   double GetScale();
   void DidChangePageScaleFactor(double scale_factor);
+  void SetScaledContentsSize();
   void SetJavaScriptAlertCallback(Ewk_View_JavaScript_Alert_Callback callback,
                                   void* user_data);
   void JavaScriptAlertReply();
@@ -486,6 +484,12 @@ class EWebView {
   void HandleZoomGesture(blink::WebGestureEvent& event);
   void ClosePage();
 
+  void RequestManifest(Ewk_View_Request_Manifest_Callback callback,
+                       void* user_data);
+  void DidRespondRequestManifest(_Ewk_View_Request_Manifest* manifest,
+                                 Ewk_View_Request_Manifest_Callback callback,
+                                 void* user_data);
+
   void SyncAcceptLanguages(const std::string& accept_languages);
 
   void OnOverscrolled(const gfx::Vector2dF& accumulated_overscroll,
@@ -505,14 +509,14 @@ class EWebView {
 #if !defined(USE_AURA)
   content::WebContentsViewEfl* GetWebContentsViewEfl() const;
 #endif
-#if defined(OS_TIZEN) && !defined(EWK_BRINGUP)
+#if BUILDFLAG(IS_TIZEN) && !defined(EWK_BRINGUP)
   static void cameraResultCb(service_h request,
                              service_h reply,
                              service_result_e result,
                              void* data);
 #endif
 
-#if defined(OS_TIZEN) && !defined(EWK_BRINGUP)
+#if BUILDFLAG(IS_TIZEN) && !defined(EWK_BRINGUP)
   bool LaunchCamera(std::u16string mimetype);
 #endif
 #if !defined(USE_AURA)
@@ -545,6 +549,7 @@ class EWebView {
   mutable std::string user_agent_;
   mutable std::string user_agent_app_name_;
   std::unique_ptr<_Ewk_Auth_Challenge> auth_challenge_;
+  std::string selected_text_cached_;
 
   Eina_List* popupMenuItems_;
   Popup_Picker* popupPicker_;
@@ -610,7 +615,7 @@ class EWebView {
   std::unique_ptr<PermissionPopupManager> permission_popup_manager_;
   std::unique_ptr<ScrollDetector> scroll_detector_;
 
-#if defined(OS_TIZEN)
+#if BUILDFLAG(IS_TIZEN)
   blink::mojom::FileChooserParams::Mode filechooser_mode_;
 #endif
   std::map<const _Ewk_Quota_Permission_Request*,