| 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 int instance_id, | 97 int instance_id, |
| 98 WebContentsImpl* web_contents, | 98 WebContentsImpl* web_contents, |
| 99 scoped_ptr<base::DictionaryValue> extra_params); | 99 scoped_ptr<base::DictionaryValue> extra_params); |
| 100 | 100 |
| 101 static BrowserPluginGuest* CreateWithOpener( | 101 static BrowserPluginGuest* CreateWithOpener( |
| 102 int instance_id, | 102 int instance_id, |
| 103 WebContentsImpl* web_contents, | 103 WebContentsImpl* web_contents, |
| 104 BrowserPluginGuest* opener, | 104 BrowserPluginGuest* opener, |
| 105 bool has_render_view); | 105 bool has_render_view); |
| 106 | 106 |
| 107 // Called when the embedder RenderViewHost is destroyed to give the | |
| 108 // BrowserPluginGuest an opportunity to clean up after itself. | |
| 109 void EmbedderDestroyed(); | |
| 110 | |
| 111 // Destroys the guest WebContents and all its associated state, including | 107 // Destroys the guest WebContents and all its associated state, including |
| 112 // this BrowserPluginGuest, and its new unattached windows. | 108 // this BrowserPluginGuest, and its new unattached windows. |
| 113 void Destroy(); | 109 void Destroy(); |
| 114 | 110 |
| 115 // Returns the identifier that uniquely identifies a browser plugin guest | 111 // Returns the identifier that uniquely identifies a browser plugin guest |
| 116 // within an embedder. | 112 // within an embedder. |
| 117 int instance_id() const { return instance_id_; } | 113 int instance_id() const { return instance_id_; } |
| 118 | 114 |
| 119 // Overrides factory for testing. Default (NULL) value indicates regular | 115 // Overrides factory for testing. Default (NULL) value indicates regular |
| 120 // (non-test) environment. | 116 // (non-test) environment. |
| (...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 535 std::queue<IPC::Message*> pending_messages_; | 531 std::queue<IPC::Message*> pending_messages_; |
| 536 | 532 |
| 537 scoped_ptr<BrowserPluginGuestDelegate> delegate_; | 533 scoped_ptr<BrowserPluginGuestDelegate> delegate_; |
| 538 | 534 |
| 539 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); | 535 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); |
| 540 }; | 536 }; |
| 541 | 537 |
| 542 } // namespace content | 538 } // namespace content |
| 543 | 539 |
| 544 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ | 540 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ |
| OLD | NEW |