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

Side by Side Diff: chrome/app/chrome_watcher_client_win.h

Issue 1281413002: Move tests in chrome_app_unittests into unit_tests Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 4 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 unified diff | Download patch
« no previous file with comments | « build/gn_migration.gypi ('k') | chrome/app/chrome_watcher_command_line_win.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_APP_CHROME_WATCHER_CLIENT_WIN_H_ 5 #ifndef CHROME_APP_CHROME_WATCHER_CLIENT_WIN_H_
6 #define CHROME_APP_CHROME_WATCHER_CLIENT_WIN_H_ 6 #define CHROME_APP_CHROME_WATCHER_CLIENT_WIN_H_
7 7
8 #include <windows.h> 8 #include <windows.h>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/command_line.h" 11 #include "base/command_line.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/process/process.h" 13 #include "base/process/process.h"
14 #include "base/time/time.h" 14 #include "base/time/time.h"
15 #include "base/win/scoped_handle.h" 15 #include "base/win/scoped_handle.h"
16 16
17 #define DLLEXPORT __declspec(dllexport)
18
17 // Launches a Chrome watcher process and permits the client to wait until the 19 // Launches a Chrome watcher process and permits the client to wait until the
18 // process is fully initialized. 20 // process is fully initialized.
19 class ChromeWatcherClient { 21 class DLLEXPORT ChromeWatcherClient {
20 public: 22 public:
21 // A CommandLineGenerator generates command lines that will launch a separate 23 // A CommandLineGenerator generates command lines that will launch a separate
22 // process and pass the supplied values to WatcherMain in that process. 24 // process and pass the supplied values to WatcherMain in that process.
23 // |parent_process| is the process that the watcher process should watch; 25 // |parent_process| is the process that the watcher process should watch;
24 // |main_thread_id| is the parent process' main thread ID. 26 // |main_thread_id| is the parent process' main thread ID.
25 // |on_initialized_event| should be signaled when the watcher process is fully 27 // |on_initialized_event| should be signaled when the watcher process is fully
26 // initialized. The process will be launched such that the HANDLEs are 28 // initialized. The process will be launched such that the HANDLEs are
27 // inherited by the new process. 29 // inherited by the new process.
28 typedef base::Callback<base::CommandLine(HANDLE parent_process, 30 typedef base::Callback<base::CommandLine(HANDLE parent_process,
29 DWORD main_thread_id, 31 DWORD main_thread_id,
(...skipping 25 matching lines...) Expand all
55 bool WaitForExitWithTimeout(base::TimeDelta timeout, int* exit_code); 57 bool WaitForExitWithTimeout(base::TimeDelta timeout, int* exit_code);
56 58
57 private: 59 private:
58 CommandLineGenerator command_line_generator_; 60 CommandLineGenerator command_line_generator_;
59 base::win::ScopedHandle on_initialized_event_; 61 base::win::ScopedHandle on_initialized_event_;
60 base::Process process_; 62 base::Process process_;
61 63
62 DISALLOW_COPY_AND_ASSIGN(ChromeWatcherClient); 64 DISALLOW_COPY_AND_ASSIGN(ChromeWatcherClient);
63 }; 65 };
64 66
67 #undef DLLEXPORT
68
65 #endif // CHROME_APP_CHROME_WATCHER_CLIENT_WIN_H_ 69 #endif // CHROME_APP_CHROME_WATCHER_CLIENT_WIN_H_
OLDNEW
« no previous file with comments | « build/gn_migration.gypi ('k') | chrome/app/chrome_watcher_command_line_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698