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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 virtual ~BrowserPluginEmbedder(); | 59 virtual ~BrowserPluginEmbedder(); |
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 const std::string& src, | 67 const std::string& src, |
68 const gfx::Size& size); | 68 const gfx::Size& size); |
| 69 void Go(int instance_id, int relative_index); |
69 void Stop(int instance_id); | 70 void Stop(int instance_id); |
70 void Reload(int instance_id); | 71 void Reload(int instance_id); |
71 | 72 |
72 // WebContentsObserver implementation. | 73 // WebContentsObserver implementation. |
73 virtual void RenderViewDeleted(RenderViewHost* render_view_host) OVERRIDE; | 74 virtual void RenderViewDeleted(RenderViewHost* render_view_host) OVERRIDE; |
74 virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE; | 75 virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE; |
75 | 76 |
76 // NotificationObserver method override. | 77 // NotificationObserver method override. |
77 virtual void Observe(int type, | 78 virtual void Observe(int type, |
78 const NotificationSource& source, | 79 const NotificationSource& source, |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 // Contains guests' WebContents, mapping from their instance ids. | 134 // Contains guests' WebContents, mapping from their instance ids. |
134 ContainerInstanceMap guest_web_contents_by_instance_id_; | 135 ContainerInstanceMap guest_web_contents_by_instance_id_; |
135 RenderViewHost* render_view_host_; | 136 RenderViewHost* render_view_host_; |
136 | 137 |
137 DISALLOW_COPY_AND_ASSIGN(BrowserPluginEmbedder); | 138 DISALLOW_COPY_AND_ASSIGN(BrowserPluginEmbedder); |
138 }; | 139 }; |
139 | 140 |
140 } // namespace content | 141 } // namespace content |
141 | 142 |
142 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_EMBEDDER_H_ | 143 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_EMBEDDER_H_ |
OLD | NEW |