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 |
107 // Destroys the guest WebContents and all its associated state, including | 111 // Destroys the guest WebContents and all its associated state, including |
108 // this BrowserPluginGuest, and its new unattached windows. | 112 // this BrowserPluginGuest, and its new unattached windows. |
109 void Destroy(); | 113 void Destroy(); |
110 | 114 |
111 // Returns the identifier that uniquely identifies a browser plugin guest | 115 // Returns the identifier that uniquely identifies a browser plugin guest |
112 // within an embedder. | 116 // within an embedder. |
113 int instance_id() const { return instance_id_; } | 117 int instance_id() const { return instance_id_; } |
114 | 118 |
115 // Overrides factory for testing. Default (NULL) value indicates regular | 119 // Overrides factory for testing. Default (NULL) value indicates regular |
116 // (non-test) environment. | 120 // (non-test) environment. |
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
531 std::queue<IPC::Message*> pending_messages_; | 535 std::queue<IPC::Message*> pending_messages_; |
532 | 536 |
533 scoped_ptr<BrowserPluginGuestDelegate> delegate_; | 537 scoped_ptr<BrowserPluginGuestDelegate> delegate_; |
534 | 538 |
535 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); | 539 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); |
536 }; | 540 }; |
537 | 541 |
538 } // namespace content | 542 } // namespace content |
539 | 543 |
540 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ | 544 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ |
OLD | NEW |