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

Unified Diff: remoting/host/win/launch_native_messaging_host_process.h

Issue 2152953002: Refactoring Native Messaging Host process launching code into its own file. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing CR feedback. Created 4 years, 5 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 | « remoting/host/switches.cc ('k') | remoting/host/win/launch_native_messaging_host_process.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/win/launch_native_messaging_host_process.h
diff --git a/remoting/host/win/launch_native_messaging_host_process.h b/remoting/host/win/launch_native_messaging_host_process.h
new file mode 100644
index 0000000000000000000000000000000000000000..a1c59ad87bdb4564ac5edd4b07d468dfcb85b681
--- /dev/null
+++ b/remoting/host/win/launch_native_messaging_host_process.h
@@ -0,0 +1,36 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef REMOTING_HOST_WIN_LAUNCH_NATIVE_MESSAGING_HOST_PROCESS_H_
+#define REMOTING_HOST_WIN_LAUNCH_NATIVE_MESSAGING_HOST_PROCESS_H_
+
+#include <cstdint>
+
+#include "base/win/scoped_handle.h"
+
+namespace base {
+class FilePath;
+} // namespace base
+
+namespace remoting {
+
+enum ProcessLaunchResult {
+ PROCESS_LAUNCH_RESULT_SUCCESS,
+ PROCESS_LAUNCH_RESULT_CANCELLED,
+ PROCESS_LAUNCH_RESULT_FAILED,
+};
+
+// Launches the executable at |binary_path| using the parameters passed in.
+// If the process is launched successfully, |read_handle| and |write_handle| are
+// valid for I/O and the function returns PROCESS_LAUNCH_RESULT_SUCCESS.
+ProcessLaunchResult LaunchNativeMessagingHostProcess(
+ const base::FilePath& binary_path,
+ intptr_t parent_window_handle,
+ bool elevate_process,
+ base::win::ScopedHandle* read_handle,
+ base::win::ScopedHandle* write_handle);
+
+} // namespace remoting
+
+#endif // REMOTING_HOST_WIN_LAUNCH_NATIVE_MESSAGING_HOST_PROCESS_H_
« no previous file with comments | « remoting/host/switches.cc ('k') | remoting/host/win/launch_native_messaging_host_process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698