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

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

Issue 1627024: Add ExtensionFunctionDispatcher::Delegate::GetAssociatedTabContents (Closed)
Patch Set: cr changes Created 10 years, 8 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_host.h
diff --git a/chrome/browser/extensions/extension_host.h b/chrome/browser/extensions/extension_host.h
index f30593c74e619e3ff4353910ff2dab64b3c285ac..da3cdd072ace1c4ff407617f0736fe2b785c7704 100644
--- a/chrome/browser/extensions/extension_host.h
+++ b/chrome/browser/extensions/extension_host.h
@@ -82,6 +82,14 @@ class ExtensionHost : public RenderViewHostDelegate,
ViewType::Type extension_host_type() const { return extension_host_type_; }
+ // ExtensionFunctionDispatcher::Delegate
+ virtual TabContents* associated_tab_contents() {
+ return associated_tab_contents_;
+ }
+ void set_associated_tab_contents(TabContents* associated_tab_contents) {
+ associated_tab_contents_ = associated_tab_contents;
+ }
+
// Sets the the ViewType of this host (e.g. mole, toolstrip).
void SetRenderViewType(ViewType::Type type);
@@ -253,6 +261,9 @@ class ExtensionHost : public RenderViewHostDelegate,
// are used here, others are not hosted by ExtensionHost.
ViewType::Type extension_host_type_;
+ // The relevant TabContents associated with this ExtensionHost, if any.
+ TabContents* associated_tab_contents_;
+
// Used to measure how long it's been since the host was created.
PerfTimer since_created_;
« no previous file with comments | « chrome/browser/extensions/extension_function_dispatcher.h ('k') | chrome/browser/extensions/extension_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698