| 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_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 bool IsLoading() const override; | 161 bool IsLoading() const override; |
| 162 void ResizeRectChanged(const gfx::Rect& new_rect) override; | 162 void ResizeRectChanged(const gfx::Rect& new_rect) override; |
| 163 void RestartHangMonitorTimeout() override; | 163 void RestartHangMonitorTimeout() override; |
| 164 void SetIgnoreInputEvents(bool ignore_input_events) override; | 164 void SetIgnoreInputEvents(bool ignore_input_events) override; |
| 165 void WasResized() override; | 165 void WasResized() override; |
| 166 void AddKeyPressEventCallback(const KeyPressEventCallback& callback) override; | 166 void AddKeyPressEventCallback(const KeyPressEventCallback& callback) override; |
| 167 void RemoveKeyPressEventCallback( | 167 void RemoveKeyPressEventCallback( |
| 168 const KeyPressEventCallback& callback) override; | 168 const KeyPressEventCallback& callback) override; |
| 169 void AddMouseEventCallback(const MouseEventCallback& callback) override; | 169 void AddMouseEventCallback(const MouseEventCallback& callback) override; |
| 170 void RemoveMouseEventCallback(const MouseEventCallback& callback) override; | 170 void RemoveMouseEventCallback(const MouseEventCallback& callback) override; |
| 171 void AddInputEventObserver( |
| 172 RenderWidgetHost::InputEventObserver* observer) override; |
| 173 void RemoveInputEventObserver( |
| 174 RenderWidgetHost::InputEventObserver* observer) override; |
| 171 void GetWebScreenInfo(blink::WebScreenInfo* result) override; | 175 void GetWebScreenInfo(blink::WebScreenInfo* result) override; |
| 172 bool GetScreenColorProfile(std::vector<char>* color_profile) override; | 176 bool GetScreenColorProfile(std::vector<char>* color_profile) override; |
| 173 void HandleCompositorProto(const std::vector<uint8_t>& proto) override; | 177 void HandleCompositorProto(const std::vector<uint8_t>& proto) override; |
| 174 | 178 |
| 175 // Notification that the screen info has changed. | 179 // Notification that the screen info has changed. |
| 176 void NotifyScreenInfoChanged(); | 180 void NotifyScreenInfoChanged(); |
| 177 | 181 |
| 178 // Forces redraw in the renderer and when the update reaches the browser | 182 // Forces redraw in the renderer and when the update reaches the browser |
| 179 // grabs snapshot from the compositor. Returns PNG-encoded snapshot. | 183 // grabs snapshot from the compositor. Returns PNG-encoded snapshot. |
| 180 using GetSnapshotFromBrowserCallback = | 184 using GetSnapshotFromBrowserCallback = |
| (...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 597 InputEventAckState FilterInputEvent( | 601 InputEventAckState FilterInputEvent( |
| 598 const blink::WebInputEvent& event, | 602 const blink::WebInputEvent& event, |
| 599 const ui::LatencyInfo& latency_info) override; | 603 const ui::LatencyInfo& latency_info) override; |
| 600 void IncrementInFlightEventCount() override; | 604 void IncrementInFlightEventCount() override; |
| 601 void DecrementInFlightEventCount() override; | 605 void DecrementInFlightEventCount() override; |
| 602 void OnHasTouchEventHandlers(bool has_handlers) override; | 606 void OnHasTouchEventHandlers(bool has_handlers) override; |
| 603 void DidFlush() override; | 607 void DidFlush() override; |
| 604 void DidOverscroll(const DidOverscrollParams& params) override; | 608 void DidOverscroll(const DidOverscrollParams& params) override; |
| 605 void DidStopFlinging() override; | 609 void DidStopFlinging() override; |
| 606 | 610 |
| 611 // Dispatch input events with latency information |
| 612 void DispatchInputEventWithLatencyInfo(const blink::WebInputEvent& event, |
| 613 ui::LatencyInfo* latency); |
| 614 |
| 607 // InputAckHandler | 615 // InputAckHandler |
| 608 void OnKeyboardEventAck(const NativeWebKeyboardEventWithLatencyInfo& event, | 616 void OnKeyboardEventAck(const NativeWebKeyboardEventWithLatencyInfo& event, |
| 609 InputEventAckState ack_result) override; | 617 InputEventAckState ack_result) override; |
| 610 void OnMouseEventAck(const MouseEventWithLatencyInfo& event, | 618 void OnMouseEventAck(const MouseEventWithLatencyInfo& event, |
| 611 InputEventAckState ack_result) override; | 619 InputEventAckState ack_result) override; |
| 612 void OnWheelEventAck(const MouseWheelEventWithLatencyInfo& event, | 620 void OnWheelEventAck(const MouseWheelEventWithLatencyInfo& event, |
| 613 InputEventAckState ack_result) override; | 621 InputEventAckState ack_result) override; |
| 614 void OnTouchEventAck(const TouchEventWithLatencyInfo& event, | 622 void OnTouchEventAck(const TouchEventWithLatencyInfo& event, |
| 615 InputEventAckState ack_result) override; | 623 InputEventAckState ack_result) override; |
| 616 void OnGestureEventAck(const GestureEventWithLatencyInfo& event, | 624 void OnGestureEventAck(const GestureEventWithLatencyInfo& event, |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 694 bool waiting_for_screen_rects_ack_; | 702 bool waiting_for_screen_rects_ack_; |
| 695 gfx::Rect last_view_screen_rect_; | 703 gfx::Rect last_view_screen_rect_; |
| 696 gfx::Rect last_window_screen_rect_; | 704 gfx::Rect last_window_screen_rect_; |
| 697 | 705 |
| 698 // Keyboard event listeners. | 706 // Keyboard event listeners. |
| 699 std::vector<KeyPressEventCallback> key_press_event_callbacks_; | 707 std::vector<KeyPressEventCallback> key_press_event_callbacks_; |
| 700 | 708 |
| 701 // Mouse event callbacks. | 709 // Mouse event callbacks. |
| 702 std::vector<MouseEventCallback> mouse_event_callbacks_; | 710 std::vector<MouseEventCallback> mouse_event_callbacks_; |
| 703 | 711 |
| 712 // Input event callbacks. |
| 713 base::ObserverList<RenderWidgetHost::InputEventObserver> |
| 714 input_event_observers_; |
| 715 |
| 704 // If true, then we should repaint when restoring even if we have a | 716 // If true, then we should repaint when restoring even if we have a |
| 705 // backingstore. This flag is set to true if we receive a paint message | 717 // backingstore. This flag is set to true if we receive a paint message |
| 706 // while is_hidden_ to true. Even though we tell the render widget to hide | 718 // while is_hidden_ to true. Even though we tell the render widget to hide |
| 707 // itself, a paint message could already be in flight at that point. | 719 // itself, a paint message could already be in flight at that point. |
| 708 bool needs_repainting_on_restore_; | 720 bool needs_repainting_on_restore_; |
| 709 | 721 |
| 710 // This is true if the renderer is currently unresponsive. | 722 // This is true if the renderer is currently unresponsive. |
| 711 bool is_unresponsive_; | 723 bool is_unresponsive_; |
| 712 | 724 |
| 713 // This value denotes the number of input events yet to be acknowledged | 725 // This value denotes the number of input events yet to be acknowledged |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 809 base::TimeDelta new_content_rendering_delay_; | 821 base::TimeDelta new_content_rendering_delay_; |
| 810 | 822 |
| 811 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; | 823 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; |
| 812 | 824 |
| 813 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); | 825 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); |
| 814 }; | 826 }; |
| 815 | 827 |
| 816 } // namespace content | 828 } // namespace content |
| 817 | 829 |
| 818 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 830 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
| OLD | NEW |