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 1ca4dde4d98c3fde10917aca07227872bbc5f5c2..c01ab6cf7b0c12850562754fb68bf73331dcf2db 100644 |
--- a/chrome/browser/guest_view/guest_view_base.h |
+++ b/chrome/browser/guest_view/guest_view_base.h |
@@ -17,6 +17,10 @@ |
struct RendererContentSettingRules; |
+namespace extensions { |
+class Feature; |
+} |
+ |
// A GuestViewBase is the base class browser-side API implementation for a |
// <*view> tag. GuestViewBase maintains an association between a guest |
// WebContents and an embedder WebContents. It receives events issued from |
@@ -121,11 +125,14 @@ 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 extension Feature returned |
+ // by GetFeature(). |
+ // |
+ // This Feature should be an API feature so that it can declare the contexts |
+ // the guest view is available in, *not* a permission which contains no |
+ // context information. |
+ virtual extensions::Feature* GetFeature() = 0; |
// This method is to be implemented by the derived class. Given a set of |
// initialization parameters, a concrete subclass of GuestViewBase can |
@@ -142,6 +149,7 @@ class GuestViewBase : public content::BrowserPluginGuestDelegate, |
// newly created WebContents. |
void Init(const std::string& embedder_extension_id, |
int embedder_render_process_id, |
+ content::WebContents* web_contents, |
const base::DictionaryValue& create_params, |
const WebContentsCreatedCallback& callback); |