| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_CHILD_FRAME_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_CHILD_FRAME_H_ |
| 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_CHILD_FRAME_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_CHILD_FRAME_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| 11 #include <deque> | 11 #include <deque> |
| 12 #include <memory> | 12 #include <memory> |
| 13 #include <vector> | 13 #include <vector> |
| 14 | 14 |
| 15 #include "base/callback.h" | 15 #include "base/callback.h" |
| 16 #include "base/macros.h" | 16 #include "base/macros.h" |
| 17 #include "build/build_config.h" | 17 #include "build/build_config.h" |
| 18 #include "cc/output/begin_frame_args.h" |
| 18 #include "cc/resources/returned_resource.h" | 19 #include "cc/resources/returned_resource.h" |
| 19 #include "cc/scheduler/begin_frame_source.h" | 20 #include "cc/scheduler/begin_frame_source.h" |
| 20 #include "cc/surfaces/surface_factory_client.h" | 21 #include "cc/surfaces/surface_factory_client.h" |
| 21 #include "cc/surfaces/surface_id_allocator.h" | 22 #include "cc/surfaces/surface_id_allocator.h" |
| 22 #include "content/browser/compositor/image_transport_factory.h" | 23 #include "content/browser/compositor/image_transport_factory.h" |
| 23 #include "content/browser/renderer_host/event_with_latency_info.h" | 24 #include "content/browser/renderer_host/event_with_latency_info.h" |
| 24 #include "content/browser/renderer_host/render_widget_host_view_base.h" | 25 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
| 25 #include "content/common/content_export.h" | 26 #include "content/common/content_export.h" |
| 26 #include "content/common/input/input_event_ack_state.h" | 27 #include "content/common/input/input_event_ack_state.h" |
| 27 #include "content/public/browser/readback_types.h" | 28 #include "content/public/browser/readback_types.h" |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 void CopyFromCompositingSurfaceToVideoFrame( | 108 void CopyFromCompositingSurfaceToVideoFrame( |
| 108 const gfx::Rect& src_subrect, | 109 const gfx::Rect& src_subrect, |
| 109 const scoped_refptr<media::VideoFrame>& target, | 110 const scoped_refptr<media::VideoFrame>& target, |
| 110 const base::Callback<void(const gfx::Rect&, bool)>& callback) override; | 111 const base::Callback<void(const gfx::Rect&, bool)>& callback) override; |
| 111 bool CanCopyToVideoFrame() const override; | 112 bool CanCopyToVideoFrame() const override; |
| 112 bool HasAcceleratedSurface(const gfx::Size& desired_size) override; | 113 bool HasAcceleratedSurface(const gfx::Size& desired_size) override; |
| 113 void GestureEventAck(const blink::WebGestureEvent& event, | 114 void GestureEventAck(const blink::WebGestureEvent& event, |
| 114 InputEventAckState ack_result) override; | 115 InputEventAckState ack_result) override; |
| 115 void OnSwapCompositorFrame(uint32_t compositor_frame_sink_id, | 116 void OnSwapCompositorFrame(uint32_t compositor_frame_sink_id, |
| 116 cc::CompositorFrame frame) override; | 117 cc::CompositorFrame frame) override; |
| 118 void OnBeginFrameDidNotDraw(const cc::BeginFrameAck& ack) override; |
| 117 // Since the URL of content rendered by this class is not displayed in | 119 // Since the URL of content rendered by this class is not displayed in |
| 118 // the URL bar, this method does not need an implementation. | 120 // the URL bar, this method does not need an implementation. |
| 119 void ClearCompositorFrame() override {} | 121 void ClearCompositorFrame() override {} |
| 120 gfx::Rect GetBoundsInRootWindow() override; | 122 gfx::Rect GetBoundsInRootWindow() override; |
| 121 void ProcessAckedTouchEvent(const TouchEventWithLatencyInfo& touch, | 123 void ProcessAckedTouchEvent(const TouchEventWithLatencyInfo& touch, |
| 122 InputEventAckState ack_result) override; | 124 InputEventAckState ack_result) override; |
| 123 bool LockMouse() override; | 125 bool LockMouse() override; |
| 124 void UnlockMouse() override; | 126 void UnlockMouse() override; |
| 125 cc::FrameSinkId GetFrameSinkId() override; | 127 cc::FrameSinkId GetFrameSinkId() override; |
| 126 void ProcessKeyboardEvent(const NativeWebKeyboardEvent& event) override; | 128 void ProcessKeyboardEvent(const NativeWebKeyboardEvent& event) override; |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 friend class RenderWidgetHostViewChildFrameTest; | 201 friend class RenderWidgetHostViewChildFrameTest; |
| 200 friend class RenderWidgetHostViewGuestSurfaceTest; | 202 friend class RenderWidgetHostViewGuestSurfaceTest; |
| 201 | 203 |
| 202 explicit RenderWidgetHostViewChildFrame(RenderWidgetHost* widget); | 204 explicit RenderWidgetHostViewChildFrame(RenderWidgetHost* widget); |
| 203 void Init(); | 205 void Init(); |
| 204 | 206 |
| 205 // Clears current compositor surface, if one is in use. | 207 // Clears current compositor surface, if one is in use. |
| 206 void ClearCompositorSurfaceIfNecessary(); | 208 void ClearCompositorSurfaceIfNecessary(); |
| 207 | 209 |
| 208 void ProcessFrameSwappedCallbacks(); | 210 void ProcessFrameSwappedCallbacks(); |
| 211 void DidSwapFrame(uint64_t source_id, |
| 212 uint64_t sequence_number, |
| 213 uint64_t latest_confirmed_frame); |
| 209 | 214 |
| 210 // The last scroll offset of the view. | 215 // The last scroll offset of the view. |
| 211 gfx::Vector2dF last_scroll_offset_; | 216 gfx::Vector2dF last_scroll_offset_; |
| 212 | 217 |
| 213 // Members will become private when RenderWidgetHostViewGuest is removed. | 218 // Members will become private when RenderWidgetHostViewGuest is removed. |
| 214 // The model object. | 219 // The model object. |
| 215 RenderWidgetHostImpl* host_; | 220 RenderWidgetHostImpl* host_; |
| 216 | 221 |
| 217 // The ID for FrameSink associated with this view. | 222 // The ID for FrameSink associated with this view. |
| 218 cc::FrameSinkId frame_sink_id_; | 223 cc::FrameSinkId frame_sink_id_; |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 // The surface client ID of the parent RenderWidgetHostView. 0 if none. | 259 // The surface client ID of the parent RenderWidgetHostView. 0 if none. |
| 255 cc::FrameSinkId parent_frame_sink_id_; | 260 cc::FrameSinkId parent_frame_sink_id_; |
| 256 | 261 |
| 257 base::WeakPtrFactory<RenderWidgetHostViewChildFrame> weak_factory_; | 262 base::WeakPtrFactory<RenderWidgetHostViewChildFrame> weak_factory_; |
| 258 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewChildFrame); | 263 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewChildFrame); |
| 259 }; | 264 }; |
| 260 | 265 |
| 261 } // namespace content | 266 } // namespace content |
| 262 | 267 |
| 263 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_CHILD_FRAME_H_ | 268 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_CHILD_FRAME_H_ |
| OLD | NEW |