| 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> |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 #endif | 76 #endif |
| 77 | 77 |
| 78 namespace content { | 78 namespace content { |
| 79 class BackingStore; | 79 class BackingStore; |
| 80 class InputRouter; | 80 class InputRouter; |
| 81 class MockRenderWidgetHost; | 81 class MockRenderWidgetHost; |
| 82 class OverscrollController; | 82 class OverscrollController; |
| 83 class RenderWidgetHostDelegate; | 83 class RenderWidgetHostDelegate; |
| 84 class RenderWidgetHostViewPort; | 84 class RenderWidgetHostViewPort; |
| 85 class SyntheticGestureController; | 85 class SyntheticGestureController; |
| 86 class TimeoutMonitor; |
| 86 struct EditCommand; | 87 struct EditCommand; |
| 87 | 88 |
| 88 // This implements the RenderWidgetHost interface that is exposed to | 89 // This implements the RenderWidgetHost interface that is exposed to |
| 89 // embedders of content, and adds things only visible to content. | 90 // embedders of content, and adds things only visible to content. |
| 90 class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost, | 91 class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost, |
| 91 public InputRouterClient, | 92 public InputRouterClient, |
| 92 public InputAckHandler, | 93 public InputAckHandler, |
| 93 public IPC::Listener { | 94 public IPC::Listener { |
| 94 public: | 95 public: |
| 95 // routing_id can be MSG_ROUTING_NONE, in which case the next available | 96 // routing_id can be MSG_ROUTING_NONE, in which case the next available |
| (...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 629 | 630 |
| 630 // This value indicates how long to wait before we consider a renderer hung. | 631 // This value indicates how long to wait before we consider a renderer hung. |
| 631 int hung_renderer_delay_ms_; | 632 int hung_renderer_delay_ms_; |
| 632 | 633 |
| 633 private: | 634 private: |
| 634 friend class MockRenderWidgetHost; | 635 friend class MockRenderWidgetHost; |
| 635 | 636 |
| 636 // Tell this object to destroy itself. | 637 // Tell this object to destroy itself. |
| 637 void Destroy(); | 638 void Destroy(); |
| 638 | 639 |
| 639 // Checks whether the renderer is hung and calls NotifyRendererUnresponsive | 640 // Called by |hang_timeout_monitor_| on delayed response from the renderer. |
| 640 // if it is. | 641 void RendererIsUnresponsive(); |
| 641 void CheckRendererIsUnresponsive(); | |
| 642 | 642 |
| 643 // Called if we know the renderer is responsive. When we currently think the | 643 // Called if we know the renderer is responsive. When we currently think the |
| 644 // renderer is unresponsive, this will clear that state and call | 644 // renderer is unresponsive, this will clear that state and call |
| 645 // NotifyRendererResponsive. | 645 // NotifyRendererResponsive. |
| 646 void RendererIsResponsive(); | 646 void RendererIsResponsive(); |
| 647 | 647 |
| 648 // IPC message handlers | 648 // IPC message handlers |
| 649 void OnRenderViewReady(); | 649 void OnRenderViewReady(); |
| 650 void OnRenderProcessGone(int status, int error_code); | 650 void OnRenderProcessGone(int status, int error_code); |
| 651 void OnClose(); | 651 void OnClose(); |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 903 | 903 |
| 904 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; | 904 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; |
| 905 | 905 |
| 906 scoped_ptr<SyntheticGestureController> synthetic_gesture_controller_; | 906 scoped_ptr<SyntheticGestureController> synthetic_gesture_controller_; |
| 907 | 907 |
| 908 // Receives and handles all input events. | 908 // Receives and handles all input events. |
| 909 scoped_ptr<InputRouter> input_router_; | 909 scoped_ptr<InputRouter> input_router_; |
| 910 | 910 |
| 911 scoped_ptr<OverscrollController> overscroll_controller_; | 911 scoped_ptr<OverscrollController> overscroll_controller_; |
| 912 | 912 |
| 913 scoped_ptr<TimeoutMonitor> hang_monitor_timeout_; |
| 914 |
| 913 #if defined(OS_WIN) | 915 #if defined(OS_WIN) |
| 914 std::list<HWND> dummy_windows_for_activation_; | 916 std::list<HWND> dummy_windows_for_activation_; |
| 915 #endif | 917 #endif |
| 916 | 918 |
| 917 // List of callbacks for pending snapshot requests to the renderer. | 919 // List of callbacks for pending snapshot requests to the renderer. |
| 918 std::queue<base::Callback<void(bool, const SkBitmap&)> > pending_snapshots_; | 920 std::queue<base::Callback<void(bool, const SkBitmap&)> > pending_snapshots_; |
| 919 | 921 |
| 920 int64 last_input_number_; | 922 int64 last_input_number_; |
| 921 | 923 |
| 922 BrowserRenderingStats rendering_stats_; | 924 BrowserRenderingStats rendering_stats_; |
| 923 | 925 |
| 924 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); | 926 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); |
| 925 }; | 927 }; |
| 926 | 928 |
| 927 } // namespace content | 929 } // namespace content |
| 928 | 930 |
| 929 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 931 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
| OLD | NEW |