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

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: Fixed content_browsertests after a change 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..66651b4c41db767f978d793690d627227c9708dc 100644
--- a/content/public/browser/browser_plugin_guest_manager_delegate.h
+++ b/content/public/browser/browser_plugin_guest_manager_delegate.h
@@ -5,11 +5,17 @@
#ifndef CONTENT_PUBLIC_BROWSER_BROWSER_PLUGIN_GUEST_MANAGER_DELEGATE_H_
#define CONTENT_PUBLIC_BROWSER_BROWSER_PLUGIN_GUEST_MANAGER_DELEGATE_H_
+#include <string>
+
#include "base/callback.h"
#include "content/common/content_export.h"
class GURL;
+namespace base {
+class DictionaryValue;
+} // namespace base
+
namespace content {
class SiteInstance;
@@ -21,22 +27,19 @@ class CONTENT_EXPORT BrowserPluginGuestManagerDelegate {
public:
virtual ~BrowserPluginGuestManagerDelegate() {}
+ // Requests the allocation of a new guest WebContents.
+ virtual content::WebContents* CreateGuest(
+ content::SiteInstance* embedder_site_instance,
+ int instance_id,
+ const std::string& storage_partition_id,
+ bool persist_storage,
+ 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 +52,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.
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | content/public/browser/browser_plugin_guest_manager_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698