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/gtest_prod_util.h" |
16 #include "base/macros.h" | 17 #include "base/macros.h" |
17 #include "build/build_config.h" | 18 #include "build/build_config.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/compositor_frame_sink_support_client.h" | 21 #include "cc/surfaces/compositor_frame_sink_support_client.h" |
21 #include "cc/surfaces/surface_info.h" | 22 #include "cc/surfaces/surface_info.h" |
22 #include "cc/surfaces/surface_sequence.h" | 23 #include "cc/surfaces/surface_sequence.h" |
23 #include "content/browser/compositor/image_transport_factory.h" | 24 #include "content/browser/compositor/image_transport_factory.h" |
24 #include "content/browser/renderer_host/event_with_latency_info.h" | 25 #include "content/browser/renderer_host/event_with_latency_info.h" |
25 #include "content/browser/renderer_host/render_widget_host_view_base.h" | 26 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 void RenderProcessGone(base::TerminationStatus status, | 102 void RenderProcessGone(base::TerminationStatus status, |
102 int error_code) override; | 103 int error_code) override; |
103 void Destroy() override; | 104 void Destroy() override; |
104 void SetTooltipText(const base::string16& tooltip_text) override; | 105 void SetTooltipText(const base::string16& tooltip_text) override; |
105 bool HasAcceleratedSurface(const gfx::Size& desired_size) override; | 106 bool HasAcceleratedSurface(const gfx::Size& desired_size) override; |
106 void GestureEventAck(const blink::WebGestureEvent& event, | 107 void GestureEventAck(const blink::WebGestureEvent& event, |
107 InputEventAckState ack_result) override; | 108 InputEventAckState ack_result) override; |
108 void OnSwapCompositorFrame(uint32_t compositor_frame_sink_id, | 109 void OnSwapCompositorFrame(uint32_t compositor_frame_sink_id, |
109 const cc::LocalSurfaceId& local_surface_id, | 110 const cc::LocalSurfaceId& local_surface_id, |
110 cc::CompositorFrame frame) override; | 111 cc::CompositorFrame frame) override; |
| 112 void OnBeginFrameDidNotSwap(const cc::BeginFrameAck& ack) override; |
111 // Since the URL of content rendered by this class is not displayed in | 113 // Since the URL of content rendered by this class is not displayed in |
112 // the URL bar, this method does not need an implementation. | 114 // the URL bar, this method does not need an implementation. |
113 void ClearCompositorFrame() override {} | 115 void ClearCompositorFrame() override {} |
114 gfx::Rect GetBoundsInRootWindow() override; | 116 gfx::Rect GetBoundsInRootWindow() override; |
115 void ProcessAckedTouchEvent(const TouchEventWithLatencyInfo& touch, | 117 void ProcessAckedTouchEvent(const TouchEventWithLatencyInfo& touch, |
116 InputEventAckState ack_result) override; | 118 InputEventAckState ack_result) override; |
117 bool LockMouse() override; | 119 bool LockMouse() override; |
118 void UnlockMouse() override; | 120 void UnlockMouse() override; |
119 cc::FrameSinkId GetFrameSinkId() override; | 121 cc::FrameSinkId GetFrameSinkId() override; |
120 void ProcessKeyboardEvent(const NativeWebKeyboardEvent& event) override; | 122 void ProcessKeyboardEvent(const NativeWebKeyboardEvent& event) override; |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 void UnregisterFrameSinkId(); | 181 void UnregisterFrameSinkId(); |
180 | 182 |
181 void UpdateViewportIntersection(const gfx::Rect& viewport_intersection); | 183 void UpdateViewportIntersection(const gfx::Rect& viewport_intersection); |
182 | 184 |
183 bool has_frame() { return has_frame_; } | 185 bool has_frame() { return has_frame_; } |
184 | 186 |
185 protected: | 187 protected: |
186 friend class RenderWidgetHostView; | 188 friend class RenderWidgetHostView; |
187 friend class RenderWidgetHostViewChildFrameTest; | 189 friend class RenderWidgetHostViewChildFrameTest; |
188 friend class RenderWidgetHostViewGuestSurfaceTest; | 190 friend class RenderWidgetHostViewGuestSurfaceTest; |
| 191 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewChildFrameTest, |
| 192 ForwardsBeginFrameAcks); |
189 | 193 |
190 explicit RenderWidgetHostViewChildFrame(RenderWidgetHost* widget); | 194 explicit RenderWidgetHostViewChildFrame(RenderWidgetHost* widget); |
191 void Init(); | 195 void Init(); |
192 | 196 |
193 void ProcessCompositorFrame(uint32_t compositor_frame_sink_id, | 197 void ProcessCompositorFrame(uint32_t compositor_frame_sink_id, |
194 const cc::LocalSurfaceId& local_surface_id, | 198 const cc::LocalSurfaceId& local_surface_id, |
195 cc::CompositorFrame frame); | 199 cc::CompositorFrame frame); |
196 | 200 |
197 void SendSurfaceInfoToEmbedder(); | 201 void SendSurfaceInfoToEmbedder(); |
198 | 202 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 | 257 |
254 bool has_frame_ = false; | 258 bool has_frame_ = false; |
255 | 259 |
256 base::WeakPtrFactory<RenderWidgetHostViewChildFrame> weak_factory_; | 260 base::WeakPtrFactory<RenderWidgetHostViewChildFrame> weak_factory_; |
257 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewChildFrame); | 261 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewChildFrame); |
258 }; | 262 }; |
259 | 263 |
260 } // namespace content | 264 } // namespace content |
261 | 265 |
262 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_CHILD_FRAME_H_ | 266 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_CHILD_FRAME_H_ |
OLD | NEW |