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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 | 76 |
77 // Returns the RenderFrameProxy for the given routing ID. | 77 // Returns the RenderFrameProxy for the given routing ID. |
78 static RenderFrameProxy* FromRoutingID(int routing_id); | 78 static RenderFrameProxy* FromRoutingID(int routing_id); |
79 | 79 |
80 // Returns the RenderFrameProxy given a WebFrame. | 80 // Returns the RenderFrameProxy given a WebFrame. |
81 static RenderFrameProxy* FromWebFrame(blink::WebFrame* web_frame); | 81 static RenderFrameProxy* FromWebFrame(blink::WebFrame* web_frame); |
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() { return routing_id_; } | 92 int routing_id() { return routing_id_; } |
93 RenderViewImpl* render_view() { return render_view_; } | 93 RenderViewImpl* render_view() { return render_view_; } |
94 blink::WebRemoteFrame* web_frame() { return web_frame_; } | 94 blink::WebRemoteFrame* web_frame() { return web_frame_; } |
95 | 95 |
96 // blink::WebRemoteFrameClient implementation: | 96 // blink::WebRemoteFrameClient implementation: |
97 virtual void postMessageEvent( | 97 virtual void postMessageEvent( |
98 blink::WebLocalFrame* sourceFrame, | 98 blink::WebLocalFrame* sourceFrame, |
99 blink::WebRemoteFrame* targetFrame, | 99 blink::WebRemoteFrame* targetFrame, |
100 blink::WebSecurityOrigin target, | 100 blink::WebSecurityOrigin target, |
101 blink::WebDOMMessageEvent event); | 101 blink::WebDOMMessageEvent event); |
102 virtual void initializeChildFrame( | 102 virtual void initializeChildFrame( |
103 const blink::WebRect& frame_rect, | 103 const blink::WebRect& frame_rect, |
104 float scale_factor); | 104 float scale_factor); |
105 virtual void navigate(const blink::WebURLRequest& request, | 105 virtual void navigate(const blink::WebURLRequest& request, |
106 bool should_replace_current_entry); | 106 bool should_replace_current_entry); |
107 | 107 |
108 private: | 108 private: |
109 RenderFrameProxy(int routing_id, int frame_routing_id); | 109 RenderFrameProxy(int routing_id, int frame_routing_id); |
110 | 110 |
111 void Init(blink::WebRemoteFrame* frame, RenderViewImpl* render_view); | 111 void Init(blink::WebRemoteFrame* frame, RenderViewImpl* render_view); |
112 | 112 |
113 // IPC::Listener | 113 // IPC::Listener |
114 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; | 114 virtual bool OnMessageReceived(const IPC::Message& msg) override; |
115 | 115 |
116 // IPC handlers | 116 // IPC handlers |
117 void OnDeleteProxy(); | 117 void OnDeleteProxy(); |
118 void OnChildFrameProcessGone(); | 118 void OnChildFrameProcessGone(); |
119 void OnCompositorFrameSwapped(const IPC::Message& message); | 119 void OnCompositorFrameSwapped(const IPC::Message& message); |
120 void OnDisownOpener(); | 120 void OnDisownOpener(); |
121 | 121 |
122 // The routing ID by which this RenderFrameProxy is known. | 122 // The routing ID by which this RenderFrameProxy is known. |
123 const int routing_id_; | 123 const int routing_id_; |
124 | 124 |
125 // The routing ID of the local RenderFrame (if any) which this | 125 // The routing ID of the local RenderFrame (if any) which this |
126 // RenderFrameProxy is meant to replace in the frame tree. | 126 // RenderFrameProxy is meant to replace in the frame tree. |
127 const int frame_routing_id_; | 127 const int frame_routing_id_; |
128 | 128 |
129 // Stores the WebRemoteFrame we are associated with. | 129 // Stores the WebRemoteFrame we are associated with. |
130 blink::WebRemoteFrame* web_frame_; | 130 blink::WebRemoteFrame* web_frame_; |
131 scoped_refptr<ChildFrameCompositingHelper> compositing_helper_; | 131 scoped_refptr<ChildFrameCompositingHelper> compositing_helper_; |
132 | 132 |
133 RenderViewImpl* render_view_; | 133 RenderViewImpl* render_view_; |
134 | 134 |
135 DISALLOW_COPY_AND_ASSIGN(RenderFrameProxy); | 135 DISALLOW_COPY_AND_ASSIGN(RenderFrameProxy); |
136 }; | 136 }; |
137 | 137 |
138 } // namespace | 138 } // namespace |
139 | 139 |
140 #endif // CONTENT_RENDERER_RENDER_FRAME_PROXY_H_ | 140 #endif // CONTENT_RENDERER_RENDER_FRAME_PROXY_H_ |
OLD | NEW |