| 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 struct BrowserPluginHostMsg_CreateGuest_Params; |
| 34 struct BrowserPluginHostMsg_ResizeGuest_Params; | 35 struct BrowserPluginHostMsg_ResizeGuest_Params; |
| 35 | 36 |
| 36 namespace WebKit { | 37 namespace WebKit { |
| 37 class WebInputEvent; | 38 class WebInputEvent; |
| 38 } | 39 } |
| 39 | 40 |
| 40 namespace gfx { | 41 namespace gfx { |
| 41 class Point; | 42 class Point; |
| 42 class Rect; | 43 class Rect; |
| 43 class Size; | 44 class Size; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 62 typedef std::map<int, WebContents*> ContainerInstanceMap; | 63 typedef std::map<int, WebContents*> ContainerInstanceMap; |
| 63 | 64 |
| 64 virtual ~BrowserPluginEmbedder(); | 65 virtual ~BrowserPluginEmbedder(); |
| 65 | 66 |
| 66 static BrowserPluginEmbedder* Create(WebContentsImpl* web_contents, | 67 static BrowserPluginEmbedder* Create(WebContentsImpl* web_contents, |
| 67 RenderViewHost* render_view_host); | 68 RenderViewHost* render_view_host); |
| 68 | 69 |
| 69 // Creates a new guest. | 70 // Creates a new guest. |
| 70 void CreateGuest(RenderViewHost* render_view_host, | 71 void CreateGuest(RenderViewHost* render_view_host, |
| 71 int instance_id, | 72 int instance_id, |
| 72 std::string storage_partition_id, | 73 const BrowserPluginHostMsg_CreateGuest_Params& params); |
| 73 bool persist_storage, | |
| 74 bool focused, | |
| 75 bool visible); | |
| 76 | 74 |
| 77 // Navigates in a guest (new or existing). | 75 // Navigates in a guest (new or existing). |
| 78 void NavigateGuest( | 76 void NavigateGuest( |
| 79 RenderViewHost* render_view_host, | 77 RenderViewHost* render_view_host, |
| 80 int instance_id, | 78 int instance_id, |
| 81 const std::string& src, | 79 const std::string& src, |
| 82 const BrowserPluginHostMsg_ResizeGuest_Params& resize_params); | 80 const BrowserPluginHostMsg_ResizeGuest_Params& resize_params); |
| 83 | 81 |
| 84 void ResizeGuest(RenderViewHost* render_view_host, | 82 void ResizeGuest(RenderViewHost* render_view_host, |
| 85 int instance_id, | 83 int instance_id, |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 RenderViewHost* render_view_host_; | 159 RenderViewHost* render_view_host_; |
| 162 // Tracks the visibility state of the embedder. | 160 // Tracks the visibility state of the embedder. |
| 163 bool visible_; | 161 bool visible_; |
| 164 | 162 |
| 165 DISALLOW_COPY_AND_ASSIGN(BrowserPluginEmbedder); | 163 DISALLOW_COPY_AND_ASSIGN(BrowserPluginEmbedder); |
| 166 }; | 164 }; |
| 167 | 165 |
| 168 } // namespace content | 166 } // namespace content |
| 169 | 167 |
| 170 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_EMBEDDER_H_ | 168 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_EMBEDDER_H_ |
| OLD | NEW |