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" |
| 9 #include "chrome/android/testshell/tab_manager.h" |
| 10 |
| 11 static base::android::RegistrationMethod kRegistrationMethods[] = { |
| 12 { "TabManager", chrome::RegisterTabManager }, |
| 13 }; |
8 | 14 |
9 ChromeMainDelegateTestShellAndroid::ChromeMainDelegateTestShellAndroid() { | 15 ChromeMainDelegateTestShellAndroid::ChromeMainDelegateTestShellAndroid() { |
10 } | 16 } |
11 | 17 |
12 ChromeMainDelegateTestShellAndroid::~ChromeMainDelegateTestShellAndroid() { | 18 ChromeMainDelegateTestShellAndroid::~ChromeMainDelegateTestShellAndroid() { |
13 } | 19 } |
14 | 20 |
15 bool ChromeMainDelegateTestShellAndroid::RegisterApplicationNativeMethods( | 21 bool ChromeMainDelegateTestShellAndroid::RegisterApplicationNativeMethods( |
16 JNIEnv* env) { | 22 JNIEnv* env) { |
17 return ChromeMainDelegateAndroid::RegisterApplicationNativeMethods(env); | 23 if (!ChromeMainDelegateAndroid::RegisterApplicationNativeMethods(env)) |
| 24 return false; |
| 25 |
| 26 return base::android::RegisterNativeMethods(env, |
| 27 kRegistrationMethods, |
| 28 arraysize(kRegistrationMethods)); |
18 } | 29 } |
OLD | NEW |