[M120 Migration][NUI] Add internal mouse event API for NUI.
[platform/framework/web/chromium-efl.git] / tizen_src / chromium_impl / content / browser / renderer_host / rwhv_aura_common_helper_efl.h
index 8af89b6..4a3367f 100644 (file)
@@ -120,6 +120,11 @@ class CONTENT_EXPORT RWHVAuraCommonHelperEfl {
   }
   void SetTouchEventsEnabled(bool enabled);
   bool TouchEventsEnabled();
+  void SendMouseDown(int button, int x, int y);
+  void SendMouseUp(int button, int x, int y);
+  void SendMouseMove(int x, int y);
+  void SendMouseWheel(bool y_direction, int step, int x, int y);
+  void SendMouseOut();
   bool IsFocusedNodeContentEditable() const { return is_content_editable_; }
 
   void SetKeyEventsEnabled(bool enabled);
@@ -137,6 +142,7 @@ class CONTENT_EXPORT RWHVAuraCommonHelperEfl {
 #if BUILDFLAG(IS_TIZEN_TV)
   //Browser edge scroll
   void DidEdgeScrollBy(const gfx::Point& offset, bool handled);
+  void MoveFocusToBrowser(int direction);
   void SetPopupMenuVisible(const bool visible);
   void SetPopupMenuBounds(const gfx::Rect& popup_bounds);
   void SetCursorByClient(bool enable) { cursor_set_by_client_ = enable; }
@@ -153,9 +159,22 @@ class CONTENT_EXPORT RWHVAuraCommonHelperEfl {
   // notify web browser video playing status
   void RequestVideoPlaying(int callback_id);
   void VideoPlayingStatusReceived(bool is_playing, int callback_id);
+  void SetMouseEventCallbacks(
+      const base::RepeatingCallback<void(int, int)>& on_mouse_down,
+      const base::RepeatingCallback<bool(void)>& on_mouse_up,
+      const base::RepeatingCallback<void(void)>& on_mouse_move);
+  void MouseDownCallback(int x, int y);
+  bool MouseUpCallback();
+  void MouseMoveCallback();
 #endif
 
+  void CompositingCompleteSwapWithNewSize(const gfx::Size& size) {
+    frame_data_output_size_ = size;
+  }
+  gfx::Size GetFrameDateOutputSize() { return frame_data_output_size_; }
   void SetOrientation(int orientation) { rotation_ = orientation; }
+  int GetOrientation() { return rotation_; }
+
   void OnGestureEvent(ui::GestureEvent* event);
   void DidChangeInputType(bool is_password_field);
   void BackgroundColorReceived(int callback_id, SkColor bg_color);
@@ -167,6 +186,7 @@ class CONTENT_EXPORT RWHVAuraCommonHelperEfl {
   void OnGetMainFrameScrollbarVisible(int callback_id, bool visible);
   void TextInputStateChanged(const ui::mojom::TextInputState& params);
   void OnSelectionRectReceived(const gfx::Rect& selection_rect);
+  void UpdateTooltipUnderCursor(const std::u16string&);
 
  protected:
   void SetOffscreenMode() { is_offscreen_mode_ = true; }
@@ -181,6 +201,7 @@ class CONTENT_EXPORT RWHVAuraCommonHelperEfl {
   base::IDMap<std::unique_ptr<ScreenshotCapturedCallback>>
       screen_capture_cb_map_;
   int rotation_ = 0;
+  gfx::Size frame_data_output_size_;
 
  private:
   ui::EflEventHandler* GetEventHandler();
@@ -207,6 +228,9 @@ class CONTENT_EXPORT RWHVAuraCommonHelperEfl {
   // When WebBrowser sets their own cursor, set the flag
   // not to set the WebPage cursor
   bool cursor_set_by_client_ = false;
+  base::RepeatingCallback<void(int, int)> on_mouse_down_callback_;
+  base::RepeatingCallback<bool(void)> on_mouse_up_callback_;
+  base::RepeatingCallback<void(void)> on_mouse_move_callback_;
 #endif
 
   std::unique_ptr<RenderWidgetHostHelper> rwh_helper_;