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_CROSS_PROCESS_FRAME_CONNECTOR_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_CROSS_PROCESS_FRAME_CONNECTOR_H_ |
6 #define CONTENT_BROWSER_FRAME_HOST_CROSS_PROCESS_FRAME_CONNECTOR_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_CROSS_PROCESS_FRAME_CONNECTOR_H_ |
7 | 7 |
8 #include "cc/output/compositor_frame.h" | 8 #include "cc/output/compositor_frame.h" |
9 #include "ui/gfx/geometry/rect.h" | 9 #include "ui/gfx/geometry/rect.h" |
10 | 10 |
11 namespace blink { | 11 namespace blink { |
12 class WebInputEvent; | 12 class WebInputEvent; |
13 } | 13 } |
14 | 14 |
| 15 namespace cc { |
| 16 struct SurfaceId; |
| 17 struct SurfaceSequence; |
| 18 } |
| 19 |
15 namespace IPC { | 20 namespace IPC { |
16 class Message; | 21 class Message; |
17 } | 22 } |
18 | 23 |
19 struct FrameHostMsg_CompositorFrameSwappedACK_Params; | 24 struct FrameHostMsg_CompositorFrameSwappedACK_Params; |
20 struct FrameHostMsg_ReclaimCompositorResources_Params; | 25 struct FrameHostMsg_ReclaimCompositorResources_Params; |
21 | 26 |
22 namespace content { | 27 namespace content { |
23 class RenderFrameProxyHost; | 28 class RenderFrameProxyHost; |
24 class RenderWidgetHostImpl; | 29 class RenderWidgetHostImpl; |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 | 74 |
70 bool OnMessageReceived(const IPC::Message &msg); | 75 bool OnMessageReceived(const IPC::Message &msg); |
71 | 76 |
72 // |view| corresponds to B2's RenderWidgetHostViewChildFrame in the example | 77 // |view| corresponds to B2's RenderWidgetHostViewChildFrame in the example |
73 // above. | 78 // above. |
74 void set_view(RenderWidgetHostViewChildFrame* view); | 79 void set_view(RenderWidgetHostViewChildFrame* view); |
75 RenderWidgetHostViewChildFrame* get_view_for_testing() { return view_; } | 80 RenderWidgetHostViewChildFrame* get_view_for_testing() { return view_; } |
76 | 81 |
77 void RenderProcessGone(); | 82 void RenderProcessGone(); |
78 | 83 |
79 void ChildFrameCompositorFrameSwapped(uint32 output_surface_id, | 84 virtual void ChildFrameCompositorFrameSwapped( |
80 int host_id, | 85 uint32 output_surface_id, |
81 int route_id, | 86 int host_id, |
82 scoped_ptr<cc::CompositorFrame> frame); | 87 int route_id, |
| 88 scoped_ptr<cc::CompositorFrame> frame); |
| 89 virtual void SetChildFrameSurface(cc::SurfaceId& surface_id, |
| 90 gfx::Size frame_size, |
| 91 float scale_factor, |
| 92 cc::SurfaceSequence& sequence); |
83 | 93 |
84 gfx::Rect ChildFrameRect(); | 94 gfx::Rect ChildFrameRect(); |
85 | 95 |
86 private: | 96 private: |
87 // Handlers for messages received from the parent frame. | 97 // Handlers for messages received from the parent frame. |
88 void OnCompositorFrameSwappedACK( | 98 void OnCompositorFrameSwappedACK( |
89 const FrameHostMsg_CompositorFrameSwappedACK_Params& params); | 99 const FrameHostMsg_CompositorFrameSwappedACK_Params& params); |
90 void OnReclaimCompositorResources( | 100 void OnReclaimCompositorResources( |
91 const FrameHostMsg_ReclaimCompositorResources_Params& params); | 101 const FrameHostMsg_ReclaimCompositorResources_Params& params); |
92 void OnForwardInputEvent(const blink::WebInputEvent* event); | 102 void OnForwardInputEvent(const blink::WebInputEvent* event); |
93 void OnInitializeChildFrame(gfx::Rect frame_rect, float scale_factor); | 103 void OnInitializeChildFrame(gfx::Rect frame_rect, float scale_factor); |
| 104 void OnSatisfySequence(const cc::SurfaceSequence& sequence); |
| 105 void OnRequireSequence(const cc::SurfaceId& id, |
| 106 const cc::SurfaceSequence& sequence); |
94 | 107 |
95 void SetDeviceScaleFactor(float scale_factor); | 108 void SetDeviceScaleFactor(float scale_factor); |
96 void SetSize(gfx::Rect frame_rect); | 109 void SetSize(gfx::Rect frame_rect); |
97 | 110 |
98 // The RenderFrameProxyHost that routes messages to the parent frame's | 111 // The RenderFrameProxyHost that routes messages to the parent frame's |
99 // renderer process. | 112 // renderer process. |
100 RenderFrameProxyHost* frame_proxy_in_parent_renderer_; | 113 RenderFrameProxyHost* frame_proxy_in_parent_renderer_; |
101 | 114 |
102 // The RenderWidgetHostView for the frame. Initially NULL. | 115 // The RenderWidgetHostView for the frame. Initially NULL. |
103 RenderWidgetHostViewChildFrame* view_; | 116 RenderWidgetHostViewChildFrame* view_; |
104 | 117 |
105 gfx::Rect child_frame_rect_; | 118 gfx::Rect child_frame_rect_; |
106 float device_scale_factor_; | 119 float device_scale_factor_; |
107 }; | 120 }; |
108 | 121 |
109 } // namespace content | 122 } // namespace content |
110 | 123 |
111 #endif // CONTENT_BROWSER_FRAME_HOST_CROSS_PROCESS_FRAME_CONNECTOR_H_ | 124 #endif // CONTENT_BROWSER_FRAME_HOST_CROSS_PROCESS_FRAME_CONNECTOR_H_ |
112 | 125 |
OLD | NEW |