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_RENDERER_RENDER_FRAME_PROXY_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_FRAME_PROXY_H_ |
6 #define CONTENT_RENDERER_RENDER_FRAME_PROXY_H_ | 6 #define CONTENT_RENDERER_RENDER_FRAME_PROXY_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 | 82 |
83 virtual ~RenderFrameProxy(); | 83 virtual ~RenderFrameProxy(); |
84 | 84 |
85 // IPC::Sender | 85 // IPC::Sender |
86 virtual bool Send(IPC::Message* msg) OVERRIDE; | 86 virtual bool Send(IPC::Message* msg) OVERRIDE; |
87 | 87 |
88 // Out-of-process child frames receive a signal from RenderWidgetCompositor | 88 // Out-of-process child frames receive a signal from RenderWidgetCompositor |
89 // when a compositor frame has committed. | 89 // when a compositor frame has committed. |
90 void DidCommitCompositorFrame(); | 90 void DidCommitCompositorFrame(); |
91 | 91 |
92 int routing_id() const { return routing_id_; } | 92 int routing_id() { return routing_id_; } |
93 RenderViewImpl* render_view() const { return render_view_; } | 93 RenderViewImpl* render_view() { return render_view_; } |
94 blink::WebFrame* web_frame() const { return web_frame_; } | 94 blink::WebRemoteFrame* web_frame() { return web_frame_; } |
95 | 95 |
96 private: | 96 private: |
97 RenderFrameProxy(int routing_id, int frame_routing_id); | 97 RenderFrameProxy(int routing_id, int frame_routing_id); |
98 | 98 |
99 void Init(blink::WebFrame* frame, RenderViewImpl* render_view); | 99 void Init(blink::WebRemoteFrame* frame, RenderViewImpl* render_view); |
100 | 100 |
101 // IPC::Listener | 101 // IPC::Listener |
102 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; | 102 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
103 | 103 |
104 // IPC handlers | 104 // IPC handlers |
105 void OnDeleteProxy(); | 105 void OnDeleteProxy(); |
106 void OnChildFrameProcessGone(); | 106 void OnChildFrameProcessGone(); |
107 void OnBuffersSwapped(const FrameMsg_BuffersSwapped_Params& params); | 107 void OnBuffersSwapped(const FrameMsg_BuffersSwapped_Params& params); |
108 void OnCompositorFrameSwapped(const IPC::Message& message); | 108 void OnCompositorFrameSwapped(const IPC::Message& message); |
109 | 109 |
110 // The routing ID by which this RenderFrameProxy is known. | 110 // The routing ID by which this RenderFrameProxy is known. |
111 const int routing_id_; | 111 const int routing_id_; |
112 | 112 |
113 // The routing ID of the local RenderFrame (if any) which this | 113 // The routing ID of the local RenderFrame (if any) which this |
114 // RenderFrameProxy is meant to replace in the frame tree. | 114 // RenderFrameProxy is meant to replace in the frame tree. |
115 const int frame_routing_id_; | 115 const int frame_routing_id_; |
116 | 116 |
117 // Stores the WebFrame we are associated with. | 117 // Stores the WebRemoteFrame we are associated with. |
118 // TODO(nick): Make this always a WebRemoteFrame. | 118 blink::WebRemoteFrame* web_frame_; |
119 blink::WebFrame* web_frame_; | |
120 scoped_refptr<ChildFrameCompositingHelper> compositing_helper_; | 119 scoped_refptr<ChildFrameCompositingHelper> compositing_helper_; |
121 | 120 |
122 RenderViewImpl* render_view_; | 121 RenderViewImpl* render_view_; |
123 | 122 |
124 DISALLOW_COPY_AND_ASSIGN(RenderFrameProxy); | 123 DISALLOW_COPY_AND_ASSIGN(RenderFrameProxy); |
125 }; | 124 }; |
126 | 125 |
127 } // namespace | 126 } // namespace |
128 | 127 |
129 #endif // CONTENT_RENDERER_RENDER_FRAME_PROXY_H_ | 128 #endif // CONTENT_RENDERER_RENDER_FRAME_PROXY_H_ |
OLD | NEW |