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

Unified Diff: chrome/browser/guest_view/guest_view_base.h

Issue 426593007: Refactor guest view availability to be API not permission based. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: MostLikelyContextType Created 6 years, 4 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: chrome/browser/guest_view/guest_view_base.h
diff --git a/chrome/browser/guest_view/guest_view_base.h b/chrome/browser/guest_view/guest_view_base.h
index e42b47ce4a5beaa21fb1cf5657ebbbccb4069665..0f1cd1cf6f97a694830477fb4ce5a9333d431f83 100644
--- a/chrome/browser/guest_view/guest_view_base.h
+++ b/chrome/browser/guest_view/guest_view_base.h
@@ -141,11 +141,13 @@ class GuestViewBase : public content::BrowserPluginGuestDelegate,
// to destruction.
virtual void WillDestroy() {}
- // This method is to be implemented by the derived class. It determines
- // whether the guest view type of the derived class can be used by the
- // provided embedder extension ID.
- virtual bool CanEmbedderUseGuestView(
- const std::string& embedder_extension_id) = 0;
+ // This method is to be implemented by the derived class. Access to guest
+ // views are determined by the availability of the internal extension API
+ // used to implement the guest view.
+ //
+ // This should be the name of the API as it appears in the _api_features.json
+ // file.
+ virtual const char* GetAPINamespace() = 0;
// This method is to be implemented by the derived class. Given a set of
// initialization parameters, a concrete subclass of GuestViewBase can
@@ -161,7 +163,7 @@ class GuestViewBase : public content::BrowserPluginGuestDelegate,
// This creates a WebContents and initializes |this| GuestViewBase to use the
// newly created WebContents.
void Init(const std::string& embedder_extension_id,
- int embedder_render_process_id,
+ content::WebContents* embedder_web_contents,
const base::DictionaryValue& create_params,
const WebContentsCreatedCallback& callback);
« no previous file with comments | « chrome/browser/guest_view/extension_options/extension_options_guest.cc ('k') | chrome/browser/guest_view/guest_view_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698