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

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

Issue 264943006: BrowserPlugin: Simplify content/public API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@guestview_manager_v1
Patch Set: Fixed nit 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 bc6ee685ddbb0fddfcf18e9cb848eec4bd97050b..484b09c48ff6899b56a90cfa1df54d7563e7c663 100644
--- a/content/public/browser/browser_plugin_guest_manager_delegate.h
+++ b/content/public/browser/browser_plugin_guest_manager_delegate.h
@@ -37,24 +37,17 @@ class CONTENT_EXPORT BrowserPluginGuestManagerDelegate {
// moves outside of content, this API will be unnecessary.
virtual void RemoveGuest(int guest_instance_id) {}
- // Returns a Webcontents given a |guest_instance_id|. Returns NULL if the
- // guest wasn't found. If the embedder is not permitted to access the given
- // |guest_instance_id|, the embedder is killed, and NULL is returned.
- virtual WebContents* GetGuestByInstanceID(int guest_instance_id,
- int embedder_render_process_id);
-
- // Returns whether the specified embedder is permitted to access the given
- // |guest_instance_id|.
- // TODO(fsamuel): Remove this.
- virtual bool CanEmbedderAccessInstanceID(int embedder_render_process_id,
- int guest_instance_id);
-
- // Returns whether the specified embedder is permitted to access the given
- // |guest_instance_id|, and kills the embedder if not.
- // TODO(fsamuel): Remove this.
- virtual bool CanEmbedderAccessInstanceIDMaybeKill(
+ 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
+ // does not exist, then the |callback| will be called with a NULL
+ // WebContents. If the provided |embedder_render_process_id| does
+ // not own the requested guest, then the embedder will be killed,
+ // and the |callback| will not be called.
jam 2014/05/06 18:21:49 regarding this last sentance; if content is requir
+ virtual void MaybeGetGuestByInstanceIDOrKill(
+ int guest_instance_id,
int embedder_render_process_id,
- int guest_instance_id);
+ const GuestByInstanceIDCallback& callback) {}
// Returns an existing SiteInstance if the current profile has a guest of the
// given |guest_site|.

Powered by Google App Engine
This is Rietveld 408576698