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)
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();
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();
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_;