OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // A BrowserPluginGuest represents the browser side of browser <--> renderer | 5 // A BrowserPluginGuest represents the browser side of browser <--> renderer |
6 // communication. A BrowserPlugin (a WebPlugin) is on the renderer side of | 6 // communication. A BrowserPlugin (a WebPlugin) is on the renderer side of |
7 // browser <--> guest renderer communication. The 'guest' renderer is a | 7 // browser <--> guest renderer communication. The 'guest' renderer is a |
8 // <browser> tag. | 8 // <browser> tag. |
9 // | 9 // |
10 // BrowserPluginGuest lives on the UI thread of the browser process. It has a | 10 // BrowserPluginGuest lives on the UI thread of the browser process. It has a |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 | 187 |
188 // Helper to send messages to embedder. Overridden in test implementation | 188 // Helper to send messages to embedder. Overridden in test implementation |
189 // since we want to intercept certain messages for testing. | 189 // since we want to intercept certain messages for testing. |
190 virtual void SendMessageToEmbedder(IPC::Message* msg); | 190 virtual void SendMessageToEmbedder(IPC::Message* msg); |
191 | 191 |
192 // Called when a redirect notification occurs. | 192 // Called when a redirect notification occurs. |
193 void LoadRedirect(const GURL& old_url, | 193 void LoadRedirect(const GURL& old_url, |
194 const GURL& new_url, | 194 const GURL& new_url, |
195 bool is_top_level); | 195 bool is_top_level); |
196 | 196 |
| 197 // Called when the guest changes its title. |
| 198 void TitleChanged(const string16& title); |
| 199 |
197 // Static factory instance (always NULL for non-test). | 200 // Static factory instance (always NULL for non-test). |
198 static content::BrowserPluginHostFactory* factory_; | 201 static content::BrowserPluginHostFactory* factory_; |
199 | 202 |
200 NotificationRegistrar notification_registrar_; | 203 NotificationRegistrar notification_registrar_; |
201 RenderProcessHost* embedder_render_process_host_; | 204 RenderProcessHost* embedder_render_process_host_; |
202 // An identifier that uniquely identifies a browser plugin guest within an | 205 // An identifier that uniquely identifies a browser plugin guest within an |
203 // embedder. | 206 // embedder. |
204 int instance_id_; | 207 int instance_id_; |
205 scoped_ptr<TransportDIB> damage_buffer_; | 208 scoped_ptr<TransportDIB> damage_buffer_; |
206 #if defined(OS_WIN) | 209 #if defined(OS_WIN) |
207 size_t damage_buffer_size_; | 210 size_t damage_buffer_size_; |
208 #endif | 211 #endif |
209 gfx::Size damage_view_size_; | 212 gfx::Size damage_view_size_; |
210 float damage_buffer_scale_factor_; | 213 float damage_buffer_scale_factor_; |
211 scoped_ptr<IPC::Message> pending_input_event_reply_; | 214 scoped_ptr<IPC::Message> pending_input_event_reply_; |
212 gfx::Rect guest_rect_; | 215 gfx::Rect guest_rect_; |
213 WebCursor cursor_; | 216 WebCursor cursor_; |
214 IDMap<RenderViewHost> pending_updates_; | 217 IDMap<RenderViewHost> pending_updates_; |
215 int pending_update_counter_; | 218 int pending_update_counter_; |
216 base::TimeDelta guest_hang_timeout_; | 219 base::TimeDelta guest_hang_timeout_; |
217 | 220 |
218 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); | 221 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); |
219 }; | 222 }; |
220 | 223 |
221 } // namespace content | 224 } // namespace content |
222 | 225 |
223 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ | 226 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ |
OLD | NEW |