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 #include "chrome/android/testshell/chrome_main_delegate_testshell_android.h" | 5 #include "chrome/android/testshell/chrome_main_delegate_testshell_android.h" |
6 | 6 |
7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
8 #include "base/android/jni_registrar.h" | 8 #include "base/android/jni_registrar.h" |
9 #include "chrome/android/testshell/tab_manager.h" | 9 #include "chrome/android/testshell/tab_manager.h" |
| 10 #include "chrome/browser/search_engines/template_url_prepopulate_data.h" |
| 11 |
| 12 static const char kDefaultCountryCode[] = "US"; |
10 | 13 |
11 static base::android::RegistrationMethod kRegistrationMethods[] = { | 14 static base::android::RegistrationMethod kRegistrationMethods[] = { |
12 { "TabManager", chrome::RegisterTabManager }, | 15 { "TabManager", chrome::RegisterTabManager }, |
13 }; | 16 }; |
14 | 17 |
15 ChromeMainDelegateTestShellAndroid::ChromeMainDelegateTestShellAndroid() { | 18 ChromeMainDelegateTestShellAndroid::ChromeMainDelegateTestShellAndroid() { |
16 } | 19 } |
17 | 20 |
18 ChromeMainDelegateTestShellAndroid::~ChromeMainDelegateTestShellAndroid() { | 21 ChromeMainDelegateTestShellAndroid::~ChromeMainDelegateTestShellAndroid() { |
19 } | 22 } |
20 | 23 |
| 24 bool ChromeMainDelegateTestShellAndroid::BasicStartupComplete(int* exit_code) { |
| 25 TemplateURLPrepopulateData::InitCountryCode(kDefaultCountryCode); |
| 26 return ChromeMainDelegateAndroid::BasicStartupComplete(exit_code); |
| 27 } |
| 28 |
21 bool ChromeMainDelegateTestShellAndroid::RegisterApplicationNativeMethods( | 29 bool ChromeMainDelegateTestShellAndroid::RegisterApplicationNativeMethods( |
22 JNIEnv* env) { | 30 JNIEnv* env) { |
23 if (!ChromeMainDelegateAndroid::RegisterApplicationNativeMethods(env)) | 31 if (!ChromeMainDelegateAndroid::RegisterApplicationNativeMethods(env)) |
24 return false; | 32 return false; |
25 | 33 |
26 return base::android::RegisterNativeMethods(env, | 34 return base::android::RegisterNativeMethods(env, |
27 kRegistrationMethods, | 35 kRegistrationMethods, |
28 arraysize(kRegistrationMethods)); | 36 arraysize(kRegistrationMethods)); |
29 } | 37 } |
OLD | NEW |