Chromium Code Reviews| 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 07d68a977628aac6f2f7f575ea1a6d8993f385de..4f08561a5e4abda5b7c57718e8ce10dabe2e2723 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,45 @@ class RenderWidgetHostViewAura |
| virtual void OnViewDestroyed() = 0; |
| }; |
| + // Displays and controls touch editing elements such as selection handles. |
| + class TouchEditingClient { |
| + public: |
| + TouchEditingClient() {} |
| + virtual ~TouchEditingClient() {} |
|
sky
2013/04/12 16:09:52
Make protected.
varunjain
2013/04/12 17:35:19
Done.
|
| + |
| + // 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; |
| + }; |
| + |
| 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; |
| @@ -177,6 +212,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; |
| @@ -588,6 +624,8 @@ class RenderWidgetHostViewAura |
| // Subscriber that listens to frame presentation events. |
| scoped_ptr<RenderWidgetHostViewFrameSubscriber> frame_subscriber_; |
| + TouchEditingClient* touch_editing_client_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); |
| }; |