| 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 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 586 void RequestBeginFrameForSynthesizedInput( | 586 void RequestBeginFrameForSynthesizedInput( |
| 587 base::OnceClosure begin_frame_callback) override; | 587 base::OnceClosure begin_frame_callback) override; |
| 588 bool HasGestureStopped() override; | 588 bool HasGestureStopped() override; |
| 589 | 589 |
| 590 // cc::mojom::MojoCompositorFrameSink implementation. | 590 // cc::mojom::MojoCompositorFrameSink implementation. |
| 591 void SetNeedsBeginFrame(bool needs_begin_frame) override; | 591 void SetNeedsBeginFrame(bool needs_begin_frame) override; |
| 592 void SubmitCompositorFrame(const cc::LocalSurfaceId& local_surface_id, | 592 void SubmitCompositorFrame(const cc::LocalSurfaceId& local_surface_id, |
| 593 cc::CompositorFrame frame) override; | 593 cc::CompositorFrame frame) override; |
| 594 void DidNotProduceFrame(const cc::BeginFrameAck& ack) override; | 594 void DidNotProduceFrame(const cc::BeginFrameAck& ack) override; |
| 595 | 595 |
| 596 // Signals that a frame with token |frame_token| was finished processing. If |
| 597 // there are any queued messages belonging to it, they will be processed. |
| 598 void DidProcessFrame(uint32_t frame_token); |
| 599 |
| 596 protected: | 600 protected: |
| 597 // --------------------------------------------------------------------------- | 601 // --------------------------------------------------------------------------- |
| 598 // The following method is overridden by RenderViewHost to send upwards to | 602 // The following method is overridden by RenderViewHost to send upwards to |
| 599 // its delegate. | 603 // its delegate. |
| 600 | 604 |
| 601 // Callback for notification that we failed to receive any rendered graphics | 605 // Callback for notification that we failed to receive any rendered graphics |
| 602 // from a newly loaded page. Used for testing. | 606 // from a newly loaded page. Used for testing. |
| 603 virtual void NotifyNewContentRenderingTimeoutForTesting() {} | 607 virtual void NotifyNewContentRenderingTimeoutForTesting() {} |
| 604 | 608 |
| 605 // --------------------------------------------------------------------------- | 609 // --------------------------------------------------------------------------- |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 747 void StartHangMonitorTimeout(base::TimeDelta delay, | 751 void StartHangMonitorTimeout(base::TimeDelta delay, |
| 748 blink::WebInputEvent::Type event_type); | 752 blink::WebInputEvent::Type event_type); |
| 749 | 753 |
| 750 // Stops all existing hang monitor timeouts and assumes the renderer is | 754 // Stops all existing hang monitor timeouts and assumes the renderer is |
| 751 // responsive. | 755 // responsive. |
| 752 void StopHangMonitorTimeout(); | 756 void StopHangMonitorTimeout(); |
| 753 | 757 |
| 754 // Used for UMA logging how long the renderer was unresponsive. | 758 // Used for UMA logging how long the renderer was unresponsive. |
| 755 void LogHangMonitorUnresponsive(); | 759 void LogHangMonitorUnresponsive(); |
| 756 | 760 |
| 757 // Signals that a frame with token |frame_token| was finished processing. If | |
| 758 // there are any queued messages belonging to it, they will be processed. | |
| 759 void DidProcessFrame(uint32_t frame_token); | |
| 760 | |
| 761 // Once both the frame and its swap messages arrive, we call this method to | 761 // Once both the frame and its swap messages arrive, we call this method to |
| 762 // process the messages. Virtual for tests. | 762 // process the messages. Virtual for tests. |
| 763 virtual void ProcessSwapMessages(std::vector<IPC::Message> messages); | 763 virtual void ProcessSwapMessages(std::vector<IPC::Message> messages); |
| 764 | 764 |
| 765 #if defined(OS_MACOSX) | 765 #if defined(OS_MACOSX) |
| 766 device::mojom::WakeLockService* GetWakeLockService(); | 766 device::mojom::WakeLockService* GetWakeLockService(); |
| 767 #endif | 767 #endif |
| 768 | 768 |
| 769 // true if a renderer has once been valid. We use this flag to display a sad | 769 // true if a renderer has once been valid. We use this flag to display a sad |
| 770 // tab only when we lose our renderer and not if a paint occurs during | 770 // tab only when we lose our renderer and not if a paint occurs during |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 989 base::OnceClosure begin_frame_callback_; | 989 base::OnceClosure begin_frame_callback_; |
| 990 | 990 |
| 991 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; | 991 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; |
| 992 | 992 |
| 993 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); | 993 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); |
| 994 }; | 994 }; |
| 995 | 995 |
| 996 } // namespace content | 996 } // namespace content |
| 997 | 997 |
| 998 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 998 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
| OLD | NEW |