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

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

Issue 199074: Don't allow updating tabs to javascript URLs without host (Closed)
Patch Set: Remove unchanged file Created 11 years, 3 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_function.h
diff --git a/chrome/browser/extensions/extension_function.h b/chrome/browser/extensions/extension_function.h
index 02bab68335e1a1e332ae53ebaa965959dc6f1e45..d763696231c78a61685b1f7198df3a3e163f8d45 100644
--- a/chrome/browser/extensions/extension_function.h
+++ b/chrome/browser/extensions/extension_function.h
@@ -66,6 +66,15 @@ class ExtensionFunction : public base::RefCounted<ExtensionFunction> {
virtual void Run() = 0;
protected:
+ // Gets the extension that called this function. This can return NULL for
+ // async functions.
+ Extension* GetExtension() {
+ if (dispatcher())
+ return dispatcher()->GetExtension();
+ else
+ return NULL;
+ }
+
// The peer to the dispatcher that will service this extension function call.
scoped_refptr<ExtensionFunctionDispatcher::Peer> peer_;
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_function_dispatcher.h » ('j') | chrome/common/extensions/extension.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698