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

Unified Diff: chrome/browser/child_process_launcher.h

Issue 6538100: Move core pieces of chrome\browser. I've only gone up to "g", will do the re... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: take out extra stuff from content_browser.gypi Created 9 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/browser/certificate_viewer.cc ('k') | chrome/browser/child_process_launcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/child_process_launcher.h
===================================================================
--- chrome/browser/child_process_launcher.h (revision 75626)
+++ chrome/browser/child_process_launcher.h (working copy)
@@ -6,66 +6,8 @@
#define CHROME_BROWSER_CHILD_PROCESS_LAUNCHER_H_
#pragma once
-#include "base/basictypes.h"
-#include "base/process_util.h"
-#include "base/ref_counted.h"
+// TODO(jam): remove this file when all files have been converted.
+#include "content/browser/child_process_launcher.h"
-class CommandLine;
-// Launches a process asynchronously and notifies the client of the process
-// handle when it's available. It's used to avoid blocking the calling thread
-// on the OS since often it can take > 100 ms to create the process.
-class ChildProcessLauncher {
- public:
- class Client {
- public:
- // Will be called on the thread that the ChildProcessLauncher was
- // constructed on.
- virtual void OnProcessLaunched() = 0;
-
- protected:
- virtual ~Client() {}
- };
-
- // Launches the process asynchronously, calling the client when the result is
- // ready. Deleting this object before the process is created is safe, since
- // the callback won't be called. If the process is still running by the time
- // this object destructs, it will be terminated.
- // Takes ownership of cmd_line.
- ChildProcessLauncher(
-#if defined(OS_WIN)
- const FilePath& exposed_dir,
-#elif defined(OS_POSIX)
- bool use_zygote,
- const base::environment_vector& environ,
- int ipcfd,
-#endif
- CommandLine* cmd_line,
- Client* client);
- ~ChildProcessLauncher();
-
- // True if the process is being launched and so the handle isn't available.
- bool IsStarting();
-
- // Getter for the process handle. Only call after the process has started.
- base::ProcessHandle GetHandle();
-
- // Call this when the child process exits to know what happened to
- // it. |exit_code| is the exit code of the process if it exited
- // (e.g. status from waitpid if on posix, from GetExitCodeProcess on
- // Windows). |exit_code| may be NULL.
- base::TerminationStatus GetChildTerminationStatus(int* exit_code);
-
- // Changes whether the process runs in the background or not. Only call
- // this after the process has started.
- void SetProcessBackgrounded(bool background);
-
- private:
- class Context;
-
- scoped_refptr<Context> context_;
-
- DISALLOW_COPY_AND_ASSIGN(ChildProcessLauncher);
-};
-
#endif // CHROME_BROWSER_CHILD_PROCESS_LAUNCHER_H_
« no previous file with comments | « chrome/browser/certificate_viewer.cc ('k') | chrome/browser/child_process_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698