| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 // Navigates in a guest (new or existing). | 77 // Navigates in a guest (new or existing). |
| 78 void NavigateGuest( | 78 void NavigateGuest( |
| 79 RenderViewHost* render_view_host, | 79 RenderViewHost* render_view_host, |
| 80 int instance_id, | 80 int instance_id, |
| 81 const std::string& src); | 81 const std::string& src); |
| 82 | 82 |
| 83 void ResizeGuest(RenderViewHost* render_view_host, | 83 void ResizeGuest(RenderViewHost* render_view_host, |
| 84 int instance_id, | 84 int instance_id, |
| 85 const BrowserPluginHostMsg_ResizeGuest_Params& params); | 85 const BrowserPluginHostMsg_ResizeGuest_Params& params); |
| 86 | 86 |
| 87 // Sets the name of the guest so that it can be accessed by other guests in |
| 88 // the process. |
| 89 void SetName(int instance_id, const std::string& name); |
| 90 |
| 87 void Go(int instance_id, int relative_index); | 91 void Go(int instance_id, int relative_index); |
| 88 void Stop(int instance_id); | 92 void Stop(int instance_id); |
| 89 void Reload(int instance_id); | 93 void Reload(int instance_id); |
| 90 void TerminateGuest(int instance_id); | 94 void TerminateGuest(int instance_id); |
| 91 | 95 |
| 92 // WebContentsObserver implementation. | 96 // WebContentsObserver implementation. |
| 93 virtual void RenderViewDeleted(RenderViewHost* render_view_host) OVERRIDE; | 97 virtual void RenderViewDeleted(RenderViewHost* render_view_host) OVERRIDE; |
| 94 virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE; | 98 virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE; |
| 95 | 99 |
| 96 // NotificationObserver method override. | 100 // NotificationObserver method override. |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 GetRenderViewHostCallbackMap pending_get_render_view_callbacks_; | 190 GetRenderViewHostCallbackMap pending_get_render_view_callbacks_; |
| 187 // Next request id for BrowserPluginMsg_PluginAtPositionRequest query. | 191 // Next request id for BrowserPluginMsg_PluginAtPositionRequest query. |
| 188 int next_get_render_view_request_id_; | 192 int next_get_render_view_request_id_; |
| 189 | 193 |
| 190 DISALLOW_COPY_AND_ASSIGN(BrowserPluginEmbedder); | 194 DISALLOW_COPY_AND_ASSIGN(BrowserPluginEmbedder); |
| 191 }; | 195 }; |
| 192 | 196 |
| 193 } // namespace content | 197 } // namespace content |
| 194 | 198 |
| 195 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_EMBEDDER_H_ | 199 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_EMBEDDER_H_ |
| OLD | NEW |