Chromium Code Reviews| Index: chrome/browser/extensions/extension_host.h |
| diff --git a/chrome/browser/extensions/extension_host.h b/chrome/browser/extensions/extension_host.h |
| index 1a23d207e2550d51aff1eb8c067d50d17b90da7b..2674b31d6d478b531f98e75fe2d68e286366b291 100644 |
| --- a/chrome/browser/extensions/extension_host.h |
| +++ b/chrome/browser/extensions/extension_host.h |
| @@ -14,6 +14,7 @@ |
| #include "chrome/browser/extensions/extension_function_dispatcher.h" |
| #include "chrome/browser/tab_contents/render_view_host_delegate_helper.h" |
| #include "chrome/browser/ui/app_modal_dialogs/js_modal_dialog.h" |
| +#include "chrome/common/extensions/extension.h" |
| #include "content/browser/renderer_host/render_view_host_delegate.h" |
| #include "content/common/notification_registrar.h" |
| @@ -26,7 +27,6 @@ |
| #endif |
| class Browser; |
| -class Extension; |
| class FileSelectHelper; |
| class RenderProcessHost; |
| class RenderWidgetHostView; |
| @@ -37,7 +37,7 @@ struct WebPreferences; |
| // This class is the browser component of an extension component's RenderView. |
| // It handles setting up the renderer process, if needed, with special |
| // privileges available to extensions. It may have a view to be shown in the |
| -// in the browser UI, or it may be hidden. |
| +// browser UI, or it may be hidden. |
| class ExtensionHost : public RenderViewHostDelegate, |
| public RenderViewHostDelegate::View, |
| public ExtensionFunctionDispatcher::Delegate, |
| @@ -72,6 +72,10 @@ class ExtensionHost : public RenderViewHostDelegate, |
| void CreateView(Browser* browser); |
| const Extension* extension() const { return extension_; } |
| + const std::string& id() const { |
|
Matt Perry
2011/05/06 18:19:36
I think this should be named extension_id (and the
Denis Lagno
2011/05/06 19:50:33
Done.
|
| + DCHECK(extension_ == NULL || extension_->id() == id_); |
|
Matt Perry
2011/05/06 18:19:36
nit: this is overkill IMO. I'd leave it out.
Denis Lagno
2011/05/06 19:50:33
Done.
|
| + return id_; |
| + } |
| RenderViewHost* render_view_host() const { return render_view_host_; } |
| RenderProcessHost* render_process_host() const; |
| SiteInstance* site_instance() const; |
| @@ -241,6 +245,9 @@ class ExtensionHost : public RenderViewHostDelegate, |
| // The extension that we're hosting in this view. |
| const Extension* extension_; |
| + // Id of extension that we're hosting in this view. |
| + std::string id_; |
|
akalin
2011/05/06 18:40:31
may as well make this const
Denis Lagno
2011/05/06 19:50:33
Done.
|
| + |
| // The profile that this host is tied to. |
| Profile* profile_; |