Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1270)

Unified Diff: content/public/browser/browser_plugin_guest_manager_delegate.h

Issue 261013005: BrowserPlugin: Move CreateGuest to chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@guestview_manager_simplify_api
Patch Set: Removed unnecessary includes Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/public/browser/browser_plugin_guest_manager_delegate.h
diff --git a/content/public/browser/browser_plugin_guest_manager_delegate.h b/content/public/browser/browser_plugin_guest_manager_delegate.h
index 484b09c48ff6899b56a90cfa1df54d7563e7c663..bb604f27927579a7fc9eebc92fd8063ebc63f90b 100644
--- a/content/public/browser/browser_plugin_guest_manager_delegate.h
+++ b/content/public/browser/browser_plugin_guest_manager_delegate.h
@@ -10,6 +10,10 @@
class GURL;
+namespace base {
+class DictionaryValue;
+} // namespace base
+
namespace content {
class SiteInstance;
@@ -17,26 +21,26 @@ class WebContents;
// A BrowserPluginGuestManagerDelegate offloads guest management and routing
// operations outside of the content layer.
+struct StorageInfo {
jam 2014/05/06 23:43:53 why a struct for two params instead of putting the
Fady Samuel 2014/05/07 00:07:47 Done.
+ bool persist;
+ std::string partition_id;
+};
+
class CONTENT_EXPORT BrowserPluginGuestManagerDelegate {
public:
virtual ~BrowserPluginGuestManagerDelegate() {}
+ virtual content::WebContents* CreateGuest(
+ content::SiteInstance* embedder_site_instance,
+ int instance_id,
+ const StorageInfo& storage_info,
+ scoped_ptr<base::DictionaryValue> extra_params);
+
// Return a new instance ID.
// TODO(fsamuel): Remove this. Once the instance ID concept is moved
// entirely out of content and into chrome, this API will be unnecessary.
virtual int GetNextInstanceID();
- // Adds a new WebContents |guest_web_contents| as a guest.
- // TODO(fsamuel): Remove this. Once guest WebContents allocation
- // moves outside of content, this API will be unnecessary.
- virtual void AddGuest(int guest_instance_id,
- WebContents* guest_web_contents) {}
-
- // Removes a |guest_instance_id| as a valid guest.
- // TODO(fsamuel): Remove this. Once guest WebContents allocation
- // moves outside of content, this API will be unnecessary.
- virtual void RemoveGuest(int guest_instance_id) {}
-
typedef base::Callback<void(WebContents*)> GuestByInstanceIDCallback;
// Requests a guest WebContents associated with the provided
// |guest_instance_id|. If a guest associated with the provided ID
@@ -49,12 +53,6 @@ class CONTENT_EXPORT BrowserPluginGuestManagerDelegate {
int embedder_render_process_id,
const GuestByInstanceIDCallback& callback) {}
- // Returns an existing SiteInstance if the current profile has a guest of the
- // given |guest_site|.
- // TODO(fsamuel): Remove this. Once guest WebContents allocation
- // moves outside of content, this API will be unnecessary.
- virtual content::SiteInstance* GetGuestSiteInstance(const GURL& guest_site);
-
// Iterates over all WebContents belonging to a given |embedder_web_contents|,
// calling |callback| for each. If one of the callbacks returns true, then
// the iteration exits early.

Powered by Google App Engine
This is Rietveld 408576698