| 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_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <deque> | 9 #include <deque> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 526 // Indicates if the render widget host should track the render widget's size | 526 // Indicates if the render widget host should track the render widget's size |
| 527 // as opposed to visa versa. | 527 // as opposed to visa versa. |
| 528 void SetShouldAutoResize(bool enable); | 528 void SetShouldAutoResize(bool enable); |
| 529 | 529 |
| 530 protected: | 530 protected: |
| 531 // true if a renderer has once been valid. We use this flag to display a sad | 531 // true if a renderer has once been valid. We use this flag to display a sad |
| 532 // tab only when we lose our renderer and not if a paint occurs during | 532 // tab only when we lose our renderer and not if a paint occurs during |
| 533 // initialization. | 533 // initialization. |
| 534 bool renderer_initialized_; | 534 bool renderer_initialized_; |
| 535 | 535 |
| 536 // This value indicates how long to wait before we consider a renderer hung. |
| 537 int hung_renderer_delay_ms_; |
| 538 |
| 536 private: | 539 private: |
| 537 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostTest, Resize); | 540 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostTest, Resize); |
| 538 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostTest, ResizeThenCrash); | 541 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostTest, ResizeThenCrash); |
| 539 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostTest, HiddenPaint); | 542 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostTest, HiddenPaint); |
| 540 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostTest, PaintAtSize); | 543 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostTest, PaintAtSize); |
| 541 | 544 |
| 542 // Tell this object to destroy itself. | 545 // Tell this object to destroy itself. |
| 543 void Destroy(); | 546 void Destroy(); |
| 544 | 547 |
| 545 // Checks whether the renderer is hung and calls NotifyRendererUnresponsive | 548 // Checks whether the renderer is hung and calls NotifyRendererUnresponsive |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 736 // itself, a paint message could already be in flight at that point. | 739 // itself, a paint message could already be in flight at that point. |
| 737 bool needs_repainting_on_restore_; | 740 bool needs_repainting_on_restore_; |
| 738 | 741 |
| 739 // This is true if the renderer is currently unresponsive. | 742 // This is true if the renderer is currently unresponsive. |
| 740 bool is_unresponsive_; | 743 bool is_unresponsive_; |
| 741 | 744 |
| 742 // The following value indicates a time in the future when we would consider | 745 // The following value indicates a time in the future when we would consider |
| 743 // the renderer hung if it does not generate an appropriate response message. | 746 // the renderer hung if it does not generate an appropriate response message. |
| 744 base::Time time_when_considered_hung_; | 747 base::Time time_when_considered_hung_; |
| 745 | 748 |
| 749 // This value denotes the number of input events yet to be acknowledged |
| 750 // by the renderer. |
| 751 int in_flight_event_count_; |
| 752 |
| 746 // This timer runs to check if time_when_considered_hung_ has past. | 753 // This timer runs to check if time_when_considered_hung_ has past. |
| 747 base::OneShotTimer<RenderWidgetHost> hung_renderer_timer_; | 754 base::OneShotTimer<RenderWidgetHost> hung_renderer_timer_; |
| 748 | 755 |
| 749 // Flag to detect recursive calls to GetBackingStore(). | 756 // Flag to detect recursive calls to GetBackingStore(). |
| 750 bool in_get_backing_store_; | 757 bool in_get_backing_store_; |
| 751 | 758 |
| 752 // Set when we call DidPaintRect/DidScrollRect on the view. | 759 // Set when we call DidPaintRect/DidScrollRect on the view. |
| 753 bool view_being_painted_; | 760 bool view_being_painted_; |
| 754 | 761 |
| 755 // Used for UMA histogram logging to measure the time for a repaint view | 762 // Used for UMA histogram logging to measure the time for a repaint view |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 797 gfx::Point last_scroll_offset_; | 804 gfx::Point last_scroll_offset_; |
| 798 | 805 |
| 799 bool pending_mouse_lock_request_; | 806 bool pending_mouse_lock_request_; |
| 800 | 807 |
| 801 base::WeakPtrFactory<RenderWidgetHost> weak_factory_; | 808 base::WeakPtrFactory<RenderWidgetHost> weak_factory_; |
| 802 | 809 |
| 803 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHost); | 810 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHost); |
| 804 }; | 811 }; |
| 805 | 812 |
| 806 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ | 813 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ |
| OLD | NEW |