Remove leftover code from EWebView
authorAntonio Gomes <a1.gomes@samsung.com>
Wed, 30 Dec 2015 14:28:05 +0000 (10:28 -0400)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 07:55:23 +0000 (07:55 +0000)
Patch removes internal classes/methods no longer needed,
namely:

- EWebView::SelectClosestWord
- AsyncRequestHitTestPrivate (declaration only)
- class WebViewAsyncRequestHitTestDataInternalCallback

Original beta/m47 patches:
- http://165.213.202.130/gerrit/#/c/102076/
- http://165.213.202.130/gerrit/#/c/102075/

Bug: http://107.108.218.239/bugzilla/show_bug.cgi?id=15459

Reviewed by: djmix.kim, g.czajkowski

Change-Id: Icf84b4f921ecd943f01e747b0de9e3e05c7ca5b0
Signed-off-by: Antonio Gomes <a1.gomes@samsung.com>
tizen_src/ewk/efl_integration/eweb_context.cc
tizen_src/ewk/efl_integration/eweb_context.h
tizen_src/ewk/efl_integration/eweb_view.cc
tizen_src/ewk/efl_integration/eweb_view.h

index b781a34..d3f0a53 100644 (file)
@@ -49,8 +49,6 @@ using std::string;
 using std::pair;
 using std::map;
 
-EWebContext* EWebContext::default_context_ = NULL;
-
 namespace {
 
 /**
index 988fb2f..67ea798 100644 (file)
@@ -179,7 +179,6 @@ class EWebContext {
   ~EWebContext();
   friend class Ewk_Context;
 
-  static EWebContext* default_context_;
   scoped_ptr<WebCacheManagerEfl> web_cache_manager_;
   scoped_ptr<content::BrowserContextEfl> browser_context_;
   scoped_ptr<Ewk_Cookie_Manager> ewk_cookie_manager_;
index 3e1d330..337bb37 100644 (file)
@@ -145,54 +145,6 @@ class WebViewAsyncRequestHitTestDataUserCallback: public WebViewAsyncRequestHitT
   void* user_data_;
 };
 
-class WebViewAsyncRequestHitTestDataInternalCallback: public WebViewAsyncRequestHitTestDataCallback
-{
- public:
-  typedef void (EWebView::*Callback)(int, int, Ewk_Hit_Test_Mode, _Ewk_Hit_Test*);
-
- public:
-  WebViewAsyncRequestHitTestDataInternalCallback(int x,
-                                                 int y,
-                                                 Ewk_Hit_Test_Mode mode,
-                                                 Callback cb)
-      : WebViewAsyncRequestHitTestDataCallback(x, y, mode)
-      , callback_(cb) {
-  }
-
-  void Run(_Ewk_Hit_Test* hit_test, EWebView* web_view) override {
-    DCHECK(callback_);
-    (web_view->*callback_)(GetX(), GetY(), GetMode(), hit_test);
-  }
-
- private:
-  Callback callback_;
-};
-
-class AsyncHitTestRequest
-{
- public:
-  AsyncHitTestRequest(int x, int y, Ewk_Hit_Test_Mode mode,
-      Ewk_View_Hit_Test_Request_Callback callback, void* user_data)
-    : x_(x)
-    , y_(y)
-    , mode_(mode)
-    , callback_(callback)
-    , user_data_(user_data) {
-  }
-
-  void Run(_Ewk_Hit_Test *hit_test, Evas_Object* web_view) {
-    DCHECK(callback_);
-    callback_(web_view, x_, y_, mode_, hit_test, user_data_);
-  }
-
- private:
-  int x_;
-  int y_;
-  Ewk_Hit_Test_Mode mode_;
-  Ewk_View_Hit_Test_Request_Callback callback_;
-  void* user_data_;
-};
-
 class WebViewGeolocationPermissionCallback {
  public:
   WebViewGeolocationPermissionCallback(Ewk_View_Geolocation_Permission_Callback cb, void* data)
@@ -1297,15 +1249,6 @@ SelectionControllerEfl* EWebView::GetSelectionController() const {
   return view ? view->GetSelectionController() : 0;
 }
 
-void EWebView::SelectClosestWord(const gfx::Point& touch_point) {
-  int view_x, view_y;
-  EvasToBlinkCords(touch_point.x(), touch_point.y(), &view_x, &view_y);
-
-  RenderViewHost* render_view_host = web_contents_->GetRenderViewHost();
-  render_view_host->Send(new ViewMsg_SelectClosestWord(
-      render_view_host->GetRoutingID(), view_x, view_y));
-}
-
 void EWebView::SelectLinkText(const gfx::Point& touch_point) {
   float device_scale_factor = gfx::Screen::GetNativeScreen()->
       GetPrimaryDisplay().device_scale_factor();
index 5e2f922..d424a6a 100644 (file)
@@ -305,7 +305,6 @@ class EWebView {
   void MoveCaret(const gfx::Point& point);
   void QuerySelectionStyle();
   void OnQuerySelectionStyleReply(const SelectionStylePrams& params);
-  void SelectClosestWord(const gfx::Point& touch_point);
   void SelectLinkText(const gfx::Point& touch_point);
   bool GetSelectionRange(Eina_Rectangle* left_rect, Eina_Rectangle* right_rect);
   Eina_Bool ClearSelection();
@@ -547,10 +546,6 @@ class EWebView {
       create_new_window_web_contents_cb_;
 
 private:
-  Eina_Bool AsyncRequestHitTestPrivate(
-      int x, int y, Ewk_Hit_Test_Mode mode,
-      AsyncHitTestRequest* asyncHitTestRequest);
-
   gfx::Vector2d previous_scroll_position_;
 
   gfx::Point context_menu_position_;