| 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_BASE_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 class WebMouseEvent; | 53 class WebMouseEvent; |
| 54 class WebMouseWheelEvent; | 54 class WebMouseWheelEvent; |
| 55 } | 55 } |
| 56 | 56 |
| 57 namespace cc { | 57 namespace cc { |
| 58 class SurfaceHittestDelegate; | 58 class SurfaceHittestDelegate; |
| 59 } | 59 } |
| 60 | 60 |
| 61 namespace ui { | 61 namespace ui { |
| 62 class LatencyInfo; | 62 class LatencyInfo; |
| 63 struct DidOverscrollParams; |
| 63 } | 64 } |
| 64 | 65 |
| 65 namespace content { | 66 namespace content { |
| 66 class BrowserAccessibilityDelegate; | 67 class BrowserAccessibilityDelegate; |
| 67 class BrowserAccessibilityManager; | 68 class BrowserAccessibilityManager; |
| 68 class RenderWidgetHostViewBaseObserver; | 69 class RenderWidgetHostViewBaseObserver; |
| 69 class SyntheticGesture; | 70 class SyntheticGesture; |
| 70 class SyntheticGestureTarget; | 71 class SyntheticGestureTarget; |
| 71 class TextInputManager; | 72 class TextInputManager; |
| 72 class WebCursor; | 73 class WebCursor; |
| 73 struct DidOverscrollParams; | |
| 74 struct NativeWebKeyboardEvent; | 74 struct NativeWebKeyboardEvent; |
| 75 struct TextInputState; | 75 struct TextInputState; |
| 76 | 76 |
| 77 // Basic implementation shared by concrete RenderWidgetHostView subclasses. | 77 // Basic implementation shared by concrete RenderWidgetHostView subclasses. |
| 78 class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView, | 78 class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView, |
| 79 public IPC::Listener { | 79 public IPC::Listener { |
| 80 public: | 80 public: |
| 81 ~RenderWidgetHostViewBase() override; | 81 ~RenderWidgetHostViewBase() override; |
| 82 | 82 |
| 83 float current_device_scale_factor() const { | 83 float current_device_scale_factor() const { |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 virtual void ClearCompositorFrame() = 0; | 207 virtual void ClearCompositorFrame() = 0; |
| 208 | 208 |
| 209 // Because the associated remote WebKit instance can asynchronously | 209 // Because the associated remote WebKit instance can asynchronously |
| 210 // prevent-default on a dispatched touch event, the touch events are queued in | 210 // prevent-default on a dispatched touch event, the touch events are queued in |
| 211 // the GestureRecognizer until invocation of ProcessAckedTouchEvent releases | 211 // the GestureRecognizer until invocation of ProcessAckedTouchEvent releases |
| 212 // it to be consumed (when |ack_result| is NOT_CONSUMED OR NO_CONSUMER_EXISTS) | 212 // it to be consumed (when |ack_result| is NOT_CONSUMED OR NO_CONSUMER_EXISTS) |
| 213 // or ignored (when |ack_result| is CONSUMED). | 213 // or ignored (when |ack_result| is CONSUMED). |
| 214 virtual void ProcessAckedTouchEvent(const TouchEventWithLatencyInfo& touch, | 214 virtual void ProcessAckedTouchEvent(const TouchEventWithLatencyInfo& touch, |
| 215 InputEventAckState ack_result) {} | 215 InputEventAckState ack_result) {} |
| 216 | 216 |
| 217 virtual void DidOverscroll(const DidOverscrollParams& params) {} | 217 virtual void DidOverscroll(const ui::DidOverscrollParams& params) {} |
| 218 | 218 |
| 219 virtual void DidStopFlinging() {} | 219 virtual void DidStopFlinging() {} |
| 220 | 220 |
| 221 // Returns the compositing surface ID namespace, or 0 if Surfaces are not | 221 // Returns the compositing surface ID namespace, or 0 if Surfaces are not |
| 222 // enabled. | 222 // enabled. |
| 223 virtual uint32_t GetSurfaceClientId(); | 223 virtual uint32_t GetSurfaceClientId(); |
| 224 | 224 |
| 225 // When there are multiple RenderWidgetHostViews for a single page, input | 225 // When there are multiple RenderWidgetHostViews for a single page, input |
| 226 // events need to be targeted to the correct one for handling. The following | 226 // events need to be targeted to the correct one for handling. The following |
| 227 // methods are invoked on the RenderWidgetHostView that should be able to | 227 // methods are invoked on the RenderWidgetHostView that should be able to |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 472 base::ObserverList<RenderWidgetHostViewBaseObserver> observers_; | 472 base::ObserverList<RenderWidgetHostViewBaseObserver> observers_; |
| 473 | 473 |
| 474 base::WeakPtrFactory<RenderWidgetHostViewBase> weak_factory_; | 474 base::WeakPtrFactory<RenderWidgetHostViewBase> weak_factory_; |
| 475 | 475 |
| 476 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase); | 476 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase); |
| 477 }; | 477 }; |
| 478 | 478 |
| 479 } // namespace content | 479 } // namespace content |
| 480 | 480 |
| 481 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ | 481 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ |
| OLD | NEW |