| 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 13 matching lines...) Expand all Loading... |
| 24 | 24 |
| 25 #include "base/compiler_specific.h" | 25 #include "base/compiler_specific.h" |
| 26 #include "content/public/browser/notification_observer.h" | 26 #include "content/public/browser/notification_observer.h" |
| 27 #include "content/public/browser/notification_registrar.h" | 27 #include "content/public/browser/notification_registrar.h" |
| 28 #include "content/public/browser/web_contents_observer.h" | 28 #include "content/public/browser/web_contents_observer.h" |
| 29 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDragStatus.h" | 29 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDragStatus.h" |
| 30 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDragOperation.h" | 30 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDragOperation.h" |
| 31 #include "ui/surface/transport_dib.h" | 31 #include "ui/surface/transport_dib.h" |
| 32 #include "webkit/glue/webdropdata.h" | 32 #include "webkit/glue/webdropdata.h" |
| 33 | 33 |
| 34 class WebContentsImpl; | |
| 35 struct BrowserPluginHostMsg_ResizeGuest_Params; | 34 struct BrowserPluginHostMsg_ResizeGuest_Params; |
| 36 | 35 |
| 37 namespace WebKit { | 36 namespace WebKit { |
| 38 class WebInputEvent; | 37 class WebInputEvent; |
| 39 } | 38 } |
| 40 | 39 |
| 41 namespace gfx { | 40 namespace gfx { |
| 42 class Point; | 41 class Point; |
| 43 class Rect; | 42 class Rect; |
| 44 class Size; | 43 class Size; |
| 45 } | 44 } |
| 46 | 45 |
| 47 namespace content { | 46 namespace content { |
| 48 | 47 |
| 49 class BrowserPluginGuest; | 48 class BrowserPluginGuest; |
| 50 class BrowserPluginHostFactory; | 49 class BrowserPluginHostFactory; |
| 50 class WebContentsImpl; |
| 51 | 51 |
| 52 // A browser plugin embedder provides functionality for WebContents to operate | 52 // A browser plugin embedder provides functionality for WebContents to operate |
| 53 // in the 'embedder' role. It manages list of guests inside the embedder. | 53 // in the 'embedder' role. It manages list of guests inside the embedder. |
| 54 // | 54 // |
| 55 // The embedder's WebContents manages the lifetime of the embedder. They are | 55 // The embedder's WebContents manages the lifetime of the embedder. They are |
| 56 // created when a renderer asks WebContents to navigate (for the first time) to | 56 // created when a renderer asks WebContents to navigate (for the first time) to |
| 57 // some guest. It gets destroyed when either the WebContents goes away or there | 57 // some guest. It gets destroyed when either the WebContents goes away or there |
| 58 // is a RenderViewHost swap in WebContents. | 58 // is a RenderViewHost swap in WebContents. |
| 59 class CONTENT_EXPORT BrowserPluginEmbedder : public WebContentsObserver, | 59 class CONTENT_EXPORT BrowserPluginEmbedder : public WebContentsObserver, |
| 60 public NotificationObserver { | 60 public NotificationObserver { |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 ContainerInstanceMap guest_web_contents_by_instance_id_; | 156 ContainerInstanceMap guest_web_contents_by_instance_id_; |
| 157 RenderViewHost* render_view_host_; | 157 RenderViewHost* render_view_host_; |
| 158 bool visible_; | 158 bool visible_; |
| 159 | 159 |
| 160 DISALLOW_COPY_AND_ASSIGN(BrowserPluginEmbedder); | 160 DISALLOW_COPY_AND_ASSIGN(BrowserPluginEmbedder); |
| 161 }; | 161 }; |
| 162 | 162 |
| 163 } // namespace content | 163 } // namespace content |
| 164 | 164 |
| 165 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_EMBEDDER_H_ | 165 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_EMBEDDER_H_ |
| OLD | NEW |