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

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: again 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..123205955975209e19ba2cb0d6f5a73949a03281 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
@@ -141,11 +145,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
not at google - send to devlin 2014/08/07 00:25:29 This comment, and the boilerplate, is making me co
+ // 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
@@ -162,6 +169,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,
not at google - send to devlin 2014/08/07 00:25:29 I think I'll just replace the |embedder_render_pro
const base::DictionaryValue& create_params,
const WebContentsCreatedCallback& callback);

Powered by Google App Engine
This is Rietveld 408576698