| 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 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 570 // unnecessary IPCs to RenderWidget (e.g., asking for monitor updates while | 570 // unnecessary IPCs to RenderWidget (e.g., asking for monitor updates while |
| 571 // we are already receiving updates), when | 571 // we are already receiving updates), when |
| 572 // |monitoring_composition_info_| == |monitor_updates| no IPC is sent to the | 572 // |monitoring_composition_info_| == |monitor_updates| no IPC is sent to the |
| 573 // renderer unless it is for an immediate request. | 573 // renderer unless it is for an immediate request. |
| 574 void RequestCompositionUpdates(bool immediate_request, bool monitor_updates); | 574 void RequestCompositionUpdates(bool immediate_request, bool monitor_updates); |
| 575 | 575 |
| 576 // Submits the frame received from RenderWidget. | 576 // Submits the frame received from RenderWidget. |
| 577 void SubmitCompositorFrame(const cc::LocalSurfaceId& local_surface_id, | 577 void SubmitCompositorFrame(const cc::LocalSurfaceId& local_surface_id, |
| 578 cc::CompositorFrame frame); | 578 cc::CompositorFrame frame); |
| 579 | 579 |
| 580 const cc::CompositorFrameMetadata& last_frame_metadata() { |
| 581 return last_frame_metadata_; |
| 582 } |
| 583 |
| 580 protected: | 584 protected: |
| 581 // --------------------------------------------------------------------------- | 585 // --------------------------------------------------------------------------- |
| 582 // The following method is overridden by RenderViewHost to send upwards to | 586 // The following method is overridden by RenderViewHost to send upwards to |
| 583 // its delegate. | 587 // its delegate. |
| 584 | 588 |
| 585 // Callback for notification that we failed to receive any rendered graphics | 589 // Callback for notification that we failed to receive any rendered graphics |
| 586 // from a newly loaded page. Used for testing. | 590 // from a newly loaded page. Used for testing. |
| 587 virtual void NotifyNewContentRenderingTimeoutForTesting() {} | 591 virtual void NotifyNewContentRenderingTimeoutForTesting() {} |
| 588 | 592 |
| 589 // --------------------------------------------------------------------------- | 593 // --------------------------------------------------------------------------- |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 941 // factor change, a new LocalSurfaceId must be created. | 945 // factor change, a new LocalSurfaceId must be created. |
| 942 cc::LocalSurfaceId last_local_surface_id_; | 946 cc::LocalSurfaceId last_local_surface_id_; |
| 943 gfx::Size last_frame_size_; | 947 gfx::Size last_frame_size_; |
| 944 float last_device_scale_factor_; | 948 float last_device_scale_factor_; |
| 945 | 949 |
| 946 // Each instance of RendererCompositorFrameSink has an ID that we keep track | 950 // Each instance of RendererCompositorFrameSink has an ID that we keep track |
| 947 // of so we can tell when a new instance has been created for the purpose of | 951 // of so we can tell when a new instance has been created for the purpose of |
| 948 // not returning stale resources. | 952 // not returning stale resources. |
| 949 uint32_t last_compositor_frame_sink_id_ = 0; | 953 uint32_t last_compositor_frame_sink_id_ = 0; |
| 950 | 954 |
| 955 cc::CompositorFrameMetadata last_frame_metadata_; |
| 956 |
| 951 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; | 957 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; |
| 952 | 958 |
| 953 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); | 959 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); |
| 954 }; | 960 }; |
| 955 | 961 |
| 956 } // namespace content | 962 } // namespace content |
| 957 | 963 |
| 958 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 964 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
| OLD | NEW |