| 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/rect.h" | 9 #include "ui/gfx/rect.h" |
| 10 | 10 |
| 11 namespace blink { | 11 namespace blink { |
| 12 class WebInputEvent; | 12 class WebInputEvent; |
| 13 } | 13 } |
| 14 | 14 |
| 15 namespace IPC { | 15 namespace IPC { |
| 16 class Message; | 16 class Message; |
| 17 } | 17 } |
| 18 | 18 |
| 19 struct FrameHostMsg_BuffersSwappedACK_Params; | 19 struct FrameHostMsg_BuffersSwappedACK_Params; |
| 20 struct FrameHostMsg_CompositorFrameSwappedACK_Params; | 20 struct FrameHostMsg_CompositorFrameSwappedACK_Params; |
| 21 struct FrameHostMsg_ReclaimCompositorResources_Params; | 21 struct FrameHostMsg_ReclaimCompositorResources_Params; |
| 22 struct GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params; | 22 struct GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params; |
| 23 | 23 |
| 24 namespace content { | 24 namespace content { |
| 25 class RenderFrameHostImpl; | 25 class RenderFrameProxyHost; |
| 26 class RenderWidgetHostImpl; | 26 class RenderWidgetHostImpl; |
| 27 class RenderWidgetHostViewChildFrame; | 27 class RenderWidgetHostViewChildFrame; |
| 28 | 28 |
| 29 // CrossProcessFrameConnector provides the platform view abstraction for | 29 // CrossProcessFrameConnector provides the platform view abstraction for |
| 30 // RenderWidgetHostViewChildFrame allowing RWHVChildFrame to remain ignorant | 30 // RenderWidgetHostViewChildFrame allowing RWHVChildFrame to remain ignorant |
| 31 // of RenderFrameHost. | 31 // of RenderFrameHost. |
| 32 // | 32 // |
| 33 // The RenderWidgetHostView of an out-of-process child frame needs to | 33 // The RenderWidgetHostView of an out-of-process child frame needs to |
| 34 // communicate with the swapped out RenderFrameHost representing this frame | 34 // communicate with the swapped out RenderFrameHost representing this frame |
| 35 // in the process of the parent frame. For example, assume you have this page: | 35 // in the process of the parent frame. For example, assume you have this page: |
| (...skipping 22 matching lines...) Expand all Loading... |
| 58 // example.) | 58 // example.) |
| 59 // | 59 // |
| 60 // CrossProcessFrameConnector objects are owned by the child frame's | 60 // CrossProcessFrameConnector objects are owned by the child frame's |
| 61 // RenderFrameHostManager. When a child frame swaps, SetChildFrameView() is | 61 // RenderFrameHostManager. When a child frame swaps, SetChildFrameView() is |
| 62 // called to update to the new view. | 62 // called to update to the new view. |
| 63 // | 63 // |
| 64 class CrossProcessFrameConnector { | 64 class CrossProcessFrameConnector { |
| 65 public: | 65 public: |
| 66 // |frame_proxy_in_parent_renderer| corresponds to A2 in the example above. | 66 // |frame_proxy_in_parent_renderer| corresponds to A2 in the example above. |
| 67 explicit CrossProcessFrameConnector( | 67 explicit CrossProcessFrameConnector( |
| 68 RenderFrameHostImpl* frame_proxy_in_parent_renderer); | 68 RenderFrameProxyHost* frame_proxy_in_parent_renderer); |
| 69 virtual ~CrossProcessFrameConnector(); | 69 virtual ~CrossProcessFrameConnector(); |
| 70 | 70 |
| 71 bool OnMessageReceived(const IPC::Message &msg); | 71 bool OnMessageReceived(const IPC::Message &msg); |
| 72 | 72 |
| 73 // |view| corresponds to B2's RenderWidgetHostViewChildFrame in the example | 73 // |view| corresponds to B2's RenderWidgetHostViewChildFrame in the example |
| 74 // above. | 74 // above. |
| 75 void set_view(RenderWidgetHostViewChildFrame* view); | 75 void set_view(RenderWidgetHostViewChildFrame* view); |
| 76 | 76 |
| 77 void RenderProcessGone(); | 77 void RenderProcessGone(); |
| 78 | 78 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 101 void OnForwardInputEvent(const blink::WebInputEvent* event); | 101 void OnForwardInputEvent(const blink::WebInputEvent* event); |
| 102 void OnInitializeChildFrame(gfx::Rect frame_rect, float scale_factor); | 102 void OnInitializeChildFrame(gfx::Rect frame_rect, float scale_factor); |
| 103 | 103 |
| 104 void SetDeviceScaleFactor(float scale_factor); | 104 void SetDeviceScaleFactor(float scale_factor); |
| 105 void SetSize(gfx::Rect frame_rect); | 105 void SetSize(gfx::Rect frame_rect); |
| 106 | 106 |
| 107 // The RenderFrameHost that routes messages to the parent frame's renderer | 107 // The RenderFrameHost that routes messages to the parent frame's renderer |
| 108 // process. | 108 // process. |
| 109 // TODO(kenrb): The type becomes RenderFrameProxyHost when that class comes | 109 // TODO(kenrb): The type becomes RenderFrameProxyHost when that class comes |
| 110 // to exist. | 110 // to exist. |
| 111 RenderFrameHostImpl* frame_proxy_in_parent_renderer_; | 111 RenderFrameProxyHost* frame_proxy_in_parent_renderer_; |
| 112 | 112 |
| 113 // The RenderWidgetHostView for the frame. Initially NULL. | 113 // The RenderWidgetHostView for the frame. Initially NULL. |
| 114 RenderWidgetHostViewChildFrame* view_; | 114 RenderWidgetHostViewChildFrame* view_; |
| 115 | 115 |
| 116 gfx::Rect child_frame_rect_; | 116 gfx::Rect child_frame_rect_; |
| 117 float device_scale_factor_; | 117 float device_scale_factor_; |
| 118 }; | 118 }; |
| 119 | 119 |
| 120 } // namespace content | 120 } // namespace content |
| 121 | 121 |
| 122 #endif // CONTENT_BROWSER_FRAME_HOST_CROSS_PROCESS_FRAME_CONNECTOR_H_ | 122 #endif // CONTENT_BROWSER_FRAME_HOST_CROSS_PROCESS_FRAME_CONNECTOR_H_ |
| 123 | 123 |
| OLD | NEW |