| 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 <deque> | 8 #include <deque> |
| 9 #include <list> | 9 #include <list> |
| 10 #include <map> | 10 #include <map> |
| 11 #include <queue> | 11 #include <queue> |
| 12 #include <string> | 12 #include <string> |
| 13 #include <utility> | 13 #include <utility> |
| 14 #include <vector> | 14 #include <vector> |
| 15 | 15 |
| 16 #include "base/callback.h" | 16 #include "base/callback.h" |
| 17 #include "base/gtest_prod_util.h" | 17 #include "base/gtest_prod_util.h" |
| 18 #include "base/memory/scoped_ptr.h" | 18 #include "base/memory/scoped_ptr.h" |
| 19 #include "base/memory/weak_ptr.h" | 19 #include "base/memory/weak_ptr.h" |
| 20 #include "base/observer_list.h" | 20 #include "base/observer_list.h" |
| 21 #include "base/process/kill.h" | 21 #include "base/process/kill.h" |
| 22 #include "base/strings/string16.h" | 22 #include "base/strings/string16.h" |
| 23 #include "base/time/time.h" | 23 #include "base/time/time.h" |
| 24 #include "base/timer/timer.h" | 24 #include "base/timer/timer.h" |
| 25 #include "build/build_config.h" | 25 #include "build/build_config.h" |
| 26 #include "content/browser/renderer_host/input/input_ack_handler.h" |
| 26 #include "content/browser/renderer_host/input/input_router_client.h" | 27 #include "content/browser/renderer_host/input/input_router_client.h" |
| 27 #include "content/browser/renderer_host/smooth_scroll_gesture_controller.h" | 28 #include "content/browser/renderer_host/smooth_scroll_gesture_controller.h" |
| 28 #include "content/common/browser_rendering_stats.h" | 29 #include "content/common/browser_rendering_stats.h" |
| 29 #include "content/common/view_message_enums.h" | 30 #include "content/common/view_message_enums.h" |
| 30 #include "content/port/browser/event_with_latency_info.h" | 31 #include "content/port/browser/event_with_latency_info.h" |
| 31 #include "content/port/common/input_event_ack_state.h" | 32 #include "content/port/common/input_event_ack_state.h" |
| 32 #include "content/public/browser/render_widget_host.h" | 33 #include "content/public/browser/render_widget_host.h" |
| 33 #include "content/public/common/page_zoom.h" | 34 #include "content/public/common/page_zoom.h" |
| 34 #include "ipc/ipc_listener.h" | 35 #include "ipc/ipc_listener.h" |
| 35 #include "ui/base/ime/text_input_mode.h" | 36 #include "ui/base/ime/text_input_mode.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 class OverscrollController; | 79 class OverscrollController; |
| 79 class RenderWidgetHostDelegate; | 80 class RenderWidgetHostDelegate; |
| 80 class RenderWidgetHostViewPort; | 81 class RenderWidgetHostViewPort; |
| 81 class SmoothScrollGestureController; | 82 class SmoothScrollGestureController; |
| 82 struct EditCommand; | 83 struct EditCommand; |
| 83 | 84 |
| 84 // This implements the RenderWidgetHost interface that is exposed to | 85 // This implements the RenderWidgetHost interface that is exposed to |
| 85 // embedders of content, and adds things only visible to content. | 86 // embedders of content, and adds things only visible to content. |
| 86 class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost, | 87 class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost, |
| 87 public InputRouterClient, | 88 public InputRouterClient, |
| 89 public InputAckHandler, |
| 88 public IPC::Listener { | 90 public IPC::Listener { |
| 89 public: | 91 public: |
| 90 // routing_id can be MSG_ROUTING_NONE, in which case the next available | 92 // routing_id can be MSG_ROUTING_NONE, in which case the next available |
| 91 // routing id is taken from the RenderProcessHost. | 93 // routing id is taken from the RenderProcessHost. |
| 92 // If this object outlives |delegate|, DetachDelegate() must be called when | 94 // If this object outlives |delegate|, DetachDelegate() must be called when |
| 93 // |delegate| goes away. | 95 // |delegate| goes away. |
| 94 RenderWidgetHostImpl(RenderWidgetHostDelegate* delegate, | 96 RenderWidgetHostImpl(RenderWidgetHostDelegate* delegate, |
| 95 RenderProcessHost* process, | 97 RenderProcessHost* process, |
| 96 int routing_id); | 98 int routing_id); |
| 97 virtual ~RenderWidgetHostImpl(); | 99 virtual ~RenderWidgetHostImpl(); |
| (...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 722 virtual bool OnSendTouchEvent( | 724 virtual bool OnSendTouchEvent( |
| 723 const TouchEventWithLatencyInfo& touch_event) OVERRIDE; | 725 const TouchEventWithLatencyInfo& touch_event) OVERRIDE; |
| 724 virtual bool OnSendGestureEvent( | 726 virtual bool OnSendGestureEvent( |
| 725 const GestureEventWithLatencyInfo& gesture_event) OVERRIDE; | 727 const GestureEventWithLatencyInfo& gesture_event) OVERRIDE; |
| 726 virtual bool OnSendMouseEventImmediately( | 728 virtual bool OnSendMouseEventImmediately( |
| 727 const MouseEventWithLatencyInfo& mouse_event) OVERRIDE; | 729 const MouseEventWithLatencyInfo& mouse_event) OVERRIDE; |
| 728 virtual bool OnSendTouchEventImmediately( | 730 virtual bool OnSendTouchEventImmediately( |
| 729 const TouchEventWithLatencyInfo& touch_event) OVERRIDE; | 731 const TouchEventWithLatencyInfo& touch_event) OVERRIDE; |
| 730 virtual bool OnSendGestureEventImmediately( | 732 virtual bool OnSendGestureEventImmediately( |
| 731 const GestureEventWithLatencyInfo& gesture_event) OVERRIDE; | 733 const GestureEventWithLatencyInfo& gesture_event) OVERRIDE; |
| 734 virtual void SetNeedsFlush() OVERRIDE; |
| 735 virtual void DidFlush() OVERRIDE; |
| 736 |
| 737 // InputAckHandler |
| 732 virtual void OnKeyboardEventAck(const NativeWebKeyboardEvent& event, | 738 virtual void OnKeyboardEventAck(const NativeWebKeyboardEvent& event, |
| 733 InputEventAckState ack_result) OVERRIDE; | 739 InputEventAckState ack_result) OVERRIDE; |
| 734 virtual void OnWheelEventAck(const WebKit::WebMouseWheelEvent& event, | 740 virtual void OnWheelEventAck(const WebKit::WebMouseWheelEvent& event, |
| 735 InputEventAckState ack_result) OVERRIDE; | 741 InputEventAckState ack_result) OVERRIDE; |
| 736 virtual void OnTouchEventAck(const TouchEventWithLatencyInfo& event, | 742 virtual void OnTouchEventAck(const TouchEventWithLatencyInfo& event, |
| 737 InputEventAckState ack_result) OVERRIDE; | 743 InputEventAckState ack_result) OVERRIDE; |
| 738 virtual void OnGestureEventAck(const WebKit::WebGestureEvent& event, | 744 virtual void OnGestureEventAck(const WebKit::WebGestureEvent& event, |
| 739 InputEventAckState ack_result) OVERRIDE; | 745 InputEventAckState ack_result) OVERRIDE; |
| 740 virtual void OnUnexpectedEventAck(bool bad_message) OVERRIDE; | 746 virtual void OnUnexpectedEventAck(bool bad_message) OVERRIDE; |
| 741 | 747 |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 916 int64 last_input_number_; | 922 int64 last_input_number_; |
| 917 | 923 |
| 918 BrowserRenderingStats rendering_stats_; | 924 BrowserRenderingStats rendering_stats_; |
| 919 | 925 |
| 920 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); | 926 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); |
| 921 }; | 927 }; |
| 922 | 928 |
| 923 } // namespace content | 929 } // namespace content |
| 924 | 930 |
| 925 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 931 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
| OLD | NEW |