OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_MAC_RELAUNCHER_H_ | 5 #ifndef CHROME_BROWSER_MAC_RELAUNCHER_H_ |
6 #define CHROME_BROWSER_MAC_RELAUNCHER_H_ | 6 #define CHROME_BROWSER_MAC_RELAUNCHER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 // mac_relauncher implements main browser application relaunches on the Mac. | 9 // mac_relauncher implements main browser application relaunches on the Mac. |
10 // When a browser wants to relaunch itself, it can't simply fork off a new | 10 // When a browser wants to relaunch itself, it can't simply fork off a new |
(...skipping 15 matching lines...) Expand all Loading... |
26 // relauncher is notified via its kqueue that the parent has exited, it | 26 // relauncher is notified via its kqueue that the parent has exited, it |
27 // proceeds, launching the relaunched process. The handshake to synchronize | 27 // proceeds, launching the relaunched process. The handshake to synchronize |
28 // the parent with the relauncher is necessary to avoid races: the relauncher | 28 // the parent with the relauncher is necessary to avoid races: the relauncher |
29 // needs to be sure that it's monitoring the parent and not some other process | 29 // needs to be sure that it's monitoring the parent and not some other process |
30 // in light of PID reuse, so the parent must remain alive long enough for the | 30 // in light of PID reuse, so the parent must remain alive long enough for the |
31 // relauncher to set up its kqueue. | 31 // relauncher to set up its kqueue. |
32 | 32 |
33 #include <string> | 33 #include <string> |
34 #include <vector> | 34 #include <vector> |
35 | 35 |
| 36 namespace content { |
36 struct MainFunctionParams; | 37 struct MainFunctionParams; |
| 38 } |
37 | 39 |
38 namespace mac_relauncher { | 40 namespace mac_relauncher { |
39 | 41 |
40 // The relauncher process can unmount and eject a mounted disk image and move | 42 // The relauncher process can unmount and eject a mounted disk image and move |
41 // its disk image file to the trash. This argument may be supplied to | 43 // its disk image file to the trash. This argument may be supplied to |
42 // RelaunchAppWithHelper to achieve this. The argument's value must be a BSD | 44 // RelaunchAppWithHelper to achieve this. The argument's value must be a BSD |
43 // device name of the form "diskN" or "diskNsM". | 45 // device name of the form "diskN" or "diskNsM". |
44 extern const char* const kRelauncherDMGDeviceArg; | 46 extern const char* const kRelauncherDMGDeviceArg; |
45 | 47 |
46 // Relaunches the application using the helper application associated with the | 48 // Relaunches the application using the helper application associated with the |
(...skipping 19 matching lines...) Expand all Loading... |
66 // relaunch the same version of Chrome from another location, using that | 68 // relaunch the same version of Chrome from another location, using that |
67 // location's helper. | 69 // location's helper. |
68 bool RelaunchAppWithHelper(const std::string& helper, | 70 bool RelaunchAppWithHelper(const std::string& helper, |
69 const std::vector<std::string>& relauncher_args, | 71 const std::vector<std::string>& relauncher_args, |
70 const std::vector<std::string>& args); | 72 const std::vector<std::string>& args); |
71 | 73 |
72 namespace internal { | 74 namespace internal { |
73 | 75 |
74 // The entry point from ChromeMain into the relauncher process. This is not a | 76 // The entry point from ChromeMain into the relauncher process. This is not a |
75 // user API. Don't call it if your name isn't ChromeMain. | 77 // user API. Don't call it if your name isn't ChromeMain. |
76 int RelauncherMain(const MainFunctionParams& main_parameters); | 78 int RelauncherMain(const content::MainFunctionParams& main_parameters); |
77 | 79 |
78 } // namespace internal | 80 } // namespace internal |
79 | 81 |
80 } // namespace mac_relauncher | 82 } // namespace mac_relauncher |
81 | 83 |
82 #endif // CHROME_BROWSER_MAC_RELAUNCHER_H_ | 84 #endif // CHROME_BROWSER_MAC_RELAUNCHER_H_ |
OLD | NEW |