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_RENDERER_RENDER_WIDGET_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_WIDGET_H_ |
6 #define CONTENT_RENDERER_RENDER_WIDGET_H_ | 6 #define CONTENT_RENDERER_RENDER_WIDGET_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <map> | 9 #include <map> |
10 | 10 |
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 // changed. If they are changed, the new value will be sent to the browser | 342 // changed. If they are changed, the new value will be sent to the browser |
343 // process. This method does nothing when the browser process is not able to | 343 // process. This method does nothing when the browser process is not able to |
344 // handle composition range and composition character bounds. | 344 // handle composition range and composition character bounds. |
345 void UpdateCompositionInfo(bool should_update_range); | 345 void UpdateCompositionInfo(bool should_update_range); |
346 | 346 |
347 #if defined(OS_ANDROID) | 347 #if defined(OS_ANDROID) |
348 void DidChangeBodyBackgroundColor(SkColor bg_color); | 348 void DidChangeBodyBackgroundColor(SkColor bg_color); |
349 bool DoesRecordFullLayer() const; | 349 bool DoesRecordFullLayer() const; |
350 #endif | 350 #endif |
351 | 351 |
| 352 bool IsElasticOverscrollEnabled() const; |
352 bool host_closing() const { return host_closing_; } | 353 bool host_closing() const { return host_closing_; } |
353 | 354 |
354 protected: | 355 protected: |
355 // Friend RefCounted so that the dtor can be non-public. Using this class | 356 // Friend RefCounted so that the dtor can be non-public. Using this class |
356 // without ref-counting is an error. | 357 // without ref-counting is an error. |
357 friend class base::RefCounted<RenderWidget>; | 358 friend class base::RefCounted<RenderWidget>; |
358 // For unit tests. | 359 // For unit tests. |
359 friend class RenderWidgetTest; | 360 friend class RenderWidgetTest; |
360 | 361 |
361 enum ResizeAck { | 362 enum ResizeAck { |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
566 | 567 |
567 // Called by OnHandleInputEvent() to notify subclasses that a gesture event is | 568 // Called by OnHandleInputEvent() to notify subclasses that a gesture event is |
568 // about to be handled. | 569 // about to be handled. |
569 // Returns true if no further handling is needed. In that case, the event | 570 // Returns true if no further handling is needed. In that case, the event |
570 // won't be sent to WebKit. | 571 // won't be sent to WebKit. |
571 virtual bool WillHandleGestureEvent(const blink::WebGestureEvent& event); | 572 virtual bool WillHandleGestureEvent(const blink::WebGestureEvent& event); |
572 | 573 |
573 // Called by OnHandleInputEvent() to forward a mouse wheel event to the | 574 // Called by OnHandleInputEvent() to forward a mouse wheel event to the |
574 // compositor thread, to effect the elastic overscroll effect. | 575 // compositor thread, to effect the elastic overscroll effect. |
575 void ObserveWheelEventAndResult(const blink::WebMouseWheelEvent& wheel_event, | 576 void ObserveWheelEventAndResult(const blink::WebMouseWheelEvent& wheel_event, |
| 577 const gfx::Vector2dF& wheel_unused_delta, |
576 bool event_processed); | 578 bool event_processed); |
577 | 579 |
578 // Check whether the WebWidget has any touch event handlers registered | 580 // Check whether the WebWidget has any touch event handlers registered |
579 // at the given point. | 581 // at the given point. |
580 virtual bool HasTouchEventHandlersAt(const gfx::Point& point) const; | 582 virtual bool HasTouchEventHandlersAt(const gfx::Point& point) const; |
581 | 583 |
582 // Check whether the WebWidget has any touch event handlers registered. | 584 // Check whether the WebWidget has any touch event handlers registered. |
583 virtual void hasTouchEventHandlers(bool has_handlers); | 585 virtual void hasTouchEventHandlers(bool has_handlers); |
584 | 586 |
585 // Tell the browser about the actions permitted for a new touch point. | 587 // Tell the browser about the actions permitted for a new touch point. |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
825 ui::MenuSourceType context_menu_source_type_; | 827 ui::MenuSourceType context_menu_source_type_; |
826 bool has_host_context_menu_location_; | 828 bool has_host_context_menu_location_; |
827 gfx::Point host_context_menu_location_; | 829 gfx::Point host_context_menu_location_; |
828 | 830 |
829 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 831 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
830 }; | 832 }; |
831 | 833 |
832 } // namespace content | 834 } // namespace content |
833 | 835 |
834 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 836 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
OLD | NEW |