OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_ANDROID_CHROME_MAIN_DELEGATE_ANDROID_H_ | 5 #ifndef CHROME_APP_ANDROID_CHROME_MAIN_DELEGATE_ANDROID_H_ |
6 #define CHROME_APP_ANDROID_CHROME_MAIN_DELEGATE_ANDROID_H_ | 6 #define CHROME_APP_ANDROID_CHROME_MAIN_DELEGATE_ANDROID_H_ |
7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" |
8 #include "chrome/app/chrome_main_delegate.h" | 9 #include "chrome/app/chrome_main_delegate.h" |
9 #include "content/public/browser/browser_main_runner.h" | 10 #include "content/public/browser/browser_main_runner.h" |
10 | 11 |
| 12 class SafeBrowsingApiHandler; |
| 13 |
11 // Android override of ChromeMainDelegate | 14 // Android override of ChromeMainDelegate |
12 class ChromeMainDelegateAndroid : public ChromeMainDelegate { | 15 class ChromeMainDelegateAndroid : public ChromeMainDelegate { |
13 public: | 16 public: |
14 static ChromeMainDelegateAndroid* Create(); | 17 static ChromeMainDelegateAndroid* Create(); |
15 | 18 |
16 protected: | 19 protected: |
17 ChromeMainDelegateAndroid(); | 20 ChromeMainDelegateAndroid(); |
18 ~ChromeMainDelegateAndroid() override; | 21 ~ChromeMainDelegateAndroid() override; |
19 | 22 |
20 bool BasicStartupComplete(int* exit_code) override; | 23 bool BasicStartupComplete(int* exit_code) override; |
21 | |
22 void SandboxInitialized(const std::string& process_type) override; | 24 void SandboxInitialized(const std::string& process_type) override; |
23 | |
24 int RunProcess( | 25 int RunProcess( |
25 const std::string& process_type, | 26 const std::string& process_type, |
26 const content::MainFunctionParams& main_function_params) override; | 27 const content::MainFunctionParams& main_function_params) override; |
| 28 void ProcessExiting(const std::string& process_type) override; |
| 29 |
| 30 #if defined(SAFE_BROWSING_DB_REMOTE) |
| 31 virtual SafeBrowsingApiHandler* CreateSafeBrowsingApiHandler(); |
| 32 #endif |
27 | 33 |
28 private: | 34 private: |
29 scoped_ptr<content::BrowserMainRunner> browser_runner_; | 35 scoped_ptr<content::BrowserMainRunner> browser_runner_; |
30 | 36 |
| 37 #if defined(SAFE_BROWSING_DB_REMOTE) |
| 38 scoped_ptr<SafeBrowsingApiHandler> safe_browsing_api_handler_; |
| 39 #endif |
| 40 |
31 DISALLOW_COPY_AND_ASSIGN(ChromeMainDelegateAndroid); | 41 DISALLOW_COPY_AND_ASSIGN(ChromeMainDelegateAndroid); |
32 }; | 42 }; |
33 | 43 |
34 #endif // CHROME_APP_ANDROID_CHROME_MAIN_DELEGATE_ANDROID_H_ | 44 #endif // CHROME_APP_ANDROID_CHROME_MAIN_DELEGATE_ANDROID_H_ |
OLD | NEW |