Index: content/browser/renderer_host/render_widget_host_view_aura.h |
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.h b/content/browser/renderer_host/render_widget_host_view_aura.h |
index f8e5cc43bee48652bd29b89e3c1a637b3f439e80..b3494b502b2b1a112bfec2028edabc777eac98e4 100644 |
--- a/content/browser/renderer_host/render_widget_host_view_aura.h |
+++ b/content/browser/renderer_host/render_widget_host_view_aura.h |
@@ -93,10 +93,47 @@ class RenderWidgetHostViewAura |
virtual void OnViewDestroyed() = 0; |
}; |
+ // Displays and controls touch editing elements such as selection handles. |
+ class TouchEditingClient { |
+ public: |
+ TouchEditingClient() {} |
+ |
+ // Tells the client to start showing touch editing handles. |
+ virtual void StartTouchEditing() = 0; |
+ |
+ // Notifies the client that touch editing is no longer needed. |
+ virtual void EndTouchEditing() = 0; |
+ |
+ // Notifies the client that the selection bounds need to be updated. |
+ virtual void OnSelectionOrCursorChanged(const gfx::Rect& anchor, |
+ const gfx::Rect& focus) = 0; |
+ |
+ // Notifies the client that the current text input type as changed. |
+ virtual void OnTextInputTypeChanged(ui::TextInputType type) = 0; |
+ |
+ // Notifies the client that an input event is about to be sent to the |
+ // renderer. Returns true if the client wants to stop event propagation. |
+ virtual bool HandleInputEvent(const ui::Event* event) = 0; |
+ |
+ // Notifies the client that a gesture event ack was received. |
+ virtual void GestureEventAck(int gesture_event_type) = 0; |
+ |
+ // This is called when the view is destroyed, so that the client can |
+ // perform any necessary clean-up. |
+ virtual void OnViewDestroyed() = 0; |
+ |
+ protected: |
+ virtual ~TouchEditingClient() {} |
+ }; |
+ |
void set_paint_observer(PaintObserver* observer) { |
paint_observer_ = observer; |
} |
+ void set_touch_editing_client(TouchEditingClient* client) { |
+ touch_editing_client_ = client; |
+ } |
+ |
// RenderWidgetHostView implementation. |
virtual void InitAsChild(gfx::NativeView parent_view) OVERRIDE; |
virtual RenderWidgetHost* GetRenderWidgetHost() const OVERRIDE; |
@@ -179,6 +216,7 @@ class RenderWidgetHostViewAura |
virtual bool HasAcceleratedSurface(const gfx::Size& desired_size) OVERRIDE; |
virtual void GetScreenInfo(WebKit::WebScreenInfo* results) OVERRIDE; |
virtual gfx::Rect GetBoundsInRootWindow() OVERRIDE; |
+ virtual void GestureEventAck(int gesture_event_type) OVERRIDE; |
virtual void ProcessAckedTouchEvent( |
const WebKit::WebTouchEvent& touch, |
InputEventAckState ack_result) OVERRIDE; |
@@ -590,6 +628,8 @@ class RenderWidgetHostViewAura |
// Subscriber that listens to frame presentation events. |
scoped_ptr<RenderWidgetHostViewFrameSubscriber> frame_subscriber_; |
+ TouchEditingClient* touch_editing_client_; |
+ |
DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); |
}; |