Index: chrome/browser/extensions/api/messaging/native_message_process_host.h |
diff --git a/chrome/browser/extensions/api/messaging/native_message_process_host.h b/chrome/browser/extensions/api/messaging/native_message_process_host.h |
index 129cb075a93c28158d66c673bd25d9cf24a5d20d..d0d3612854fd33a7676a0656963275c8e7c0f369 100644 |
--- a/chrome/browser/extensions/api/messaging/native_message_process_host.h |
+++ b/chrome/browser/extensions/api/messaging/native_message_process_host.h |
@@ -40,8 +40,7 @@ class NativeMessageProcessHost |
#endif // !defined(OS_POSIX) |
{ |
public: |
- // Interface for classes that which to recieve messages from the native |
- // process. |
+ // Interface for the object that receives messages from the native process. |
class Client { |
public: |
virtual ~Client() {} |
@@ -55,12 +54,14 @@ class NativeMessageProcessHost |
static scoped_ptr<NativeMessageProcessHost> Create( |
base::WeakPtr<Client> weak_client_ui, |
+ const std::string& source_extension_id, |
const std::string& native_host_name, |
int destination_port); |
// Create using specified |launcher|. Used in tests. |
static scoped_ptr<NativeMessageProcessHost> CreateWithLauncher( |
base::WeakPtr<Client> weak_client_ui, |
+ const std::string& source_extension_id, |
const std::string& native_host_name, |
int destination_port, |
scoped_ptr<NativeProcessLauncher> launcher); |
@@ -80,6 +81,7 @@ class NativeMessageProcessHost |
private: |
NativeMessageProcessHost(base::WeakPtr<Client> weak_client_ui, |
+ const std::string& source_extension_id, |
const std::string& native_host_name, |
int destination_port, |
scoped_ptr<NativeProcessLauncher> launcher); |
@@ -116,6 +118,9 @@ class NativeMessageProcessHost |
// UI thread. |
base::WeakPtr<Client> weak_client_ui_; |
+ // ID of the calling extension. |
+ std::string source_extension_id_; |
+ |
// Name of the native messaging host. |
std::string native_host_name_; |