| 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 834eb43e83c3c1880d1cd02aff866989a96d52fb..8e942d2a46a197ab8139c96bb4db735bab19f586 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);
|
| @@ -115,6 +117,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_;
|
|
|
|
|