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
3 // found in the LICENSE file.
5 #include "chrome/android/testshell/chrome_main_delegate_testshell_android.h"
7 #include "base/android/jni_android.h"
8 #include "base/android/jni_registrar.h"
9 #include "chrome/android/testshell/testshell_tab.h"
10 #include "chrome/browser/search_engines/template_url_prepopulate_data.h"
12 static const char kDefaultCountryCode[] = "US";
14 static base::android::RegistrationMethod kRegistrationMethods[] = {
15 { "TestShellTab", TestShellTab::RegisterTestShellTab },
18 ChromeMainDelegateAndroid* ChromeMainDelegateAndroid::Create() {
19 return new ChromeMainDelegateTestShellAndroid();
22 ChromeMainDelegateTestShellAndroid::ChromeMainDelegateTestShellAndroid() {
25 ChromeMainDelegateTestShellAndroid::~ChromeMainDelegateTestShellAndroid() {
28 bool ChromeMainDelegateTestShellAndroid::BasicStartupComplete(int* exit_code) {
29 TemplateURLPrepopulateData::InitCountryCode(kDefaultCountryCode);
30 return ChromeMainDelegateAndroid::BasicStartupComplete(exit_code);
33 bool ChromeMainDelegateTestShellAndroid::RegisterApplicationNativeMethods(
35 return ChromeMainDelegateAndroid::RegisterApplicationNativeMethods(env) &&
36 base::android::RegisterNativeMethods(env,
38 arraysize(kRegistrationMethods));