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

Unified Diff: components/browser_watcher/watcher_client_win.h

Issue 886613002: Introduce the ability to wait for the watcher process to initialize. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review feedback. Created 5 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/chrome_watcher/chrome_watcher_main_api.h ('k') | components/browser_watcher/watcher_client_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/browser_watcher/watcher_client_win.h
diff --git a/components/browser_watcher/watcher_client_win.h b/components/browser_watcher/watcher_client_win.h
index 5ae3c96f2a4393caf5e5fc7a01cd6ba4fef76d88..9e8810799ba16a154a2c019a0a69a667c0b73fa7 100644
--- a/components/browser_watcher/watcher_client_win.h
+++ b/components/browser_watcher/watcher_client_win.h
@@ -32,12 +32,19 @@ class WatcherClient {
// a non-threadsafe legacy launch mode that's compatible with Windows XP.
void LaunchWatcher();
+ // Ensures that |handle| may be inherited by the watcher process. |handle|
+ // must still be inheritable, and it's the client's responsibility to
+ // communicate the value of |handle| to the launched process.
+ void AddInheritedHandle(HANDLE handle);
+
+ // Returns the launched process.
+ const base::Process& process() const { return process_; }
+
// Accessors, exposed only for testing.
bool use_legacy_launch() const { return use_legacy_launch_; }
void set_use_legacy_launch(bool use_legacy_launch) {
use_legacy_launch_ = use_legacy_launch;
}
- base::ProcessHandle process() const { return process_.Handle(); }
private:
// If true, the watcher process will be launched with XP legacy handle
@@ -52,6 +59,8 @@ class WatcherClient {
// LaunchWatcher() call.
base::Process process_;
+ std::vector<HANDLE> inherited_handles_;
+
DISALLOW_COPY_AND_ASSIGN(WatcherClient);
};
« no previous file with comments | « chrome/chrome_watcher/chrome_watcher_main_api.h ('k') | components/browser_watcher/watcher_client_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698