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 "chrome/app/chrome_main_delegate.h" | 8 #include "chrome/app/chrome_main_delegate.h" |
9 #include "content/public/browser/browser_main_runner.h" | 9 #include "content/public/browser/browser_main_runner.h" |
10 | 10 |
11 // Android override of ChromeMainDelegate | 11 // Android override of ChromeMainDelegate |
12 class ChromeMainDelegateAndroid : public ChromeMainDelegate { | 12 class ChromeMainDelegateAndroid : public ChromeMainDelegate { |
13 public: | 13 public: |
14 static ChromeMainDelegateAndroid* Create(); | 14 static ChromeMainDelegateAndroid* Create(); |
15 | 15 |
16 // Set up the JNI bindings. Tie the Java methods with their native | |
17 // counterparts. Override to add more JNI bindings. | |
18 virtual bool RegisterApplicationNativeMethods(JNIEnv* env); | |
19 | |
20 protected: | 16 protected: |
21 ChromeMainDelegateAndroid(); | 17 ChromeMainDelegateAndroid(); |
22 ~ChromeMainDelegateAndroid() override; | 18 ~ChromeMainDelegateAndroid() override; |
23 | 19 |
24 bool BasicStartupComplete(int* exit_code) override; | 20 bool BasicStartupComplete(int* exit_code) override; |
25 | 21 |
26 void SandboxInitialized(const std::string& process_type) override; | 22 void SandboxInitialized(const std::string& process_type) override; |
27 | 23 |
28 int RunProcess( | 24 int RunProcess( |
29 const std::string& process_type, | 25 const std::string& process_type, |
30 const content::MainFunctionParams& main_function_params) override; | 26 const content::MainFunctionParams& main_function_params) override; |
31 | 27 |
32 private: | 28 private: |
33 scoped_ptr<content::BrowserMainRunner> browser_runner_; | 29 scoped_ptr<content::BrowserMainRunner> browser_runner_; |
34 | 30 |
35 DISALLOW_COPY_AND_ASSIGN(ChromeMainDelegateAndroid); | 31 DISALLOW_COPY_AND_ASSIGN(ChromeMainDelegateAndroid); |
36 }; | 32 }; |
37 | 33 |
38 #endif // CHROME_APP_ANDROID_CHROME_MAIN_DELEGATE_ANDROID_H_ | 34 #endif // CHROME_APP_ANDROID_CHROME_MAIN_DELEGATE_ANDROID_H_ |
OLD | NEW |