Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 86 virtual void OnUpdateCompositorContent() = 0; | 86 virtual void OnUpdateCompositorContent() = 0; |
| 87 | 87 |
| 88 // This is called loading the page has completed. | 88 // This is called loading the page has completed. |
| 89 virtual void OnPageLoadComplete() = 0; | 89 virtual void OnPageLoadComplete() = 0; |
| 90 | 90 |
| 91 // This is called when the view is destroyed, so that the observer can | 91 // This is called when the view is destroyed, so that the observer can |
| 92 // perform any necessary clean-up. | 92 // perform any necessary clean-up. |
| 93 virtual void OnViewDestroyed() = 0; | 93 virtual void OnViewDestroyed() = 0; |
| 94 }; | 94 }; |
| 95 | 95 |
| 96 // Displays and controls touch editing elements such as selection handles. | |
| 97 class TouchEditingClient { | |
| 98 public: | |
| 99 TouchEditingClient() {} | |
| 100 virtual ~TouchEditingClient() {} | |
|
sky
2013/04/12 16:09:52
Make protected.
varunjain
2013/04/12 17:35:19
Done.
| |
| 101 | |
| 102 // Tells the client to start showing touch editing handles. | |
| 103 virtual void StartTouchEditing() = 0; | |
| 104 | |
| 105 // Notifies the client that touch editing is no longer needed. | |
| 106 virtual void EndTouchEditing() = 0; | |
| 107 | |
| 108 // Notifies the client that the selection bounds need to be updated. | |
| 109 virtual void OnSelectionOrCursorChanged(const gfx::Rect& anchor, | |
| 110 const gfx::Rect& focus) = 0; | |
| 111 | |
| 112 // Notifies the client that the current text input type as changed. | |
| 113 virtual void OnTextInputTypeChanged(ui::TextInputType type) = 0; | |
| 114 | |
| 115 // Notifies the client that an input event is about to be sent to the | |
| 116 // renderer. Returns true if the client wants to stop event propagation. | |
| 117 virtual bool HandleInputEvent(const ui::Event* event) = 0; | |
| 118 | |
| 119 // Notifies the client that a gesture event ack was received. | |
| 120 virtual void GestureEventAck(int gesture_event_type) = 0; | |
| 121 | |
| 122 // This is called when the view is destroyed, so that the client can | |
| 123 // perform any necessary clean-up. | |
| 124 virtual void OnViewDestroyed() = 0; | |
| 125 }; | |
| 126 | |
| 96 void set_paint_observer(PaintObserver* observer) { | 127 void set_paint_observer(PaintObserver* observer) { |
| 97 paint_observer_ = observer; | 128 paint_observer_ = observer; |
| 98 } | 129 } |
| 99 | 130 |
| 131 void set_touch_editing_client(TouchEditingClient* client) { | |
| 132 touch_editing_client_ = client; | |
| 133 } | |
| 134 | |
| 100 // RenderWidgetHostView implementation. | 135 // RenderWidgetHostView implementation. |
| 101 virtual void InitAsChild(gfx::NativeView parent_view) OVERRIDE; | 136 virtual void InitAsChild(gfx::NativeView parent_view) OVERRIDE; |
| 102 virtual RenderWidgetHost* GetRenderWidgetHost() const OVERRIDE; | 137 virtual RenderWidgetHost* GetRenderWidgetHost() const OVERRIDE; |
| 103 virtual void SetSize(const gfx::Size& size) OVERRIDE; | 138 virtual void SetSize(const gfx::Size& size) OVERRIDE; |
| 104 virtual void SetBounds(const gfx::Rect& rect) OVERRIDE; | 139 virtual void SetBounds(const gfx::Rect& rect) OVERRIDE; |
| 105 virtual gfx::NativeView GetNativeView() const OVERRIDE; | 140 virtual gfx::NativeView GetNativeView() const OVERRIDE; |
| 106 virtual gfx::NativeViewId GetNativeViewId() const OVERRIDE; | 141 virtual gfx::NativeViewId GetNativeViewId() const OVERRIDE; |
| 107 virtual gfx::NativeViewAccessible GetNativeViewAccessible() OVERRIDE; | 142 virtual gfx::NativeViewAccessible GetNativeViewAccessible() OVERRIDE; |
| 108 virtual bool HasFocus() const OVERRIDE; | 143 virtual bool HasFocus() const OVERRIDE; |
| 109 virtual bool IsSurfaceAvailableForCopy() const OVERRIDE; | 144 virtual bool IsSurfaceAvailableForCopy() const OVERRIDE; |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 170 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params_in_pixel, | 205 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params_in_pixel, |
| 171 int gpu_host_id) OVERRIDE; | 206 int gpu_host_id) OVERRIDE; |
| 172 virtual void AcceleratedSurfacePostSubBuffer( | 207 virtual void AcceleratedSurfacePostSubBuffer( |
| 173 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params_in_pixel, | 208 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params_in_pixel, |
| 174 int gpu_host_id) OVERRIDE; | 209 int gpu_host_id) OVERRIDE; |
| 175 virtual void AcceleratedSurfaceSuspend() OVERRIDE; | 210 virtual void AcceleratedSurfaceSuspend() OVERRIDE; |
| 176 virtual void AcceleratedSurfaceRelease() OVERRIDE; | 211 virtual void AcceleratedSurfaceRelease() OVERRIDE; |
| 177 virtual bool HasAcceleratedSurface(const gfx::Size& desired_size) OVERRIDE; | 212 virtual bool HasAcceleratedSurface(const gfx::Size& desired_size) OVERRIDE; |
| 178 virtual void GetScreenInfo(WebKit::WebScreenInfo* results) OVERRIDE; | 213 virtual void GetScreenInfo(WebKit::WebScreenInfo* results) OVERRIDE; |
| 179 virtual gfx::Rect GetBoundsInRootWindow() OVERRIDE; | 214 virtual gfx::Rect GetBoundsInRootWindow() OVERRIDE; |
| 215 virtual void GestureEventAck(int gesture_event_type) OVERRIDE; | |
| 180 virtual void ProcessAckedTouchEvent( | 216 virtual void ProcessAckedTouchEvent( |
| 181 const WebKit::WebTouchEvent& touch, | 217 const WebKit::WebTouchEvent& touch, |
| 182 InputEventAckState ack_result) OVERRIDE; | 218 InputEventAckState ack_result) OVERRIDE; |
| 183 virtual void SetHasHorizontalScrollbar( | 219 virtual void SetHasHorizontalScrollbar( |
| 184 bool has_horizontal_scrollbar) OVERRIDE; | 220 bool has_horizontal_scrollbar) OVERRIDE; |
| 185 virtual void SetScrollOffsetPinning( | 221 virtual void SetScrollOffsetPinning( |
| 186 bool is_pinned_to_left, bool is_pinned_to_right) OVERRIDE; | 222 bool is_pinned_to_left, bool is_pinned_to_right) OVERRIDE; |
| 187 virtual gfx::GLSurfaceHandle GetCompositingSurface() OVERRIDE; | 223 virtual gfx::GLSurfaceHandle GetCompositingSurface() OVERRIDE; |
| 188 virtual void OnAccessibilityNotifications( | 224 virtual void OnAccessibilityNotifications( |
| 189 const std::vector<AccessibilityHostMsg_NotificationParams>& | 225 const std::vector<AccessibilityHostMsg_NotificationParams>& |
| (...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 581 PluginWindowMoves plugin_window_moves_; | 617 PluginWindowMoves plugin_window_moves_; |
| 582 #endif | 618 #endif |
| 583 | 619 |
| 584 base::TimeTicks last_draw_ended_; | 620 base::TimeTicks last_draw_ended_; |
| 585 | 621 |
| 586 gfx::NativeViewAccessible accessible_parent_; | 622 gfx::NativeViewAccessible accessible_parent_; |
| 587 | 623 |
| 588 // Subscriber that listens to frame presentation events. | 624 // Subscriber that listens to frame presentation events. |
| 589 scoped_ptr<RenderWidgetHostViewFrameSubscriber> frame_subscriber_; | 625 scoped_ptr<RenderWidgetHostViewFrameSubscriber> frame_subscriber_; |
| 590 | 626 |
| 627 TouchEditingClient* touch_editing_client_; | |
| 628 | |
| 591 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); | 629 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); |
| 592 }; | 630 }; |
| 593 | 631 |
| 594 } // namespace content | 632 } // namespace content |
| 595 | 633 |
| 596 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ | 634 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ |
| OLD | NEW |