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_APP_CHROME_MAIN_DELEGATE_H_ | 5 #ifndef CHROME_APP_CHROME_MAIN_DELEGATE_H_ |
6 #define CHROME_APP_CHROME_MAIN_DELEGATE_H_ | 6 #define CHROME_APP_CHROME_MAIN_DELEGATE_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/time/time.h" |
11 #include "build/build_config.h" | 12 #include "build/build_config.h" |
12 #include "chrome/common/chrome_content_client.h" | 13 #include "chrome/common/chrome_content_client.h" |
13 #include "content/public/app/content_main_delegate.h" | 14 #include "content/public/app/content_main_delegate.h" |
14 | 15 |
15 template <typename> | 16 template <typename> |
16 class ScopedVector; | 17 class ScopedVector; |
17 | 18 |
18 namespace base { | 19 namespace base { |
19 class CommandLine; | 20 class CommandLine; |
20 } | 21 } |
21 | 22 |
22 // Chrome implementation of ContentMainDelegate. | 23 // Chrome implementation of ContentMainDelegate. |
23 class ChromeMainDelegate : public content::ContentMainDelegate { | 24 class ChromeMainDelegate : public content::ContentMainDelegate { |
24 public: | 25 public: |
25 ChromeMainDelegate(); | 26 ChromeMainDelegate(); |
| 27 |
| 28 // |exe_entry_point_ticks| is the time at which the main function of the |
| 29 // executable was entered, or null if not available. |
| 30 explicit ChromeMainDelegate(base::TimeTicks exe_entry_point_ticks); |
26 ~ChromeMainDelegate() override; | 31 ~ChromeMainDelegate() override; |
27 | 32 |
28 protected: | 33 protected: |
29 // content::ContentMainDelegate implementation: | 34 // content::ContentMainDelegate implementation: |
30 bool BasicStartupComplete(int* exit_code) override; | 35 bool BasicStartupComplete(int* exit_code) override; |
31 void PreSandboxStartup() override; | 36 void PreSandboxStartup() override; |
32 void SandboxInitialized(const std::string& process_type) override; | 37 void SandboxInitialized(const std::string& process_type) override; |
33 int RunProcess( | 38 int RunProcess( |
34 const std::string& process_type, | 39 const std::string& process_type, |
35 const content::MainFunctionParams& main_function_params) override; | 40 const content::MainFunctionParams& main_function_params) override; |
(...skipping 20 matching lines...) Expand all Loading... |
56 const std::string& process_type); | 61 const std::string& process_type); |
57 void SetUpInstallerPreferences(const base::CommandLine& command_line); | 62 void SetUpInstallerPreferences(const base::CommandLine& command_line); |
58 #endif // defined(OS_MACOSX) | 63 #endif // defined(OS_MACOSX) |
59 | 64 |
60 ChromeContentClient chrome_content_client_; | 65 ChromeContentClient chrome_content_client_; |
61 | 66 |
62 DISALLOW_COPY_AND_ASSIGN(ChromeMainDelegate); | 67 DISALLOW_COPY_AND_ASSIGN(ChromeMainDelegate); |
63 }; | 68 }; |
64 | 69 |
65 #endif // CHROME_APP_CHROME_MAIN_DELEGATE_H_ | 70 #endif // CHROME_APP_CHROME_MAIN_DELEGATE_H_ |
OLD | NEW |