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 is the browser side of a browser <--> embedder | 5 // A BrowserPluginGuest is the browser side of a browser <--> embedder |
6 // renderer channel. A BrowserPlugin (a WebPlugin) is on the embedder | 6 // renderer channel. A BrowserPlugin (a WebPlugin) is on the embedder |
7 // renderer side of browser <--> embedder renderer communication. | 7 // renderer side of browser <--> embedder renderer communication. |
8 // | 8 // |
9 // BrowserPluginGuest lives on the UI thread of the browser process. It has a | 9 // BrowserPluginGuest lives on the UI thread of the browser process. It has a |
10 // helper, BrowserPluginGuestHelper, which is a RenderViewHostObserver. The | 10 // helper, BrowserPluginGuestHelper, which is a RenderViewHostObserver. The |
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 | 291 |
292 base::SharedMemory* damage_buffer() const { return damage_buffer_.get(); } | 292 base::SharedMemory* damage_buffer() const { return damage_buffer_.get(); } |
293 const gfx::Size& damage_view_size() const { return damage_view_size_; } | 293 const gfx::Size& damage_view_size() const { return damage_view_size_; } |
294 float damage_buffer_scale_factor() const { | 294 float damage_buffer_scale_factor() const { |
295 return damage_buffer_scale_factor_; | 295 return damage_buffer_scale_factor_; |
296 } | 296 } |
297 // Returns the damage buffer corresponding to the handle in resize |params|. | 297 // Returns the damage buffer corresponding to the handle in resize |params|. |
298 base::SharedMemory* GetDamageBufferFromEmbedder( | 298 base::SharedMemory* GetDamageBufferFromEmbedder( |
299 const BrowserPluginHostMsg_ResizeGuest_Params& params); | 299 const BrowserPluginHostMsg_ResizeGuest_Params& params); |
300 | 300 |
301 // Called after the load handler is called in the guest's main frame. | |
302 void LoadHandlerCalled(); | |
303 | |
304 // Called when a redirect notification occurs. | 301 // Called when a redirect notification occurs. |
305 void LoadRedirect(const GURL& old_url, | 302 void LoadRedirect(const GURL& old_url, |
306 const GURL& new_url, | 303 const GURL& new_url, |
307 bool is_top_level); | 304 bool is_top_level); |
308 | 305 |
309 bool InAutoSizeBounds(const gfx::Size& size) const; | 306 bool InAutoSizeBounds(const gfx::Size& size) const; |
310 | 307 |
311 void RequestNewWindowPermission(WebContentsImpl* new_contents, | 308 void RequestNewWindowPermission(WebContentsImpl* new_contents, |
312 WindowOpenDisposition disposition, | 309 WindowOpenDisposition disposition, |
313 const gfx::Rect& initial_bounds, | 310 const gfx::Rect& initial_bounds, |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 // This is a queue of messages that are destined to be sent to the embedder | 502 // This is a queue of messages that are destined to be sent to the embedder |
506 // once the guest is attached to a particular embedder. | 503 // once the guest is attached to a particular embedder. |
507 std::queue<IPC::Message*> pending_messages_; | 504 std::queue<IPC::Message*> pending_messages_; |
508 | 505 |
509 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); | 506 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); |
510 }; | 507 }; |
511 | 508 |
512 } // namespace content | 509 } // namespace content |
513 | 510 |
514 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ | 511 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ |
OLD | NEW |