diff options
Diffstat (limited to 'extensions/browser/extension_function.h')
-rw-r--r-- | extensions/browser/extension_function.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/extensions/browser/extension_function.h b/extensions/browser/extension_function.h index 49d370e..099dff1 100644 --- a/extensions/browser/extension_function.h +++ b/extensions/browser/extension_function.h @@ -192,6 +192,9 @@ class ExtensionFunction 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 @@ class ExtensionFunction // 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); }; |