Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_MESSAGING_NATIVE_PROCESS_LAUNCHER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_MESSAGING_NATIVE_PROCESS_LAUNCHER_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_MESSAGING_NATIVE_PROCESS_LAUNCHER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_MESSAGING_NATIVE_PROCESS_LAUNCHER_H_ |
| 7 | 7 |
| 8 #include "base/process.h" | 8 #include "base/process.h" |
| 9 #include "chrome/browser/extensions/api/messaging/native_message_process_host.h" | 9 #include "chrome/browser/extensions/api/messaging/native_message_process_host.h" |
| 10 | 10 |
| 11 class CommandLine; | |
| 11 class GURL; | 12 class GURL; |
| 12 | 13 |
| 13 namespace base { | 14 namespace base { |
| 14 class FilePath; | 15 class FilePath; |
| 15 } | 16 } |
| 16 | 17 |
| 17 namespace extensions { | 18 namespace extensions { |
| 18 | 19 |
| 19 class NativeMessagingHostManifest; | 20 class NativeMessagingHostManifest; |
| 20 | 21 |
| (...skipping 24 matching lines...) Expand all Loading... | |
| 45 protected: | 46 protected: |
| 46 // The following two methods are platform specific and are implemented in | 47 // The following two methods are platform specific and are implemented in |
| 47 // platform-specific .cc files. | 48 // platform-specific .cc files. |
| 48 | 49 |
| 49 // Loads manifest for the native messaging host |name|. | 50 // Loads manifest for the native messaging host |name|. |
| 50 static scoped_ptr<NativeMessagingHostManifest> FindAndLoadManifest( | 51 static scoped_ptr<NativeMessagingHostManifest> FindAndLoadManifest( |
| 51 const std::string& native_host_name, | 52 const std::string& native_host_name, |
| 52 std::string* error_message); | 53 std::string* error_message); |
| 53 | 54 |
| 54 // Launches native messaging process. | 55 // Launches native messaging process. |
| 55 static bool LaunchNativeProcess( | 56 static bool LaunchNativeProcess( |
|
Matt Perry
2013/03/05 18:19:24
I think it would be better to have this method acc
Sergey Ulanov
2013/03/05 19:03:05
This method is protected and supposed to be called
Matt Perry
2013/03/05 19:14:25
Oh OK, that makes sense.
nit: fix the variable na
| |
| 56 const base::FilePath& path, | 57 const CommandLine& path, |
| 57 base::PlatformFile* read_file, | 58 base::PlatformFile* read_file, |
| 58 base::PlatformFile* write_file); | 59 base::PlatformFile* write_file); |
| 59 | 60 |
| 60 private: | 61 private: |
| 61 DISALLOW_COPY_AND_ASSIGN(NativeProcessLauncher); | 62 DISALLOW_COPY_AND_ASSIGN(NativeProcessLauncher); |
| 62 }; | 63 }; |
| 63 | 64 |
| 64 } // namespace extensions | 65 } // namespace extensions |
| 65 | 66 |
| 66 #endif // CHROME_BROWSER_EXTENSIONS_API_MESSAGING_NATIVE_PROCESS_LAUNCHER_H_ | 67 #endif // CHROME_BROWSER_EXTENSIONS_API_MESSAGING_NATIVE_PROCESS_LAUNCHER_H_ |
| OLD | NEW |