| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 | 60 |
| 61 static BrowserPluginEmbedder* Create(WebContentsImpl* web_contents, | 61 static BrowserPluginEmbedder* Create(WebContentsImpl* web_contents, |
| 62 RenderViewHost* render_view_host); | 62 RenderViewHost* render_view_host); |
| 63 | 63 |
| 64 // Navigates in a guest (new or existing). | 64 // Navigates in a guest (new or existing). |
| 65 void NavigateGuest(RenderViewHost* render_view_host, | 65 void NavigateGuest(RenderViewHost* render_view_host, |
| 66 int instance_id, | 66 int instance_id, |
| 67 int64 frame_id, | 67 int64 frame_id, |
| 68 const std::string& src, | 68 const std::string& src, |
| 69 const gfx::Size& size); | 69 const gfx::Size& size); |
| 70 void Stop(int instance_id); |
| 71 void Reload(int instance_id); |
| 70 | 72 |
| 71 // WebContentsObserver implementation. | 73 // WebContentsObserver implementation. |
| 72 virtual void RenderViewDeleted(RenderViewHost* render_view_host) OVERRIDE; | 74 virtual void RenderViewDeleted(RenderViewHost* render_view_host) OVERRIDE; |
| 73 virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE; | 75 virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE; |
| 74 | 76 |
| 75 // NotificationObserver method override. | 77 // NotificationObserver method override. |
| 76 virtual void Observe(int type, | 78 virtual void Observe(int type, |
| 77 const NotificationSource& source, | 79 const NotificationSource& source, |
| 78 const NotificationDetails& details) OVERRIDE; | 80 const NotificationDetails& details) OVERRIDE; |
| 79 | 81 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 // Contains guests' WebContents, mapping from their instance ids. | 137 // Contains guests' WebContents, mapping from their instance ids. |
| 136 ContainerInstanceMap guest_web_contents_by_instance_id_; | 138 ContainerInstanceMap guest_web_contents_by_instance_id_; |
| 137 RenderViewHost* render_view_host_; | 139 RenderViewHost* render_view_host_; |
| 138 | 140 |
| 139 DISALLOW_COPY_AND_ASSIGN(BrowserPluginEmbedder); | 141 DISALLOW_COPY_AND_ASSIGN(BrowserPluginEmbedder); |
| 140 }; | 142 }; |
| 141 | 143 |
| 142 } // namespace content | 144 } // namespace content |
| 143 | 145 |
| 144 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_EMBEDDER_H_ | 146 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_EMBEDDER_H_ |
| OLD | NEW |