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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 // Returns all RenderWidgetHosts including swapped out ones for | 117 // Returns all RenderWidgetHosts including swapped out ones for |
118 // internal use. The public interface | 118 // internal use. The public interface |
119 // RendgerWidgetHost::GetRenderWidgetHosts only returns active ones. | 119 // RendgerWidgetHost::GetRenderWidgetHosts only returns active ones. |
120 static scoped_ptr<RenderWidgetHostIterator> GetAllRenderWidgetHosts(); | 120 static scoped_ptr<RenderWidgetHostIterator> GetAllRenderWidgetHosts(); |
121 | 121 |
122 // Use RenderWidgetHostImpl::From(rwh) to downcast a | 122 // Use RenderWidgetHostImpl::From(rwh) to downcast a |
123 // RenderWidgetHost to a RenderWidgetHostImpl. Internally, this | 123 // RenderWidgetHost to a RenderWidgetHostImpl. Internally, this |
124 // uses RenderWidgetHost::AsRenderWidgetHostImpl(). | 124 // uses RenderWidgetHost::AsRenderWidgetHostImpl(). |
125 static RenderWidgetHostImpl* From(RenderWidgetHost* rwh); | 125 static RenderWidgetHostImpl* From(RenderWidgetHost* rwh); |
126 | 126 |
127 void set_hung_renderer_delay_ms(const base::TimeDelta& timeout) { | 127 void set_hung_renderer_delay(const base::TimeDelta& delay) { |
128 hung_renderer_delay_ms_ = timeout.InMilliseconds(); | 128 hung_renderer_delay_ = delay; |
129 } | 129 } |
130 | 130 |
131 // RenderWidgetHost implementation. | 131 // RenderWidgetHost implementation. |
132 void UpdateTextDirection(blink::WebTextDirection direction) override; | 132 void UpdateTextDirection(blink::WebTextDirection direction) override; |
133 void NotifyTextDirection() override; | 133 void NotifyTextDirection() override; |
134 void Focus() override; | 134 void Focus() override; |
135 void Blur() override; | 135 void Blur() override; |
136 void SetActive(bool active) override; | 136 void SetActive(bool active) override; |
137 void CopyFromBackingStore(const gfx::Rect& src_rect, | 137 void CopyFromBackingStore(const gfx::Rect& src_rect, |
138 const gfx::Size& accelerated_dst_size, | 138 const gfx::Size& accelerated_dst_size, |
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
585 // TODO(ccameron): Fix this. | 585 // TODO(ccameron): Fix this. |
586 // http://crbug.com/404828 | 586 // http://crbug.com/404828 |
587 base::WeakPtr<RenderWidgetHostViewBase> view_weak_; | 587 base::WeakPtr<RenderWidgetHostViewBase> view_weak_; |
588 | 588 |
589 // true if a renderer has once been valid. We use this flag to display a sad | 589 // true if a renderer has once been valid. We use this flag to display a sad |
590 // tab only when we lose our renderer and not if a paint occurs during | 590 // tab only when we lose our renderer and not if a paint occurs during |
591 // initialization. | 591 // initialization. |
592 bool renderer_initialized_; | 592 bool renderer_initialized_; |
593 | 593 |
594 // This value indicates how long to wait before we consider a renderer hung. | 594 // This value indicates how long to wait before we consider a renderer hung. |
595 int64 hung_renderer_delay_ms_; | 595 base::TimeDelta hung_renderer_delay_; |
596 | 596 |
597 private: | 597 private: |
598 friend class MockRenderWidgetHost; | 598 friend class MockRenderWidgetHost; |
599 | 599 |
600 // Tell this object to destroy itself. | 600 // Tell this object to destroy itself. |
601 void Destroy(); | 601 void Destroy(); |
602 | 602 |
603 // Called by |hang_monitor_timeout_| on delayed response from the renderer. | 603 // Called by |hang_monitor_timeout_| on delayed response from the renderer. |
604 void RendererIsUnresponsive(); | 604 void RendererIsUnresponsive(); |
605 | 605 |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
855 bool is_focused_; | 855 bool is_focused_; |
856 | 856 |
857 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; | 857 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; |
858 | 858 |
859 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); | 859 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); |
860 }; | 860 }; |
861 | 861 |
862 } // namespace content | 862 } // namespace content |
863 | 863 |
864 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 864 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
OLD | NEW |