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