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

Unified Diff: chrome/browser/extensions/extension_web_contents_observer.h

Issue 134393003: app_shell: Convert ExtensionsWebContentsObserver to BrowserContext from Profile (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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/extensions/extension_web_contents_observer.h
diff --git a/chrome/browser/extensions/extension_web_contents_observer.h b/chrome/browser/extensions/extension_web_contents_observer.h
index 019dc88c0b9562cd0c886f675ca8186c6ee64db1..49b1b006934e994c781120d2a5f0b73f320579aa 100644
--- a/chrome/browser/extensions/extension_web_contents_observer.h
+++ b/chrome/browser/extensions/extension_web_contents_observer.h
@@ -8,14 +8,18 @@
#include "content/public/browser/web_contents_observer.h"
#include "content/public/browser/web_contents_user_data.h"
-class Profile;
+namespace content {
+class BrowserContext;
+}
namespace extensions {
class Extension;
struct Message;
// A web contents observer that's used for WebContents in renderer and extension
-// processes.
+// processes. Grants the renderer access to certain URL patterns for extensions,
+// notifies the renderer that the extension was loaded and routes messages to
+// the MessageService.
class ExtensionWebContentsObserver
: public content::WebContentsObserver,
public content::WebContentsUserData<ExtensionWebContentsObserver> {
@@ -36,7 +40,8 @@ class ExtensionWebContentsObserver
// Gets the extension or app (if any) that is associated with a RVH.
const Extension* GetExtension(content::RenderViewHost* render_view_host);
- Profile* profile_;
+ // The browser context for the web contents this is observing.
+ content::BrowserContext* browser_context_;
DISALLOW_COPY_AND_ASSIGN(ExtensionWebContentsObserver);
};

Powered by Google App Engine
This is Rietveld 408576698