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 BrowserPluginEmbedder has a list of guests it manages. | 5 // A BrowserPluginEmbedder has a list of guests it manages. |
6 // In the beginning when a renderer sees one or more guests (BrowserPlugin | 6 // In the beginning when a renderer sees one or more guests (BrowserPlugin |
7 // instance(s)) and there is a request to navigate to them, the WebContents for | 7 // instance(s)) and there is a request to navigate to them, the WebContents for |
8 // that renderer creates a BrowserPluginEmbedder for itself. The | 8 // that renderer creates a BrowserPluginEmbedder for itself. The |
9 // BrowserPluginEmbedder, in turn, manages a set of BrowserPluginGuests -- one | 9 // BrowserPluginEmbedder, in turn, manages a set of BrowserPluginGuests -- one |
10 // BrowserPluginGuest for each guest in the embedding WebContents. Note that | 10 // BrowserPluginGuest for each guest in the embedding WebContents. Note that |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 const std::string& src, | 75 const std::string& src, |
76 const BrowserPluginHostMsg_ResizeGuest_Params& resize_params); | 76 const BrowserPluginHostMsg_ResizeGuest_Params& resize_params); |
77 | 77 |
78 void ResizeGuest(RenderViewHost* render_view_host, | 78 void ResizeGuest(RenderViewHost* render_view_host, |
79 int instance_id, | 79 int instance_id, |
80 const BrowserPluginHostMsg_ResizeGuest_Params& params); | 80 const BrowserPluginHostMsg_ResizeGuest_Params& params); |
81 | 81 |
82 void Go(int instance_id, int relative_index); | 82 void Go(int instance_id, int relative_index); |
83 void Stop(int instance_id); | 83 void Stop(int instance_id); |
84 void Reload(int instance_id); | 84 void Reload(int instance_id); |
| 85 void TerminateGuest(int instance_id); |
85 | 86 |
86 // WebContentsObserver implementation. | 87 // WebContentsObserver implementation. |
87 virtual void RenderViewDeleted(RenderViewHost* render_view_host) OVERRIDE; | 88 virtual void RenderViewDeleted(RenderViewHost* render_view_host) OVERRIDE; |
88 virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE; | 89 virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE; |
89 | 90 |
90 // NotificationObserver method override. | 91 // NotificationObserver method override. |
91 virtual void Observe(int type, | 92 virtual void Observe(int type, |
92 const NotificationSource& source, | 93 const NotificationSource& source, |
93 const NotificationDetails& details) OVERRIDE; | 94 const NotificationDetails& details) OVERRIDE; |
94 | 95 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 // Contains guests' WebContents, mapping from their instance ids. | 144 // Contains guests' WebContents, mapping from their instance ids. |
144 ContainerInstanceMap guest_web_contents_by_instance_id_; | 145 ContainerInstanceMap guest_web_contents_by_instance_id_; |
145 RenderViewHost* render_view_host_; | 146 RenderViewHost* render_view_host_; |
146 | 147 |
147 DISALLOW_COPY_AND_ASSIGN(BrowserPluginEmbedder); | 148 DISALLOW_COPY_AND_ASSIGN(BrowserPluginEmbedder); |
148 }; | 149 }; |
149 | 150 |
150 } // namespace content | 151 } // namespace content |
151 | 152 |
152 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_EMBEDDER_H_ | 153 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_EMBEDDER_H_ |
OLD | NEW |