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

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: fix null pointer deref Created 6 years, 10 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
« no previous file with comments | « chrome/renderer/extensions/request_sender.cc ('k') | extensions/browser/extension_function.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/extension_function.h
===================================================================
--- extensions/browser/extension_function.h (revision 248111)
+++ 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);
};
« no previous file with comments | « chrome/renderer/extensions/request_sender.cc ('k') | extensions/browser/extension_function.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698