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

Unified Diff: extensions/browser/extension_function.h

Issue 145463002: Extensions: Send the tab id to platform apps. (Closed) Base URL: svn://chrome-svn/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: extensions/browser/extension_function.h
===================================================================
--- extensions/browser/extension_function.h (revision 246091)
+++ extensions/browser/extension_function.h (working copy)
@@ -192,6 +192,9 @@
response_callback_ = callback;
}
+ void set_source_tab_id(int source_tab_id) { source_tab_id_ = source_tab_id; }
+ int source_tab_id() const { return source_tab_id_; }
+
protected:
friend struct ExtensionFunctionDeleteTraits;
@@ -264,6 +267,10 @@
// The callback to run once the function has done execution.
ResponseCallback response_callback_;
+ // The ID of the tab triggered this function call, or -1 if there is no tab.
+ int source_tab_id_;
+
+ private:
DISALLOW_COPY_AND_ASSIGN(ExtensionFunction);
};

Powered by Google App Engine
This is Rietveld 408576698